Sorting Repeating Group with Custom states

Hello guys, I have a repeating group displaying a list of products, but I’m trying to sort them by the number of votes they have from highest to lowest. I’m trying to achieve that with custom states. I created a data field named “votes count” in my product type, with a type “number” and I add the number of product votes +1 to the data field “votes count” I then wrote a conditional that" When the custom state value is (Highest to Lowest votes), change the data source to sort the RG by votes count. But I’m getting an error msg in the conditional tab, please help.

Hi there, @mubaraqishola23… if I am seeing things correctly, you have a very simple error. The second Search for Products in the last screenshot is part of a new condition, but you want it to be the data source of the condition above it. So, remove the last condition, select Data source from the dropdown above that condition, and enter the Search for Products there (just like you did in the first condition in the screenshot).

Hope this helps.


I get it now, I didn’t define the conditional, instead I wrote the action in the When area Thanks

1 Like