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

Community site session details

Session Id : nm3CsvxD8h48qIP0JlVLXT
Power Automate - Building Flows
Unanswered

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

Like (0) ShareShare
ReportReport
Posted on 7 Apr 2022 09:47:21 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.

  • Expiscornovus Profile Picture
    32,182 Most Valuable Professional on 07 Apr 2022 at 10:52:16
    Re: How can I rand(1,40) only unique numbers, without repeating?

    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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete