Auto Number

Can we create auto number while adding data? I use GSheet for Database.

0 7 5,607
7 REPLIES 7

I’m afraid that’s not going to work. If two users or more are using the app at the same time, multi records will have the same number.

Steve
Platinum 4
Platinum 4

This article likely applies:

@Bambang_Christianto - can you clarify if this “auto number” has to be the key, or just a visible sequential number?

If you have another column for the unique key (let’s say you use UNIQUEID() in the Initial Value), then I think you could create another Virtual Column (let’s say call it [number]) with:

  1. Try using an appformula using ROW()-1… or
  2. use an ARRAYFORMULA in your Gsheet so that it automatically creates the number for each row. (eg: =arrayformula(ROW(F2:F10)-1). If you go the gsheet route, you should add an IF condition just before the ROW calculation to prevent the arrayformula from expanding past blank rows… There are other ways to limit the auto expansion as well, but it depends on your data structure.

Depends if the number is the record key…

Would be ([_ROWNUMBER] - 1). ROW() is a spreadsheet function.

You could also try COUNT(MyTable[_ROWNUMBER]).

oops… mixing topics. Thanks for catching!

Thank you for the Solution, I will try it.

can you clarify if this “auto number” has to be the key, or just a visible sequential number?

YES the Auto Number I will use as the Key.

Top Labels in this Space