# Show Latest row Entry for a certain user

**URL:** <https://community.glideapps.com/t/show-latest-row-entry-for-a-certain-user/64183>\
**Category:** Ask for Help\
**Created:** [July 20, 2023, 6:16pm UTC](https://community.glideapps.com/t/show-latest-row-entry-for-a-certain-user/64183 "2023-07-20T18:16:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mina\_Jafari](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mina_jafari/32/61842_2.png) [@Mina\_Jafari](https://community.glideapps.com/u/Mina_Jafari)\
**Post date:** [July 20, 2023, 6:16pm UTC](https://community.glideapps.com/t/show-latest-row-entry-for-a-certain-user/64183/1 "2023-07-20T18:16:37Z")

</div>

Hi,  
I have a table (Product) that stores **items** , the **price** , and the **person** who set the price. Every time the price of an item is changed, the date is also stored. So, every change creates a new row in my Glide Table.

I want to use the table **Product** to create a table component in my app with the following columns:

1. item
2. person
3. price  
And the rows in my table can have repeated items but not the same user for the same item.

For example, this is possible  
Apple | Jack | 2$  
Apple | Amy | 3$  
Banana | Jack | 4$

For example, this is NOT possible  
Apple | Jack | 2$  
Apple | Jack | 3$

how can I only show the latest price set by the user for an item?

---

<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:** [July 21, 2023, 1:07am UTC](https://community.glideapps.com/t/show-latest-row-entry-for-a-certain-user/64183/2 "2023-07-21T01:07:11Z")

</div>

How do you let people “change” the price? Is it via a form or an edit screen?

If it’s an edit, are they editing the same item? What’s your use case for only storing the last change, in that case?

---

<div class="post-metadata">

**Author:** ![Mina\_Jafari](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mina_jafari/32/61842_2.png) [@Mina\_Jafari](https://community.glideapps.com/u/Mina_Jafari)\
**Post date:** [July 21, 2023, 8:06am UTC](https://community.glideapps.com/t/show-latest-row-entry-for-a-certain-user/64183/3 "2023-07-21T08:06:59Z")

</div>

People can set a new price using a custom action - which creates a new row that stores the date, price, name of user, and name of item.  
Think of it as a history table in the backlog, Im keeping track of all price changes for all items. But I just want to show users in the frontend the latest price from a specific member

---

<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:** [July 21, 2023, 9:30am UTC](https://community.glideapps.com/t/show-latest-row-entry-for-a-certain-user/64183/4 "2023-07-21T09:30:22Z")

</div>

> [@Mina\_Jafari](#):
>
> But I just want to show users in the frontend the latest price from a specific member

How is this specific member determined?  
For example, is it based on the signed in user? Or maybe the signed in user selects from a list?

In any case, I suspect that you can use a [Query](https://www.glideapps.com/docs/reference/computed-columns/query-column) column to get what you need.

---

<div class="post-metadata">

**Author:** ![Mina\_Jafari](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mina_jafari/32/61842_2.png) [@Mina\_Jafari](https://community.glideapps.com/u/Mina_Jafari)\
**Post date:** [July 21, 2023, 9:54am UTC](https://community.glideapps.com/t/show-latest-row-entry-for-a-certain-user/64183/5 "2023-07-21T09:54:49Z")

</div>

when the row is being added, the user ID is being stored in the row too.  
Ive used computed columns to get the user name from the user ID. Same goes for Item ID and Item name.  
Ive also used query and lookup to get the **latest price** a **user** has set for a certain **item**.  
So now when I am using the data table in my app, I dont want to show rows that have old prices. I want to show the row that is the most recent entry from that user for that item.

so in simple words, every user and item should only appear next to each other in a row _ **ONCE** _

---

<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:** [July 21, 2023, 10:25am UTC](https://community.glideapps.com/t/show-latest-row-entry-for-a-certain-user/64183/6 "2023-07-21T10:25:25Z")

</div>

Okay, try this:

- Create a Query column in the same table that targets the table and uses the following filters:  
– User is This Row → User  
– Item is This Row → Item
- Sort the Query by Date Added in descending order
- Add a Single Value column that takes the First → Date Added from the Query column
- Now you can filter a collection where Date Added is Single Value Date Added, and this should give you the most recent entry for each combination of Users & Items.

---

<div class="post-metadata">

**Author:** ![Mina\_Jafari](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mina_jafari/32/61842_2.png) [@Mina\_Jafari](https://community.glideapps.com/u/Mina_Jafari)\
**Post date:** [July 21, 2023, 10:35am UTC](https://community.glideapps.com/t/show-latest-row-entry-for-a-certain-user/64183/7 "2023-07-21T10:35:18Z")

</div>

The single value column was IT!  
thank you

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [July 22, 2023, 10:35am UTC](https://community.glideapps.com/t/show-latest-row-entry-for-a-certain-user/64183/8 "2023-07-22T10:35:48Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
