web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How can I rand(1,40) o...
Power Automate
Unanswered

How can I rand(1,40) only unique numbers, without repeating?

(0) ShareShare
ReportReport
Posted on by 520

I want to get 40 random items from a sharepoint list based on their ID, but I don`t want them to repeat.

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,194 Most Valuable Professional on at

    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.

    https://www.random.org/integer-sets/?sets=1&num=40&min=1&max=40&seqnos=on&commas=on&order=index&format=plain&rnd=new

     

    split(trim(replace(body('HTTP'), 'Set 1: ', '')), ', ')

     

    randomorg_items.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard