# Order by id - airtable base

**URL:** <https://community.glideapps.com/t/order-by-id-airtable-base/60843>\
**Category:** Ask for Help\
**Created:** [April 22, 2023, 1:46pm UTC](https://community.glideapps.com/t/order-by-id-airtable-base/60843 "2023-04-22T13:46:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![GK123](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gk123/32/40613_2.png) [@GK123](https://community.glideapps.com/u/GK123)\
**Post date:** [April 22, 2023, 1:46pm UTC](https://community.glideapps.com/t/order-by-id-airtable-base/60843/1 "2023-04-22T13:46:29Z")

</div>

Hi.  
I have a table of purchases, in a AirTable base.  
I need to keep this table order by created time (or Id), old at the top and new at the end.  
For some reason, from time to time, the order of the rows is changed and I don’t know how to keep it in the same order.  
It causes bugs in the app.

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [April 22, 2023, 1:50pm UTC](https://community.glideapps.com/t/order-by-id-airtable-base/60843/2 "2023-04-22T13:50:47Z")

</div>

You could apply a sort to your lists/ collections inside Glide. To grab the latest date you could do a rollup and return the Max.

If there is a solution using Glide is there any other reasons you need your data sorted in AirTable specifically?

---

<div class="post-metadata">

**Author:** ![GK123](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gk123/32/40613_2.png) [@GK123](https://community.glideapps.com/u/GK123)\
**Post date:** [April 22, 2023, 2:05pm UTC](https://community.glideapps.com/t/order-by-id-airtable-base/60843/3 "2023-04-22T14:05:31Z")

</div>

There isn’t a specific need to sort the data in AirTable.  
Can you explain how exactly I need to use the rollup ?

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [April 22, 2023, 2:20pm UTC](https://community.glideapps.com/t/order-by-id-airtable-base/60843/4 "2023-04-22T14:20:32Z")

</div>

Assuming you have a MULTIPLE relation… do a Rollup via that relation, target your created time and return the ‘Latest’

---

<div class="post-metadata">

**Author:** ![GK123](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gk123/32/40613_2.png) [@GK123](https://community.glideapps.com/u/GK123)\
**Post date:** [April 22, 2023, 2:58pm UTC](https://community.glideapps.com/t/order-by-id-airtable-base/60843/5 "2023-04-22T14:58:03Z")

</div>

Do you think it would work if:  
Each user has multiple purchases, and I need to find the latest one for each user and insert it into a column in the users’ table?

---

<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:** [April 22, 2023, 3:22pm UTC](https://community.glideapps.com/t/order-by-id-airtable-base/60843/6 "2023-04-22T15:22:50Z")

</div>

- Create a multiple relation from your Users table to your Purchases table, matching the UserID/Email (whichever you have) in each.
- Then do the rollup as Eric described through that relation
- That should give you the latest date for each user
