# How to generate unique no while adding new records

**URL:** <https://community.glideapps.com/t/how-to-generate-unique-no-while-adding-new-records/41120>\
**Category:** Ask for Help\
**Created:** [April 23, 2022, 8:26am UTC](https://community.glideapps.com/t/how-to-generate-unique-no-while-adding-new-records/41120 "2022-04-23T08:26:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mozib\_Khan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mozib_khan/32/36815_2.png) [@Mozib\_Khan](https://community.glideapps.com/u/Mozib_Khan)\
**Post date:** [April 23, 2022, 8:26am UTC](https://community.glideapps.com/t/how-to-generate-unique-no-while-adding-new-records/41120/1 "2022-04-23T08:26:14Z")

</div>

How to generate unique no while adding new records.

---

<div class="post-metadata">

**Author:** ![Dilon\_Perera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dilon_perera/32/85652_2.png) [@Dilon\_Perera](https://community.glideapps.com/u/Dilon_Perera)\
**Post date:** [April 23, 2022, 8:46am UTC](https://community.glideapps.com/t/how-to-generate-unique-no-while-adding-new-records/41120/2 "2022-04-23T08:46:26Z")

</div>

Hi @Mozib_Khan,

Welcome to the community 🥳

Here how :

> [@How do I create an auto-incrementing row number with Glide Tables?](https://community.glideapps.com/t/how-do-i-create-an-auto-incrementing-row-number-with-glide-tables/39572):
>
> This is a question that comes up a lot, so creating this topic to use as a reference. Typically, there are two distinct use cases when it comes to auto-incrementing row numbers. Use Case 1: – We need to generate a Part Number, or an Order Number, or an Employee ID. Once the number is generated, it should never change, even if rows are deleted. – The general approach for this use case is to maintain a static counter, use it to craft a suitably formatted ID, and increment it by one every time…

Thank you

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [April 23, 2022, 8:47am UTC](https://community.glideapps.com/t/how-to-generate-unique-no-while-adding-new-records/41120/3 "2022-04-23T08:47:28Z")

</div>

Hi @Mozib_Khan 👋

To generate a unique number when adding a record, have you tried using the “Row ID” column?

When a new record is added, a new random string of text and numbers should be added in your row ID column.

---

<div class="post-metadata">

**Author:** ![Mozib\_Khan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mozib_khan/32/36815_2.png) [@Mozib\_Khan](https://community.glideapps.com/u/Mozib_Khan)\
**Post date:** [April 23, 2022, 8:53am UTC](https://community.glideapps.com/t/how-to-generate-unique-no-while-adding-new-records/41120/4 "2022-04-23T08:53:47Z")

</div>

I need a unique string like ‘Prefix000001’. Yes using row Id I am able to generate unique no only.

---

<div class="post-metadata">

**Author:** ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)\
**Post date:** [April 23, 2022, 9:00am UTC](https://community.glideapps.com/t/how-to-generate-unique-no-while-adding-new-records/41120/5 "2022-04-23T09:00:01Z")

</div>

Ah! My apologies for misunderstanding your initial question.

I think @Robert_Petitto has created a video to address your issue exactly:

[Custom & unique user codes](https://community.glideapps.com/t/create-a-referral-code-system-with-custom-and-unique-user-codes/37944)

---

<div class="post-metadata">

**Author:** ![Mozib\_Khan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mozib_khan/32/36815_2.png) [@Mozib\_Khan](https://community.glideapps.com/u/Mozib_Khan)\
**Post date:** [April 23, 2022, 9:01am UTC](https://community.glideapps.com/t/how-to-generate-unique-no-while-adding-new-records/41120/6 "2022-04-23T09:01:18Z")

</div>

Yes, I am watching it.  
Thanks @nathanaelb
