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

Announcements

News and Announcements icon
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,828 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard