How to add simple counter field

Hi,
Im adding multiple rows to a table via the appsheet api.
I would like to update a column with counter of the current row. (E.g. 1, 2, 3,…) how to do it?

If I use max(…)+1 it does not work correctly as the rows hasn’t written yet so few rows gets the same number.
The table is in excel.
This is what im trying to get
1 itemx
2 itemy
3 itemz
Thanks

First, I’d like to point out that if you have multiple users entering rows, you will never have unique sequentially numbered rows. Each device has its own set of data (until a sync) and does not know what activity is happening on another device. When users add rows at about the same - especially if the device hasn’t been synced recently, those rows will get the same column value. In a multi-user, distributed system like AppSheet, this is virtually impossible to manage.

Depending on what you are trying to accomplish with the sequential row count column, maybe there is another way to achieve your end goal. What is the purpose of this column?

1 Like

I understand the unique issue. This is not the case.
All I want is to add a line number to the report.

I display few lines according to some filter, i would like to add line number so it is easy to see how many lines are shown.

The number can be virtual field

Hi @Yossi_Oulu,

I am currently accessing the community portal on mobile while I am in travel. So may be I have not understood your requirement correctly.

Still, you may wish to go through the post below , if it is similar in nature. I am sorry if I have misunderstood.