.First() not returning the first row in a sorted table

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?

I have a similar piece of functionality in one of my projects. I use .min(), which isn’t dependent on the sort order of the rows.

Dear @Bon_Champion,

I hope https://coda.io/formulas#Sort will give you the right direction :bulb:

Best wishes for 2019 :stars:


Sort worked! Still curious why First wouldn’t return the first displayed row. The documentation could definitely be clearer in this regard.

1 Like