I’m building a waiting list of participants for a tournament, the list will display the participants in standard order in the beginning but once it reaches the maximum number allowed of participants I want the list to be sort random.
The problem is that when I do that, yes it makes it random but every page refresh creates a new shuffle and I don’t want that because everybody will get a different result on their computers. What I want is bubble to sort the participants and create a final definite random list so everyone sees the same result.
How can I do this?
Probably not a way to rely on bubble to do that, as the random sort is just that, random every time.
You may need to consider how you could achieve it by creating some kind of data field on the participant list data type that is used to sort “randomly”.
Why do you want it to be random?
What is the randomness of the sort supposed to convey to the users? Is there some kind of thought that a randomly sorted list will demonstrate the randomness of being allowed to participate?
You would need to add a ‘sort order’ field on your thing and then you could use either a plugin like ListShifter or use a recursive API workflow to iterate over the list of participants and populate the sort order field incrementally.
Then you would set the repeating group to sort based on that sort order field.
Edited: I like @petter’s solution
If I understand your problem correctly, you can probably also solve it by saving the list to something, and randomizing it when it’s saved, instead of performing the search and randomizing it every time.
Would that solve it, or am I missing something?
We want to create a tournament draw from that list of participants, they compete against each other, therefore it matters that we fill the draw randomly.
I’m new to bubble, sorry.
How exactly I do that?
I dont see any option on repeating groups that allows me to set say a condition to save into something.
In that case it doesn’t seem necessary to display the list in any random order until after you have done the draw…and in that case showing a list of “winners” of the draw, which was done randomly I would create two R.G.
One has the full list of all participants that are signed up…in the order they signed up because that doesn’t need to be randomly displayed.
The second would be where you take the participant list from R.G.1 and sort it randomly and limit the number of entries to the total that can participate…then that is saved to another database entry for the tournament.
When displaying the winners of the drawing, display the list from R.G.2
I end up with the same issue, I dont understand how to save the RG1 to another database
No need to save R.G.1 to another database…it is just used as a reference for R.G.2 datasource
If you want to do this, that is easy enough.
This topic was automatically closed after 70 days. New replies are no longer allowed.