# Auto Increment doesnt work

**URL:** https://community.glideapps.com/t/auto-increment-doesnt-work/26394
**Category:** Ask for Help
**Created:** [May 4, 2021, 11:00am UTC](https://community.glideapps.com/t/auto-increment-doesnt-work/26394 "2021-05-04T11:00:40Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Pradeep\_Engineer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pradeep_engineer/32/25750_2.png) [@Pradeep\_Engineer](https://community.glideapps.com/u/Pradeep_Engineer)
#### Post date: [May 4, 2021, 11:00am UTC](https://community.glideapps.com/t/auto-increment-doesnt-work/26394/1 "2021-05-04T11:00:40Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [May 4, 2021, 11:04am UTC](https://community.glideapps.com/t/auto-increment-doesnt-work/26394/2 "2021-05-04T11:04:48Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Pradeep\_Engineer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pradeep_engineer/32/25750_2.png) [@Pradeep\_Engineer](https://community.glideapps.com/u/Pradeep_Engineer)
#### Post date: [May 4, 2021, 11:07am UTC](https://community.glideapps.com/t/auto-increment-doesnt-work/26394/3 "2021-05-04T11:07:13Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [May 4, 2021, 11:46am UTC](https://community.glideapps.com/t/auto-increment-doesnt-work/26394/4 "2021-05-04T11:46:37Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Pradeep\_Engineer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pradeep_engineer/32/25750_2.png) [@Pradeep\_Engineer](https://community.glideapps.com/u/Pradeep_Engineer)
#### Post date: [May 4, 2021, 11:52am UTC](https://community.glideapps.com/t/auto-increment-doesnt-work/26394/5 "2021-05-04T11:52:24Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [May 4, 2021, 12:09pm UTC](https://community.glideapps.com/t/auto-increment-doesnt-work/26394/6 "2021-05-04T12:09:59Z")

</div>

If you just want a unique identifier, you should either use Row ID or the [Unique Identifier](https://docs.glideapps.com/all/reference/values/special-values/unique-identifier) special value.

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

> [@Auto Numbering](https://community.glideapps.com/t/auto-numbering/20355):
>
> How to setting auto numbering that appear with a new order submit by a form button? Example, i have 3 form submitted. i need the first submitted form showing: 0001 - “form result; …” 0002 - “form result; …” 0003 - “form result; …” those 0001,0002,0003 auto generate by data backend.

---

<div class="post-metadata">

### Author: ![Pradeep\_Engineer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pradeep_engineer/32/25750_2.png) [@Pradeep\_Engineer](https://community.glideapps.com/u/Pradeep_Engineer)
#### Post date: [May 4, 2021, 4:04pm UTC](https://community.glideapps.com/t/auto-increment-doesnt-work/26394/7 "2021-05-04T16:04:12Z")

</div>

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

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

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [May 4, 2021, 4:09pm UTC](https://community.glideapps.com/t/auto-increment-doesnt-work/26394/8 "2021-05-04T16:09:37Z")

</div>

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

It might be better written as:

```auto
=ARRAYFORMULA(ROW(A1:A)-0)

```

---

<div class="post-metadata">

### Author: ![Pradeep\_Engineer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pradeep_engineer/32/25750_2.png) [@Pradeep\_Engineer](https://community.glideapps.com/u/Pradeep_Engineer)
#### Post date: [May 5, 2021, 5:00am UTC](https://community.glideapps.com/t/auto-increment-doesnt-work/26394/9 "2021-05-05T05:00:43Z")

</div>

> [@Darren\_Murphy](#):
>
> `=ARRAYFORMULA(ROW(A1:A)-0)`

Agree! Thank you sir!

---

<div class="post-metadata">

### Author: ![Pradeep\_Engineer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pradeep_engineer/32/25750_2.png) [@Pradeep\_Engineer](https://community.glideapps.com/u/Pradeep_Engineer)
#### Post date: [May 5, 2021, 5:49am UTC](https://community.glideapps.com/t/auto-increment-doesnt-work/26394/10 "2021-05-05T05:49:35Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Manan\_Mehta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manan_mehta/32/13957_2.png) [@Manan\_Mehta](https://community.glideapps.com/u/Manan_Mehta)
#### Post date: [May 5, 2021, 6:22am UTC](https://community.glideapps.com/t/auto-increment-doesnt-work/26394/11 "2021-05-05T06:22:52Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Pradeep\_Engineer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pradeep_engineer/32/25750_2.png) [@Pradeep\_Engineer](https://community.glideapps.com/u/Pradeep_Engineer)
#### Post date: [May 5, 2021, 6:48am UTC](https://community.glideapps.com/t/auto-increment-doesnt-work/26394/12 "2021-05-05T06:48:58Z")

</div>

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.
