I cannot find a way to detect the row number in a table. I understand I can have a Row ID, but I would like to be able to detect the actual row number in a table.
In my specific case, I am trying to recreate the age old Excel odd/even row styling, but I am sure there are many other uses for detecting the row number.
Whatâs a difference between: thisTable.find(thisRow)
and find(thisRow,thisTable)
How does a computer approach each formula?
Also, I donât understand how is an output a row number, and not row title or whatever other column is set as display column. In other words: How does it know to look for exactly that value and not some other value inside thisRow. Is it set as default?
None (AFAIK) ⌠At least, it will give you the same result âŚ
The chaining method used here thisTable.find(thisRow) is just another way of writing this : find(thisRow,thisTable) .
The big advantage for me of chaining is readability (especially later, when you get back to a doc you didnât open for a while). Plus, it simply feels more logical and natural
In this case, this is simply because thatâs what Find() outputs/returns : a position as a number âŚ
You actually get as a result the position of thisRow in the table (which different than the RowID set on Codaâs side)
Well, a table is just a list of rows and each row in a table has a Reference which is always the value from your Display column. (The display column always exist in a table, it canât be avoided⌠Even if you have only one field (as by default, this would be the Display column))
The Reference of a row is that specific value allowing you to access all the other values stored in the various fields of your table for that specific row âŚ
When you use thisRow alone (as in thisTable.find(thisRow)), you get the reference of this row in a table.