My structure is as follows: Two Tables (List Names and List Items)
Right now I have a virtual column in the List Names table that says =SELECT(List Items[Randomizer Number],[List Name ID]=[_THISROW]) This will return a list like this: 1 , 2 , 3 , 4
Then I have another virtual column that says =LEFT(RIGHT([String],LEN([String])-RANDBETWEEN(1,LEN([String]))+1),1) Because the list above has spaces, the LEN expression returns 13. Not good when trying to return either a 1, 2, 3, or 4.
@Aleksi_Alkio My List Items Table is a child of the List Names Table. For the column called Randomizer Number, I restart my count for every list item added.
Example:
List Name Table
_RowNumber = 1 List Name Key = UNIQUEID() List Name = Test
List Items Table
_RowNumber = 1 List Item Key = UNIQUEID() List Name ID = the [List Name Key] List Item Name = test list item 1 Randomizer Number = 1
_RowNumber = 2 List Item Key = UNIQUEID() List Name ID = the [List Name Key] List Item Name = test list item 2 Randomizer Number = 2
Now, when I add a new list and new list items, I restart my [Randomizer Number] counter
Example:
List Name Table
_RowNumber = 2 List Name Key = UNIQUEID() List Name = Test 2
List Items Table
_RowNumber = 3 List Item Key = UNIQUEID() List Name ID = the [List Name Key] List Item Name = test list item 1 Randomizer Number = 1
_RowNumber = 4 List Item Key = UNIQUEID() List Name ID = the [List Name Key] List Item Name = test list item 2 Randomizer Number = 2
With that said, I cant use a =RANDBETWEEN(1,MAX(List Items[Randomizer Number])) because there are duplicate [Randomizer Number] entries based on the List Name ID.
My list of BOOKSTORES has about 66 unique ids. I just need to pull 5 random ones.
Note: it’s obiously a VC that i’m working with in another table. All i need is a list of comma-separated IDs. No fancy views or anything like that…
Selecting a random number from a list can be a bit tricky, but don’t worry. I’ve got an idea that might help you out.Instead of using the LEN function, you can try using the COUNT function to get the number of items in your list. Then, use the RANDBETWEEN function with the COUNT result as the maximum value. This way, you’ll ensure you get a random number within the range of your list.
By the way, I recently stumbled upon one website at https://flipsimu.com/. It’s got virtual coin flippers and dice that you can use to add some randomness to your life. It’s pretty cool!