Forum Discussion
jamescosten
Nov 30, 2022Brass Contributor
Randomly Select Entries in your Sharpoint List for Review
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 ...
Nov 30, 2022
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 🙂
- jamescostenDec 01, 2022Brass ContributorI 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?- RobElliottDec 01, 2022Silver Contributor
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.
Rob
Los Gallardos
Microsoft Power Automate Community Super User - Dec 01, 2022Do an "Do until" you reach 10 and within that do until your stuff!
https://www.acuitytraining.co.uk/news-tips/power-automate-do-until/