I have a table of events, sorted by their start time, and filtered to hide events whose end time has passed. In the table, this is working, so the first event in the table is always the next event, or the event that’s currently going on.
I’m trying to create a variable outside of the table that grabs the next upcoming meeting by simply grabbing the first row. The code in the variable is literally just [Table Name].First(). Somehow this is returning the fourth item in the table. When .First() is applied to a table, what is used as the index? Does it not respect sorting?
.First() still doesn’t return the first row in a sorted table. Can someone from Coda explain how it’s supposed to work? Why do we need to duplicate complex sorting rules in formulas, when we’ve already got our table sorted?
If I have to deal with getting sorted data quickly (especially the first information), honestly I often use Rank() function and refer to Rank rather than “first”
Thanks, I didn’t know about .Rank()! Still doesn’t work though…
I do Rank(thisRow, [VIEW NAME]) but the numbers it outputs are not right. The first row is ranked “2”. I must be getting something wrong?
Edit: I would upload a screenshot but I get “Sorry, an error has occurred.”
Here is a very generic use of rank with numbers ranking, but it works also with alphabetical or dates. You’ve got to compare the current value (in my example Name) to thisTable values for the same parameters.
Update: when I renamed the first task, it jumped to rank 4… even thought it’s still the first row in the table! This doesn’t make sense! If only they’d make .First() work as expected…