# Sorting a Custom List

**URL:** <https://forum.adalo.com/t/sorting-a-custom-list/12064>\
**Category:** Get Help\
**Created:** [April 30, 2021, 4:52pm UTC](https://forum.adalo.com/t/sorting-a-custom-list/12064 "2021-04-30T16:52:08Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![g.brown](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@g.brown](https://forum.adalo.com/u/g.brown)\
**Post date:** [April 30, 2021, 4:52pm UTC](https://forum.adalo.com/t/sorting-a-custom-list/12064/1 "2021-04-30T16:52:08Z")

</div>

I know this has been queried before, I am just wondering if the feature has been added.  
As per the photo, I have a custom list of Wineries and the name of a wine.  
Adjacent to these dynamic text fields is a score. This is calculated based on user preferences and the attributes of the Current wine.  
Can I sort the custom list of wines based on this “score” value?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/f/f070334b47d94aaf9e21ad4c4e7b10f226e3246c.png)

---

<div class="post-metadata">

**Author:** ![Yongki](https://avatars.discourse-cdn.com/v4/letter/y/7c8e57/32.png) [@Yongki](https://forum.adalo.com/u/Yongki)\
**Post date:** [April 30, 2021, 10:06pm UTC](https://forum.adalo.com/t/sorting-a-custom-list/12064/2 "2021-04-30T22:06:33Z")

</div>

Sorting only works for existing property not formula, you need to make those formula and fill the property with it.

---

<div class="post-metadata">

**Author:** ![g.brown](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@g.brown](https://forum.adalo.com/u/g.brown)\
**Post date:** [May 1, 2021, 1:12am UTC](https://forum.adalo.com/t/sorting-a-custom-list/12064/3 "2021-05-01T01:12:02Z")

</div>

I thought so, thank you.  
I tried to execute the alternative you suggested but cannot figure out how to fill in a property with a formula.  
Have you any insight there?

---

<div class="post-metadata">

**Author:** ![Yongki](https://avatars.discourse-cdn.com/v4/letter/y/7c8e57/32.png) [@Yongki](https://forum.adalo.com/u/Yongki)\
**Post date:** [May 1, 2021, 1:29am UTC](https://forum.adalo.com/t/sorting-a-custom-list/12064/4 "2021-05-01T01:29:47Z")

</div>

You probably need additional collection to accomodate this, but it will be easier to see your collections relationship first.

---

<div class="post-metadata">

**Author:** ![g.brown](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@g.brown](https://forum.adalo.com/u/g.brown)\
**Post date:** [May 1, 2021, 2:16am UTC](https://forum.adalo.com/t/sorting-a-custom-list/12064/5 "2021-05-01T02:16:24Z")

</div>

I see.  
If you wouldn’t mind…  
The RDBMS is attached.

In the “Wines” collection the properties: acidic value, dry value, etc are binary and take values of 1 or 0  
In the “User” Collection, the “weights” take values between 0 and 1.

The “values” for each wine are constant for all users.  
The “weights” for each user are variable.  
Therefore the “Score” for each wine is different for every user.

The “Score” which is the value in the custom list I would like to sort by is the sum product of weights by value:  
(Acidic weight \* Acidic Value)+(Dry weight \* Dry Value) etc…

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/9/9e43a4ec878a6f8199c90e41fc771402450135e6.png)

Thank you

---

<div class="post-metadata">

**Author:** ![Yongki](https://avatars.discourse-cdn.com/v4/letter/y/7c8e57/32.png) [@Yongki](https://forum.adalo.com/u/Yongki)\
**Post date:** [May 1, 2021, 3:04am UTC](https://forum.adalo.com/t/sorting-a-custom-list/12064/6 "2021-05-01T03:04:35Z")

</div>

Hi @g.brown ,

Take a look at this cloneable app

> **[Winery collection](https://previewer.adalo.com/415acd4f-d389-4606-bdf1-8efc2370966f)**
>
> Built with Adalo

 ![Screen Shot 2021-05-01 at 10.02.47 AM](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/e/eb4a8732679af19c9a463e0e3638ead1ad3894ea.png)

It turns out, that this does not need additional collection, just total property in wine collection.

---

<div class="post-metadata">

**Author:** ![Victor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/victor/32/2054_2.png) [@Victor](https://forum.adalo.com/u/Victor)\
**Post date:** [May 1, 2021, 12:33pm UTC](https://forum.adalo.com/t/sorting-a-custom-list/12064/7 "2021-05-01T12:33:05Z")

</div>

Hi @g.brown,

Do I understand correctly, that you need to sort the wine **individually** for each user? E.g. user A is a fan of more Dry wines, so he should get them on top of his list, and user B is more Sweet wines fan, and he should get sweet wines on top?

The thing is, that you can’t sort a custom list based on a formula. So I think here you’ll need to create a “WinePrefs” collection with following fields:

- score
- user (user can have many WinePrefs, but WinePref belongs to one user)
- wine (wine can have many WinePrefs, but WinePref belongs to one wine)

Then you display WinePrefs list and you can sort it by score (and you can easily display wine info at this list).

The problem here is that you need to create WinePrefs for _each_ user and for _each_ wine, which may cause another set of problems…

Best regards, Victor.

---

<div class="post-metadata">

**Author:** ![g.brown](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@g.brown](https://forum.adalo.com/u/g.brown)\
**Post date:** [May 3, 2021, 1:56pm UTC](https://forum.adalo.com/t/sorting-a-custom-list/12064/8 "2021-05-03T13:56:04Z")

</div>

Hi Yongki,  
Thank you for making that. I tried the app, and couldn’t get a score other than zero, so I am not sure if it is sorting properly. But that aside, given your scerenshot, it seems you have sorted the wines by their overall score.  
How did did you calculate total property for each wine? Can it be unique for each user? ie. my score for Wine A will be different from your score for wine A but the attributes for wine A are the same for both of us.

---

<div class="post-metadata">

**Author:** ![g.brown](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@g.brown](https://forum.adalo.com/u/g.brown)\
**Post date:** [May 3, 2021, 2:01pm UTC](https://forum.adalo.com/t/sorting-a-custom-list/12064/9 "2021-05-03T14:01:46Z")

</div>

Hi Victor,  
Your understanding of my question is spot on.  
I considered this route, and it works fine for a small number of wines, but my initial incomplete database has 128 wines and the final one will have over 400.  
I think Adalo may just not be up to this task.

Thank you for replying,

Greg

---

<div class="post-metadata">

**Author:** ![Yongki](https://avatars.discourse-cdn.com/v4/letter/y/7c8e57/32.png) [@Yongki](https://forum.adalo.com/u/Yongki)\
**Post date:** [May 3, 2021, 10:59pm UTC](https://forum.adalo.com/t/sorting-a-custom-list/12064/10 "2021-05-03T22:59:34Z")

</div>

> [@g.brown](#):
>
> I tried the app

It is cloneable app, you can see indide of it after you clone it.

> [@g.brown](#):
>
> How did did you calculate total property for each wine?

 ![Screen Shot 2021-05-04 at 5.58.33 AM](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/6/62ddfb99aae154c7e92056be7d78ddabba0c0df1.png)  
 ![Screen Shot 2021-05-04 at 5.58.57 AM](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/b/b96bf3c73a45aaa9bc5f64fc347c567b7d125bc9.png)

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [May 13, 2021, 11:00pm UTC](https://forum.adalo.com/t/sorting-a-custom-list/12064/11 "2021-05-13T23:00:08Z")

</div>

Closed on May 13, 2021, 11:00pm UTC

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