Mustache Syntax for getting the Last Row in Model?

{{$}} (where N is the row index) will get you FIELD from row N in a model. Is it possible to get the last row in the model this way? {{$}} or something?


Depends on what you’re trying to do - it’s fairly simple if you want to update a field (on a newish version of Skuid) or run a branch action. Both can take formulas for doing a calculation, so you just need to do a modellookup that finds the last row of the model. It’s something like…

Add a ui-only formula field (uiIndex) on the object, number, and have the formula be {{index}} (returns the row #).

In the update as result of formula, do something like MODEL_LOOKUP(“model”,“FieldYouWant”,“uiIndex”,{{$}} - 1)