How do I sort a list of users?

hey guys I encountered a problem and was hoping I could get some help, okay so Basically I wanted to sort the following repeating group according to the number of votes a post has (as seen below)


I’ve set the votes as a list of users, so depending on how many users click on it the counter goes up.


The sort drop down consists of an option set and the field attribute corresponds to the field in the table i want to sort.


This is how i sort the repeating group, the created date option on the drop down works fine, but i get this error when i try to sort via votes


I’m assuming its because the list of users is stored as text, is there a work around?

Hey. Unfortunately you can’t sort by a list. You have to store the vote count as a integer on the thing (update it via db trigger or api wf every time.e a user votes) and then sort by that integer field

1 Like

Thanks for the reply, could you elaborate how I should do the db trigger, I’m fairly new to bubble

Much thanks, i will try it and let you know

This topic was automatically closed after 70 days. New replies are no longer allowed.