Auto Number

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

0 7 5,608
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