Custom Row Number to generate sequential number , using spreadsheet function

Sequential number is not officially supported with AppSheet, but this easy tricks could help some particular business requirement where the app creators need to generate the seq custom number or ID based on the rows, although there would not give much of flexibilities for numbering.

Solution.

Use Googlespreadsheet Expression of

ROW()

Snag_58bbc93

Snag_58bcb58

Even we have concurrent users, the added new rows will assing ID under usual [ID] field using uniqueid() expression. But spreadsheet formula will give the sequential number.

Even after row is deleted explicitely from app, the given row number will stay the same. But when we delete row from the spreadsheet directly, the expression will be revaluated naturally, then in turn give the new number.

@Takuya_Miyai

6 Likes

This is why you don’t use spreadsheet formulas for ID values; as long as they’re not used as the actual KEY you’re fine. :+1:

1 Like

This does not work sometimes when you create a report on creation of new record. It returns something like this in our sheets order acceptance/NaN-V1.pdf. “NaN” is actually the number inside sheet using an arrayformula.

That s because workflow is firing before the spreadsheet calc is returning the value.

1 Like

I understood that and do you know any work around to tackle that ?

Also i have an expression like this- “300”&year(today())&0&[_RowNumber]

but its returning the value like this

[_rowNumber] is better to be avoided to use for any expressions, otherwise it would be duplicated among the concurrent users.