Randomize App State List with a click of a button

Current: I have an app state list that I am able to set a (document) field that I randomized the index number through the random integer.

Problem: In my output, I get duplicates. There is no option for 'not in'.

Solution: I am looking for a way to click a button, randomize the index number, but having the randomizer not display any duplicates.

Example: I have a list of baseball teams. I have 30 fields that I need to update after clicking, once clicked, I want it to randomize the list of teams and then update the values with the randomized list.

Thank you...

2
1 reply