Sort by Votes Option

Hello everybody,
I had been trying to make a rank sort of thing, where the list would be sorted based on votes (or let’s say followers) but I keep struggling as I do not seem to get an option to sort it based on counts. Could anyone please advise me on this? Thank you.

You’ll have to create a list containing the total votes or count of followers. then sort list by high to low or low to high depending on what you need to sorting to be on.

Let me know if it works.

1 Like

I have got a list of followers but I do not get the option to sort it by high or low. Do you please know how to change this? Thank you for your response.

I’m not sure I can give you a clearer answer until you put in a video or a image of your screen.

But let me try. You can sort either on alphabets or numbers/ counts. If you (as a user) have let’s say ‘x’ count of followers, you need to have the follower count of ‘x’ showing in the list and then sort on the count. You can also sort alphabetically but I’m guessing that’s not what you want.

I added the count (which represents the number of followers to particular user) to the list to each user and still do not get the option to sort it based on the number. There is only sorting alphabetically, based on date, etc. I created the following and followers according to the video on YT so there should not be an issue :worried:

I could sort the list from high to low based on count. In fact, I tried it before I sent you my last reply and only then told you that it would work. I’m not sure why you aren’t getting it. I’ll try again in a couple of hours and send you a pic so you can see.

Are you sure the that follower count is a list item? You can sort it only if it is already in the list. Dates are default so it doesn’t have to be in the list.

I created followers as a property for user so it is a list of users with count added. Might that be an issue? If you could send a pic it would be amazing. Thanks.

Do you think you could please make a short video explaining?

Haven’t had the time so far @Tommen. Will try to do it over the weekend.

1 Like

I will try to describe the way I did it, maybe someone will spot a mistake :slight_smile: I followed the video on how to make followers/following for user, as it is basically same concept.

I created an 2x item-user relationship (follower and following). It would create an option for user to follow an item (like) and item would accumulate followers (likes).

In the item’s profile I created 2 buttons (like, dislike).
Like - updates current item’s followers by adding logged in user. And logged in user’s liked items by adding current item.

Dislike button is opposite.

I hope this is helpful, will appreciate any kind of feedback. Thank you :slight_smile:

Does anyone have any ideas please?

Hi Tommen,

Here’s the list by descending order.

You have to have the item and rank/count both in the database. The rank/count should be a number property and not a text property. You’ll get high to low sorting only if the property is number. Otherwise it is only alphabetically or created date etc.

Lemme know if this sorts the matter for you.

Hi Arun, thank you for your help! However, it is not really what I am looking for. What I would like to achieve is to get votes by voters who can “like/dislike” an item and them I would sort it out based on number of likes. Do you please have any ideas with that? :slight_smile:

Create a new property in the collection called “likes count”. Obviously it will be a number property.
Add click action for likes.
Click action will be “update collection” for likes count.
Magic text will be “likes count +1”.

Add in a text box next to the likes. Make it a list as I did it in the video and magic text will be likes count.
I think I helped all I could without seeing your collection or app screen. :slight_smile:
You have to post screen shots of your collection if you want more help.

2 Likes

Thanks a lot Arun, I finally manged to figure it out! Saved my another headache :smile: :slightly_smiling_face:

1 Like