Forum Documentation Showcase Pricing Learn more

Random order list


#1

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


#2

What are you trying to achieve here?


#3

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.


#4

Check the attached screenshot for :random item

Is this the solution?


#5

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


#6

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.


#7

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


#8

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!


#9

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


#10

+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?


#11

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.


#12

+1 also
since it’s not yet in the Bubble’s Features Lab.


#13

Just added this feature. You can now pick ‘random order’ as a sorting option for a search.


#14

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


#15

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?


#16

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).


#17

This is awesome. Thanks