I want to get 40 random items from a sharepoint list based on their ID, but I don`t want them to repeat.
Hi @Robert94,
One approach could be to interact with a service like random.org and just collect such a set of unique numbers from there. This way you do not have to do this calculation in Power Automate.
After that you could use the array to retrieve the SharePoint list items with for example an apply to each loop and a get item action.
Below is an example of getting an array with 40 unique numbers in random order:
This hyperlink generates 40 unique numbers in plain text format.
split(trim(replace(body('HTTP'), 'Set 1: ', '')), ', ')
WarrenBelz
146,651
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional