I'm working on a flow that gets a random item from Excel, based on a weight value. After that random item is found, the weight would increase by 1, so as to not be picked again, until all other items have been picked.
I have a working flow that for now, does all of this methodically in order (Item 1, then Item 2, then Item 3, etc...)
I'm trying to figure out how to build a new array of "lowest weights" from my array of "weights".
Currently, my array of weights looks like this:
[
3,
4,
2,
4,
3,
2,
4,
2,
3,
3
]
With this array, you can see there are 3 items with weight "2". I want to gather all items with weight "2" and make a new array of these items.
[
2,
2,
2
]
From here, hopefully I'll be able to reference the correct line item to pull a random item from this new "sub array".
I'm not sure exactly how to do this however, and was hoping for some guidance.
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492