# Deleting a specific table raw, next items get re-ordered numbers

**URL:** <https://community.glideapps.com/t/deleting-a-specific-table-raw-next-items-get-re-ordered-numbers/66607>\
**Category:** Ask for Help\
**Created:** [September 28, 2023, 10:34pm UTC](https://community.glideapps.com/t/deleting-a-specific-table-raw-next-items-get-re-ordered-numbers/66607 "2023-09-28T22:34:51Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastian\_Gonzalez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sebastian_gonzalez/32/64610_2.png) [@Sebastian\_Gonzalez](https://community.glideapps.com/u/Sebastian_Gonzalez)\
**Post date:** [September 28, 2023, 10:34pm UTC](https://community.glideapps.com/t/deleting-a-specific-table-raw-next-items-get-re-ordered-numbers/66607/1 "2023-09-28T22:34:51Z")

</div>

Hey there. I have an inventory table, but when I delete a specific item in a specific raw, the  
next items have to take new numbers sorted from low to high, Is there any way to do this???

 ![glide](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/3/b3182ee427456a6301a309c1505207b531374a75.jpeg)

---

<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:** [September 28, 2023, 11:51pm UTC](https://community.glideapps.com/t/deleting-a-specific-table-raw-next-items-get-re-ordered-numbers/66607/2 "2023-09-28T23:51:22Z")

</div>

You need the second use case below:

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

---

<div class="post-metadata">

**Author:** ![Sebastian\_Gonzalez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sebastian_gonzalez/32/64610_2.png) [@Sebastian\_Gonzalez](https://community.glideapps.com/u/Sebastian_Gonzalez)\
**Post date:** [September 29, 2023, 12:49am UTC](https://community.glideapps.com/t/deleting-a-specific-table-raw-next-items-get-re-ordered-numbers/66607/3 "2023-09-29T00:49:52Z")

</div>

That is what I was looking for, thank you!  
I have another question if you could help me. Is there any way to sort numeric elements from an excel column?

 ![glide2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/1/f124dffd4f6d01dc47df75787042a49427c1136d.jpeg)

---

<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:** [September 29, 2023, 1:17am UTC](https://community.glideapps.com/t/deleting-a-specific-table-raw-next-items-get-re-ordered-numbers/66607/4 "2023-09-29T01:17:28Z")

</div>

So if you delete “3”, then 4 should become 3, 5 should become 4 etc?

---

<div class="post-metadata">

**Author:** ![Sebastian\_Gonzalez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sebastian_gonzalez/32/64610_2.png) [@Sebastian\_Gonzalez](https://community.glideapps.com/u/Sebastian_Gonzalez)\
**Post date:** [September 29, 2023, 1:18am UTC](https://community.glideapps.com/t/deleting-a-specific-table-raw-next-items-get-re-ordered-numbers/66607/5 "2023-09-29T01:18:30Z")

</div>

Exactly, that´s what I need

---

<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:** [September 29, 2023, 1:21am UTC](https://community.glideapps.com/t/deleting-a-specific-table-raw-next-items-get-re-ordered-numbers/66607/6 "2023-09-29T01:21:35Z")

</div>

- Create a rowID column for that table.

- Add a lookup pointing to that rowID column.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/8/e8cf66c199b94d32045da2aaa42a2c6580d0181d.jpeg)

- Add a “Find element index” column to get the row index.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/4/24b421117ff93302d1b772a2c9f22c904d25bd5a.jpeg)

Now if you want the index to start from 1, add a Math column with the formula: Index + 1. Else you can keep it as is. The index will adjust if you delete a row. However, as it’s a computed column, you won’t be able to edit it manually.

---

<div class="post-metadata">

**Author:** ![Sebastian\_Gonzalez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sebastian_gonzalez/32/64610_2.png) [@Sebastian\_Gonzalez](https://community.glideapps.com/u/Sebastian_Gonzalez)\
**Post date:** [September 29, 2023, 1:31am UTC](https://community.glideapps.com/t/deleting-a-specific-table-raw-next-items-get-re-ordered-numbers/66607/7 "2023-09-29T01:31:46Z")

</div>

Thanks for your answer and your help!, Yes, I need to update the ITEM column that comes from an excel sheet to behave like your Index column, Do you know how can I do that??

---

<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:** [September 29, 2023, 1:32am UTC](https://community.glideapps.com/t/deleting-a-specific-table-raw-next-items-get-re-ordered-numbers/66607/8 "2023-09-29T01:32:30Z")

</div>

Please try my suggestion above, it should work if I understand you right. Then you don’t need the Item column anymore.

---

<div class="post-metadata">

**Author:** ![Sebastian\_Gonzalez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sebastian_gonzalez/32/64610_2.png) [@Sebastian\_Gonzalez](https://community.glideapps.com/u/Sebastian_Gonzalez)\
**Post date:** [September 29, 2023, 1:36am UTC](https://community.glideapps.com/t/deleting-a-specific-table-raw-next-items-get-re-ordered-numbers/66607/9 "2023-09-29T01:36:01Z")

</div>

Your suggestion is perfect but can I use your INDEX column to update the ITEM column because the excel sheet has to be updated

---

<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:** [September 29, 2023, 1:51am UTC](https://community.glideapps.com/t/deleting-a-specific-table-raw-next-items-get-re-ordered-numbers/66607/10 "2023-09-29T01:51:33Z")

</div>

Then an alternative is using a formula inside Excel. I don’t have much experience there, can you use a formula like ROW() to get the row number?
