Random order list

How can I randomize the order of a repeating group? Thanks

1 Like

What are you trying to achieve here?

each artists can upload 2 songs into the music player but we dont want the songs to be next to each other in the list. I could sort them by song name instead of artist name or creation date but then songs starting with letters like Z may never be heard if enough artists sign up. so if the list of unheard songs can be randomized then i wont have to worry about this.

Check the attached screenshot for :random item

Is this the solution?

No, sadly i already tried this and it doesnt work. thanks for the help pligor, any other suggestions?

I think there is a way to randomize the order but unfortunately it will be the same random order for every user/viewing. The way Iā€™ve done that is by creating another ā€œsortā€ field, which takes a certain number of digits from the end ID number of the thing (you use ā€œtruncated from the endā€ for that). Since the ID is random (or at least seems like it), that should work.

No sorry cannot think of any other way rather than some silly ones that I have in mind:
like having an event triggered every second and fill up the list gradually by picking a random item everytime, which you remove from a temporary listā€¦ you donā€™t want the hear the rest of it!

But what we like about Bubble is that everything is straighforward without hackerish solutions. In this mindset I would suggest a feature request so that you could do Data source -> Do a search forā€¦ -> Sort By -> Random

Random is the missing feature

Haha pligor, this does seem very complicated! and possibly very bandwith intensive!
Vlad, im going to try this out because i dont need it to be different for each user.
Thanks guys!

Yeah so it is actually a new feature, we donā€™t have that yet.

+1
The random order list could also help to choose several random items from a list. If you choose several times one random item you sometimes end up with duplicates.
Or is there another way of avoiding this?

You can request that and thatā€™ll be on our list. Itā€™s not a very quick win though, there is a fair amount of work involved.

+1 also
since itā€™s not yet in the Bubbleā€™s Features Lab.

Just added this feature. You can now pick ā€˜random orderā€™ as a sorting option for a search.

7 Likes

ā€œRandom sortingā€ is available for Do a search only.
Would it be possible to add this feature for randomizing a list of Things also ?

Itā€™s a different mechanism, as itā€™s not search related, but weā€™ll look into it. Out of curiosity, how long is the list?

Ok. Itā€™s for showing a sample of 4 participants out of a list of 3 to 20 participants to an order (can be much more in rare cases).

This is awesome. Thanks

Small bug: Random order in a repeating group seems to result in the same random order each time!