Can we rank user list according to a collection (in relation with users)

Hey Guys,

PROBLEM

I am developing an app for my new startup, an MVP basically to test run. On the home page, I have created a list. I want to rank it according to the skills that match.

Actually skill is a collection. A user can have many skills and a skill can have many users.

If β€˜A’ has 3 skills - x,y,z and I want to create the ranking of the list in such a way that a user having more of the x,y,z skills comes at the top of the list.

Is this possible and how can it be done?

Please let me know. Everything else is made by me. But I am stuck here. Please do help.

1 Like

We don’t currently have a way to sort by count of related records, but what you can do as a work around is create a number property on your users collection called Number of Skills, then whenever a user adds a skill, have an action that updates the user and sets the value of the number of skills to be [Logged in User > Number of Skill] + 1

I had thought about that. But I need to match the skills by name. Like if someone is looking for people with skill 1, skill 2, skill 3, I show them people having 3 or 2 or 1 of those skills.
How do I do it?

Edit : I’m dumb, I do not checked the date T.T
I just lose 1H to do a new testing project.