# How to filter transactions by latest/oldest date in layout

**URL:** <https://community.glideapps.com/t/how-to-filter-transactions-by-latest-oldest-date-in-layout/67610>\
**Category:** Ask for Help\
**Created:** [November 8, 2023, 7:44am UTC](https://community.glideapps.com/t/how-to-filter-transactions-by-latest-oldest-date-in-layout/67610 "2023-11-08T07:44:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattGlides](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@MattGlides](https://community.glideapps.com/u/MattGlides)\
**Post date:** [November 8, 2023, 7:44am UTC](https://community.glideapps.com/t/how-to-filter-transactions-by-latest-oldest-date-in-layout/67610/1 "2023-11-08T07:44:27Z")

</div>

I want the User to be able to see their transactions in the layout from either their most recent purchase to their oldest, or vice versa. If there is no way to do this then how do I, at the very least, just get the collection to display from the most recent instead of the oldest like it is currently doing?

---

<div class="post-metadata">

**Author:** ![Denis\_Mwendia](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/denis_mwendia/32/66168_2.png) [@Denis\_Mwendia](https://community.glideapps.com/u/Denis_Mwendia)\
**Post date:** [November 8, 2023, 8:44am UTC](https://community.glideapps.com/t/how-to-filter-transactions-by-latest-oldest-date-in-layout/67610/2 "2023-11-08T08:44:09Z")

</div>

Under option choose sort data there is “a to z” and “z to a” if you want it to appear from the latest one choose on “z to a”  
Or the allow pointing up

---

<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:** [November 8, 2023, 11:30am UTC](https://community.glideapps.com/t/how-to-filter-transactions-by-latest-oldest-date-in-layout/67610/3 "2023-11-08T11:30:39Z")

</div>

> [@MattGlides](#):
>
> I want the User to be able to see their transactions in the layout from either their most recent purchase to their oldest, or vice versa.

- Add two identical collections, and set their sort order in opposite directions.
- Create a User Specific boolean column in the table your screen is attached to (or in the User Profile row)
- Add a Button (or any actionable component to the screen), and configure an action as follows:  
– If Boolean is empty, then Set Column Values-\>Boolean-\>true  
– Else if Boolean is not empty, then Set Column Values-\>Boolean-\>Clear Value
- Add opposite visibility conditions to your two collections. One should be visible when the boolean is checked, and the other should be visible when it is not.
