# Serial number in glide tables

**URL:** <https://community.glideapps.com/t/serial-number-in-glide-tables/36002>\
**Category:** Ask for Help\
**Created:** [December 16, 2021, 6:52am UTC](https://community.glideapps.com/t/serial-number-in-glide-tables/36002 "2021-12-16T06:52:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sales\_Manager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sales_manager/32/16172_2.png) [@Sales\_Manager](https://community.glideapps.com/u/Sales_Manager)\
**Post date:** [December 16, 2021, 6:52am UTC](https://community.glideapps.com/t/serial-number-in-glide-tables/36002/1 "2021-12-16T06:52:06Z")

</div>

Hi  
How to create a serial number for each row in glide tables?

---

<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:** [December 16, 2021, 6:58am UTC](https://community.glideapps.com/t/serial-number-in-glide-tables/36002/2 "2021-12-16T06:58:44Z")

</div>

You mean like an auto-incrementing number?  
There are a few different ways to approach this - can you describe your use case?

If you just need a random unique key for each row, then you should use a [RowID column](https://docs.glideapps.com/all/topics/computed-columns/primary/row-ids).

---

<div class="post-metadata">

**Author:** ![Sales\_Manager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sales_manager/32/16172_2.png) [@Sales\_Manager](https://community.glideapps.com/u/Sales_Manager)\
**Post date:** [December 16, 2021, 7:36am UTC](https://community.glideapps.com/t/serial-number-in-glide-tables/36002/3 "2021-12-16T07:36:17Z")

</div>

Yes, I want auto-incrementing number

for example:  
Ticket #1, Ticket #2

Every new row is a new ticket

---

<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:** [December 16, 2021, 7:50am UTC](https://community.glideapps.com/t/serial-number-in-glide-tables/36002/4 "2021-12-16T07:50:12Z")

</div>

Okay, here is one way to do that:

> [@Unique Numbers](https://community.glideapps.com/t/unique-numbers/35039/8):
>
> Here you go…

One note of caution though: the above technique is subject to a concurrency issue, whereby if you have two or more users adding a record at the same time, then there is a possibility that you could end up with two records having the same ID. So it’s only really suitable if new records are added infrequently.

For high volume usage, the only way that I am aware of to do this and guarantee uniqueness is to delegate the ID assignment to a 3rd party. Either something like Apps Script or an integration tool such as Integromat.

---

<div class="post-metadata">

**Author:** ![Sales\_Manager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sales_manager/32/16172_2.png) [@Sales\_Manager](https://community.glideapps.com/u/Sales_Manager)\
**Post date:** [December 16, 2021, 8:38am UTC](https://community.glideapps.com/t/serial-number-in-glide-tables/36002/5 "2021-12-16T08:38:03Z")

</div>

I think this process is rather complicated, is there an easier way than this?

---

<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:** [December 16, 2021, 8:57am UTC](https://community.glideapps.com/t/serial-number-in-glide-tables/36002/6 "2021-12-16T08:57:11Z")

</div>

There are other options that involve Glide computed columns or Spreadsheet formulas, but I wouldn’t consider any of them simpler than this approach. It’s not something that Glide provides natively, so a little creativity is required.

---

<div class="post-metadata">

**Author:** ![Sales\_Manager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sales_manager/32/16172_2.png) [@Sales\_Manager](https://community.glideapps.com/u/Sales_Manager)\
**Post date:** [December 19, 2021, 8:50pm UTC](https://community.glideapps.com/t/serial-number-in-glide-tables/36002/7 "2021-12-19T20:50:43Z")

</div>

I found a much easier way, By adding only 4 columns  
I hope everyone can benefit from it.

[![]( " - YouTube") ](https://www.youtube.com/watch?v=8C2hRd58OGo)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [December 20, 2021, 1:00am UTC](https://community.glideapps.com/t/serial-number-in-glide-tables/36002/8 "2021-12-20T01:00:47Z")

</div>

Just be careful with that method, because if two people submit the form at the same time, you will definitely get duplicate ticket numbers because the math happens on each user’s device. So each user will only see 6 tickets, and if they both submit at the same time, the math on both devices will increment the number to 7, so both submissions will have a ticket number of 7. Be sure to test with multiple devices at the same time.

Also, I would not have used an On Submit action. You should already have your next available number that you can include in the form as a Column Value component. So instead of an On Submit action, you add a Column Value component which passes the value through the form automatically upon submit.

---

<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:** [December 20, 2021, 1:54am UTC](https://community.glideapps.com/t/serial-number-in-glide-tables/36002/9 "2021-12-20T01:54:16Z")

</div>

Just adding to what Jeff said (which is all 100% correct)…

- Your “mo” column is redundant. You could simply just use +1 in your math formula.
- Because the next ticket number is based on the current number of rows, if you ever delete any rows then things will get messed up. So that’s another thing to be careful of.

Have a read through the below thread for more discussion on this topic, and a couple more possible solutions.

> [@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.

Like I said, there are a number of different ways to approach this, and several different potential solutions. None of them is perfect, and there is no one size fits all. It just depends on the specific use case.

---

<div class="post-metadata">

**Author:** ![Sales\_Manager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sales_manager/32/16172_2.png) [@Sales\_Manager](https://community.glideapps.com/u/Sales_Manager)\
**Post date:** [December 20, 2021, 6:17am UTC](https://community.glideapps.com/t/serial-number-in-glide-tables/36002/10 "2021-12-20T06:17:32Z")

</div>

Yes, it is enough to create only two columns

![لقطة الشاشة 2021-12-20 090956](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/1/41fad21cc6d749b320fbac0a98a328a92941f4ec.png)  
 ![لقطة الشاشة 2021-12-20 091654](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/2/6281cef19a35781a504fc9ebc984ba3c23402a69.png)
