Row number formula (Items auto-number position in invoice)

Hello Grist Team!
In doc i find ROW()
As far as I understand, the formula should return the line number for widget, for example:

ROW($id)

This is right?
Adding this formula should remove many questions about auto-numbering rows.

Sure, when it’s implemented. Meanwhile, the best ways I know are:

  1. taking manualSort in account:
table.lookupRecords(sort_by="manualSort").id.index($id)
  1. taking only the raw order in account:
table.all.id.index($id)
1 Like

Thank you @jperon for you help!
Just now try

Items.lookupRecords(Invoice=$Invoice).id.index($id)+1

Works for my Items in Invoice!

Depending on your use case, adding a sort_by clause could be a good idea (for example to sort by date).

1 Like