How can I randomize the order of a repeating group? Thanks
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.
Yeah so it is actually a new feature, we don’t have that yet.
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.
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.
“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