thisRow = View.Last() does not respect sort order

Hi @Alexis_Hunt,

Thank you for posting a detailed walk-through here. This is something that’s been difficult to do in Coda and shouldn’t be, so I appreciate the setup that highlights how this causes more work than necessary.

For this instance, I’d say the best workaround is to create a named formula in the canvas and use your filter there. Then for the button, disable it for anything that is not the result of that named formula.

Thomas pinged me about your support ticket, so I took a peak at your doc and believe you had a canvas formula like this already:

[Active Afflictions].Filter(Stacks = [Active Afflictions].Stacks.Min()).Sort(true, Afflictions.Affliction).First()

If you name that formula “Target Affliction”, then you can use that in your button disable field with:

thisRow!=[Target Affliction]

This should do what you need, but you’re definitely correct that it shouldn’t take this much work to get there.

2 Likes