# Creating a ID based on number of appearances in the list above

**URL:** <https://community.glideapps.com/t/creating-a-id-based-on-number-of-appearances-in-the-list-above/26689>\
**Category:** Ask for Help\
**Created:** [May 12, 2021, 8:29am UTC](https://community.glideapps.com/t/creating-a-id-based-on-number-of-appearances-in-the-list-above/26689 "2021-05-12T08:29:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vijay](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vijay/32/3259_2.png) [@vijay](https://community.glideapps.com/u/vijay)\
**Post date:** [May 12, 2021, 8:29am UTC](https://community.glideapps.com/t/creating-a-id-based-on-number-of-appearances-in-the-list-above/26689/1 "2021-05-12T08:29:03Z")

</div>

I have a column which has say the following data:

A  
A  
B  
A  
A  
A  
C  
B  
B  
I want an ID column next to it that will have the following numbers:  
Item ID  
A 1  
A 2  
B 1  
A 3  
A 4  
A 5  
C 1  
B 2  
B 3

The ID is based on the sequence for only the item. When A appears first, its ID is 1, and in the next appearance it’s ID is 2 and so on.

Any help is well appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 12, 2021, 10:15am UTC](https://community.glideapps.com/t/creating-a-id-based-on-number-of-appearances-in-the-list-above/26689/2 "2021-05-12T10:15:58Z")

</div>

Do you have an already existing set of data for this, or you want an idea to start building it?

If you have not started, I would advise using a custom form, fill the item input into a user-specific column, make a relation from that usc to the existing item column, count the number of items using a rollup, then use a math column to add 1 to that count, use it as the ID for the next item.

If you have already had the list of items, I would advise using a Google Sheet formula for this.

---

<div class="post-metadata">

**Author:** ![AymenM](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aymenm/32/21370_2.png) [@AymenM](https://community.glideapps.com/u/AymenM)\
**Post date:** [May 12, 2021, 1:19pm UTC](https://community.glideapps.com/t/creating-a-id-based-on-number-of-appearances-in-the-list-above/26689/3 "2021-05-12T13:19:11Z")

</div>

Please continue to post your questions under the #help-how-to category, this will help us keep the community well organized. We appreciate your help !

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [May 12, 2021, 1:47pm UTC](https://community.glideapps.com/t/creating-a-id-based-on-number-of-appearances-in-the-list-above/26689/4 "2021-05-12T13:47:11Z")

</div>

Something like this?

> [@Rollup...by rank?](https://community.glideapps.com/t/rollup-by-rank/4551):
>
> Is there anyway to get the sort order of a list based on value to the maximum? With rollup, I can get the max, avg and min, but I’d love to get the RANK of a list based on these values. Sure, I can sort by the value in an inline list, but i wanted to retrieve the ordinal number of each row in this sorted list. I could always use a spreadsheet formula, but was hoping to avoid it.
