Auto Increment doesnt work

On Submit, I have used Increment of 1 on a Number column, it doesnt update?

Are you incrementing a value on the same row of the new form submission?

Yes Robert on the same row, of the same sheet.

Can I ask what the use case is? What are you trying to accomplish by incrementing a value you just submitted?

I want an unique identifier for each row. Like a typical AutoIncrement Primary key in a Database for each row.

If you just want a unique identifier, you should either use Row ID or the Unique Identifier special value.

If you actually want a human readable auto-incrementing string, check the thread below:

2 Likes

Thank you Darren so much!, This trick solved the purpose by using this formula:

=ARRAYFORMULA(ROW(A1:A999)-0)

That formula looks a bit dangerous to me - you might find a “few” extra rows in your spreadsheet.

It might be better written as:

=ARRAYFORMULA(ROW(A1:A)-0)
5 Likes

Agree! Thank you sir!

This finally worked, with an IF condition:
=ARRAYFORMULA(IF(A2:A<>"",ROW(A2:A)-1,""))

If you are using that as reference ID for creating relations, make sure you never delete any rows from Glide or from your spreadsheet because it will throw off all your relations.

A better way to do this would be using a rollup to count number of form entries, adding 1 to that and passing that value as a screen column when you create a new form.

I do not fully understand the approach you are suggesting. However, based on what I get, tagging or coupling the count number to the UI Screen might create duplicate numbers in a multi-user concurrent Save scenario. Such counter numbers should be always be handled at the server side to avoid duplication.