# Glide pages: Sort data. Best experience

**URL:** <https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751>\
**Category:** Ask for Help\
**Created:** [July 1, 2022, 11:23am UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751 "2022-07-01T11:23:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Garik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/garik/32/44224_2.png) [@Garik](https://community.glideapps.com/u/Garik)\
**Post date:** [July 1, 2022, 11:23am UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/1 "2022-07-01T11:23:04Z")

</div>

Hi!  
How do you sort data for end users? I have different fields in my table. For example as an end user I wanna sort my data by price. Then I want to sort it by rating and etc. How to do it the best way?

---

<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:** [July 1, 2022, 2:36pm UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/2 "2022-07-01T14:36:46Z")

</div>

Hey Igor!

See if this helps you.

> **[Sort](https://docs.glideapps.com/all/topics/ux/sort)**
>
> Sort your lists based on criteria

---

<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 2, 2022, 1:25am UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/3 "2022-07-02T01:25:16Z")

</div>

So do you want to sort it by price AND rating or just price? Say if the price is equal between 2 items then show whatever has the better rating?

If you’re talking about the list sort (not the in-app sort), there would be some sort of math tricks if you want to do more than 2, else you can only sort a list by one column.

If you’re talking about the in-app sort, you can allow users to have multiple columns as choices to sort by, but not using more than one at a time.

---

<div class="post-metadata">

**Author:** ![Garik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/garik/32/44224_2.png) [@Garik](https://community.glideapps.com/u/Garik)\
**Post date:** [July 2, 2022, 3:25am UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/4 "2022-07-02T03:25:00Z")

</div>

> [@ThinhDinh](#):
>
> If you’re talking about the in-app sort, you can allow users to have multiple columns as choices to sort by, but not using more than one at a time.

Yes, I’m talking about in app sort. How to design it the best way for users and how to make it in Glide.

For example I will use Choice and Collection components with Rating and Price ↑↓.

1. How to make my Choice component change Collection component sorting?
2. How to show all items with price lower then 50$?

---

<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 2, 2022, 5:40am UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/5 "2022-07-02T05:40:22Z")

</div>

> [@Garik](#):
>
> How to make my Choice component change Collection component sorting?

A simple way to do this is to use two Collections, with each sorted in the opposite direction. And then use a user specific column to toggle the visibility of each. eg. if checked, collection A is visible, if not checked then collection B is visible.

> [@Garik](#):
>
> How to show all items with price lower then 50$?

Create an if-then-else column. If price is less than $50, then true. Use that column as the filter.

---

<div class="post-metadata">

**Author:** ![Garik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/garik/32/44224_2.png) [@Garik](https://community.glideapps.com/u/Garik)\
**Post date:** [July 2, 2022, 8:15am UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/6 "2022-07-02T08:15:39Z")

</div>

> [@Darren\_Murphy](#):
>
> And then use a user specific column to toggle the visibility of each. eg. if checked, collection A is visible, if not checked then collection B is visible.

Wow. Nice. Thank you.

> [@Darren\_Murphy](#):
>
> Create an if-then-else column. If price is less than $50, then true. Use that column as the filter.

Yes, it works. But how can user set the price from form or Choice component?

P.S. Still feeling like I don’t really understand Glide workflow.

---

<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 2, 2022, 8:29am UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/7 "2022-07-02T08:29:01Z")

</div>

> [@Garik](#):
>
> Yes, it works. But how can user set the price from form or Choice component?

Okay, so lets say you have a choice with three options: $20, $50, $100

- Write that choice to a User Specific column
- Use a Single Value column to apply the selected value to all rows
- Now adjust the if-then-else column slightly:  
– If Price is less than Single Value, then true
- And now filter in the same way… where the if-then-else column is checked

---

<div class="post-metadata">

**Author:** ![Garik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/garik/32/44224_2.png) [@Garik](https://community.glideapps.com/u/Garik)\
**Post date:** [July 2, 2022, 9:27am UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/8 "2022-07-02T09:27:45Z")

</div>

But what if my user is an anonymous visitor? I plan to use price filter mostly this way.

---

<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 2, 2022, 9:40am UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/9 "2022-07-02T09:40:19Z")

</div>

It will still work. The only difference with a user that is not signed in is that any selections that they make will not persist across multiple sessions.

---

<div class="post-metadata">

**Author:** ![Garik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/garik/32/44224_2.png) [@Garik](https://community.glideapps.com/u/Garik)\
**Post date:** [July 2, 2022, 1:04pm UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/10 "2022-07-02T13:04:37Z")

</div>

I’m doing something wrong, because I can’t see my User specific column in fields where I can write to.

 ![Screenshot 2022-07-02 at 19.54.59](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/9/a9b94970bc1c060c9934649233e5269c7a0e36c2.png)  
 ![Screenshot 2022-07-02 at 19.56.29](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/2/92c2e66bd3f10e627bce1d5a8b4ffb0a9718d1f4.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:** [July 2, 2022, 1:09pm UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/11 "2022-07-02T13:09:21Z")

</div>

It looks like the source table for your screen is not the People table.  
You’ll need the User Specific column in which ever table that screen is attached to.  
You can then use a Single Value column in your People table to apply the selection to all rows.

---

<div class="post-metadata">

**Author:** ![Garik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/garik/32/44224_2.png) [@Garik](https://community.glideapps.com/u/Garik)\
**Post date:** [July 2, 2022, 1:13pm UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/12 "2022-07-02T13:13:04Z")

</div>

I checked many times. It’s People.

 ![Screenshot 2022-07-02 at 20.11.36](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/1/6147a592388cba0ef5c7aaf28d49478dc6ff7120.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:** [July 2, 2022, 1:27pm UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/13 "2022-07-02T13:27:28Z")

</div>

That’s the source of the form container, not the screen.

You probably shouldn’t be using a form container there anyway, unless you’re planning to add a new row.

---

<div class="post-metadata">

**Author:** ![Garik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/garik/32/44224_2.png) [@Garik](https://community.glideapps.com/u/Garik)\
**Post date:** [July 2, 2022, 2:10pm UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/14 "2022-07-02T14:10:53Z")

</div>

Thank you! It works. Can we replicate this behaviour with text entry?

---

<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 2, 2022, 2:13pm UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/15 "2022-07-02T14:13:22Z")

</div>

Yes.

---

<div class="post-metadata">

**Author:** ![Garik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/garik/32/44224_2.png) [@Garik](https://community.glideapps.com/u/Garik)\
**Post date:** [July 2, 2022, 2:29pm UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/16 "2022-07-02T14:29:20Z")

</div>

Thank you Darren.

---

<div class="post-metadata">

**Author:** ![Garik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/garik/32/44224_2.png) [@Garik](https://community.glideapps.com/u/Garik)\
**Post date:** [July 4, 2022, 1:18pm UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/17 "2022-07-04T13:18:06Z")

</div>

Can we make custom search field at the top instead of standard search (that is not visible)?

As I understand it’s again User Specific column, but where to search?

---

<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 4, 2022, 1:23pm UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/18 "2022-07-04T13:23:16Z")

</div>

Yes, you can do that and there are several different approaches.

Here is one approach that I quite like, that is very simple.

- Use a text input component and target it at a user specific column
- Use a single value column in the table you wish to search that takes the user specific column value and applies it to all rows
- Add an if-then-else column to the same table:  
– If single value is empty, then true  
– If [search column] includes single value, then true
- Now use an inline list/collection, and filter it where the if-then-else column is checked.

---

<div class="post-metadata">

**Author:** ![Garik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/garik/32/44224_2.png) [@Garik](https://community.glideapps.com/u/Garik)\
**Post date:** [July 4, 2022, 1:45pm UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/19 "2022-07-04T13:45:03Z")

</div>

> [@Darren\_Murphy](#):
>
> – If [search column] includes single value, then true

I want to search all table like standard search does. Is it possible?

---

<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 4, 2022, 1:55pm UTC](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751/20 "2022-07-04T13:55:42Z")

</div>

That’s not what “standard” search does.  
Search in Pages is enabled at the component level, and only searches the data that that component refers to - not all tables.

But yes, if you wanted to search across multiple tables using this technique, it is possible. Probably the simplest way would be to add an extra collection for each table to be included in the search.

[Next page](https://community.glideapps.com/t/glide-pages-sort-data-best-experience/43751.md?page=2)
