How to reshuffle completely

Thank you for your watching my posting.

I’m so new at glide. Please allow my silly question.

I tried my best, but I couldn’t figure out this;

Glide library says,

If your Inline List is randomly ordered, you can add an action to a button or image to re-shuffle those lists. This will reshuffle all randomly sorted lists on that screen.

But in my case, each data space often has same data.

For example,

I want reshuffle three texts,” cake, candy, and cherry.”

But almost every time I try to reshuffle, there are many times like this;

“cake, cake, candy “or “candy, cherry, cherry” and so on.

I want three each space to show completely different texts.

What can I do for this?

It is the first time to use my English to people in the world.

Please answer if you have solutions. Thank you for yours.

Hello @kokoro_koto :wave:

The source of your inline list is a table with a list of rows. Let’s say the column is “Name”, and you have 3 rows: cake, candy, cherry. Do you only have 3 rows or do you have duplicates (for example cake, candy, cake, cherry, candy)?

If you have duplicates in your table, then I would also expect duplicates in your inline list. Unless you are limiting the number of items shown in your list or you put a filter, you should see your entire list.

Also, if you’re list is short, 3 items for instance, keep in mind that you only have 3! (3x2x1=6) possible combinations of lists. Shuffle 6 times or more, and you are certain to already have seen that list before.

4 Likes

Mr.nathanaelb, thank you for your quick reply.

As a matter of fact, (last time, I explained simply)

I want to select three items randomly from over 50 items.

At first, I created table (1st table) with 50 items in one column (no duplicates).

Next, I created another table (2nd table), and tried to refer the first table.

In the second table, I selected three items randomly, using single value random function.

Finally, I tried to use shuffle button.

Please give me some advice.

Thank you.

I would be curious to see some screenshots of how you have this set up, but I have a pretty good idea of what you are doing. I don’t think you need to use a second table or a Single Value column. All you need to do is change the sorting of your original inline list to random sorting, and change the source of the inline list to your first table. Then limit the list to only show 3 items. Then it should work since your list won’t ever have any duplicates. When you click on the button, it will change the random sorting of that list.

7 Likes

I 've made it successfully.
Thank you very much.

I want to enjoy glide life from now on too.

2 Likes

Hi Jeff! Big fan of your contributions in the community!
How would you save/record a random shuffled array in glide?

How many items in the array?

20 items. This JS does the trick; but it runs only once on mobile browser :weary:


Can you explain your use case a little more and how you are using those numbers? How often do you need you numbers to shuffle? Should it be a continuous shuffle, or would it be based on a user action? Your javascript would probably work. All you would need to do is create a math column that returns the current time, and then pass that current time as a parameter into your javascript column. You wouldn’t have to do anything with that parameter in the code, but the fact that it changes every 10 seconds would cause the javascript to rerun, which should give you a new shuffled order.

3 Likes

When a user goes to generate a new set of random values, write a time stamp in a new user specific column somewhere accessible.

Create a new table with 20 rows. Number the rows 0-19. Bring in that timestamp using a single value or math column. Add the timestamp and the 0-19 index column together in a math column.

Add a random number column and use that math column as the seed. Somewhere else, do a lookup of the random numbers so it generates an array. Sort the array using the sort array column. Related the sorted array back to the random numbers. Do a lookup of this relation. This should be a completely random array that can be used for inline lists, join lists, etc.

3 Likes

Works perfect! thank you @Jeff_Hager & @Robert_Petitto. Mobile app users can now shuffle and save on-tap.

  • Added increment action parameter in JS column.
  • Implemented user specific timestamp table to generate inline lists from saved array.

Amazing! Thank you my friends! :100:

ps. Robert would you mind posting the Boggle App to your vip access page?

1 Like