Hi, I’m adding an Upvote function to the RG. How can make use of buttons or dropdowns to sort it either by Popularity ( Count of upvotes ) or by latest ( created date )
I’m planning to have 2 button side by side
I want the RG to sort by upvote counts on clicking Popular
I want RG to sort by created date on clicking Latest
Hi there, @sanjuujosephh… I have done something very similar in one of my apps, and I used a dropdown that sits right above the repeating group. Then, do a
Sort by on the repeating group’s
Data source, and select
Change which field... for the
Sort by option. At that point, you will be able to select the dropdown as the dynamic field on which to sort, and that should get you down the path to making this work.
Hope this helps.
I have figured that out but I want to acheive something similar to this
How do I have 2 different sorting options to work on clicks?
You asked how you could make use of buttons or dropdowns to make it work, so it was implied that you hadn’t figured that out already. Great that you did, though, and if you had mentioned that, my response would have been different.
Anyway, if you want to sort on a click, you will want to make use of the
Element Actions >> Repeating Group >> Display list option in the workflow, and add the
:sorted option to the end of the
Bro, that worked.
Thanks a lot
If Bubble paid you a quarter for every successful forum help you’ve provided, you’d be able to retire by now.
Too kind, @SerPounce, too kind… and I’m still not playing cards with you anytime soon!
This topic was automatically closed after 70 days. New replies are no longer allowed.