Randomly Select Entries in your Sharpoint List for Review

Brass Contributor

I have a sharepoint list that is recording the lcoation of stock. Once a week or MOnth i would like power automate to randly choose 10 items in the list for review. They will use the list to capture the correct item is in the correct location etc.

Is there a way to randomly select items?

4 Replies
Get the items with the first ID and last ID, then create a variable and add rand(firstval,lastval) and generate, then run it and update it 10 times or something :)
I used this: body('Get_items')?['value'][rand(0,length(body('Get_items')?['value']))]

But it only returns 1 item, can i change it somehow to recieve 5 random items?

@jamescosten you could have a parallel branch for each of the random items you want to bring back, each with the expression to get the random item, the parse json action and then append it to a string variable. Then you can use that to, for example send an email.






Los Gallardos
Microsoft Power Automate Community Super User

Do an "Do until" you reach 10 and within that do until your stuff!