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?
Sorting only works for existing property not formula, you need to make those formula and fill the property with it.
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?
You probably need additional collection to accomodate this, but it will be easier to see your collections relationship first.
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…
Thank you
Hi @g.brown ,
Take a look at this cloneable app
It turns out, that this does not need additional collection, just total property in wine collection.
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.
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.
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
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.