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 to Create Array of...
Power Automate
Unanswered

How to Create Array of numbers 0 to x via expressions - sequence()?

(0) ShareShare
ReportReport
Posted on by 4

Hi, 

 

I am assuming that the sequence() expression function does not work with flows? I would like to dynmically create an array of numbers based on the returned value for an api call but can't work out what the expression looks like. 

 

Thanks

Categories:
I have the same question (0)
  • Paulie78 Profile Picture
    8,422 Moderator on at

    Use the range expression:

    range(0,10)

  • rjtedge Profile Picture
    4 on at

    That's a great start. Is there any way to change the interval so that the array is (0,10,20,30) etc?

  • Paulie78 Profile Picture
    8,422 Moderator on at

    Either parameter can be dynamically driven by the output from previous steps. So you can use the value coming back from your API.

  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @rjtedge :

    Power Automate currently does not have a function similar to sequence() in Power Apps.I am not sure how to achieve your needs through API, but I have an alternative method

    I've made a test for your reference:

    1\My Flow

    vbofengmsft_1-1624344567143.png

    vbofengmsft_2-1624344590902.png

    2\Run the flow

    vbofengmsft_0-1624344445455.png

    3\The result:

    vbofengmsft_3-1624344623925.png

    Best Regards,

    Bof

     

     

  • SurfaceWear Profile Picture
    186 on at

    It's a long time since this was asked but for anyone else looking for this in future I achieved this by first adding a 'compose' step with a range(start,count) expression then multiplying each item in the range by a factor equal to my desired interval using a 'select' step.

     

    This is very quick compared iterating a value and adding it to an array using a loop.

    tfraser_1-1673360956726.png

     

    tfraser_0-1673360902891.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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard