Sort by vote:count in a repeating group

I have a votes field in my Products data type. It is a list of users who have upvoted.

In a Repeating Group (RG) I have added a votes:count to show total votes.
How do I sort the RG using votes:count ( high or low)?
In RG Conditionals, I used Products as my data source but then can not figure out how to sort on votes:count.
I tried using the "Change Which Type " in the sort choices but dont see how to sort on the votes:count.

1 Like

You can not sort by :count. You need a number field on the Products data type which you increment when a user votes for the product.

Can I take that field “votes” which is a list and format it as a number or something like that for the search function?

I need to keep it in the user list format because I use it to check if the user has already voted.

Or can I create a new field in Products called voteCount which is a number but one that takes my votes list and counts it? That will make it easier as I do not have to go back and change some of the other logic I have for the votes (as a list of users).
Thanks.

Yes, that’s what I meant. You can simply +1 the number field when you add a user to the user list.

Thanks. I followed your suggestion. That was the ticket.

1 Like

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