Range function in Power Automate | Quick Tip

Here’s a pretty simple look at how you can create an Array of numbers from a Start of the number to the End number and an Array of the range will be created

Example Variable

I’m just creating a sample variable to hold the array I’m creating –

  1. Initialize a variable and it should look like below

Range function in Power Automate

Now, if you look at the Dynamic Content section, you’ll be able to find the range function. Let’s see how –

  1. In Dynamic Context, search for range function

  2. In the range function, you first need to input the Start number of what the array should start.
    In this example, I’m starting from number 4

  3. And once I put a comma, I’ll mention how many items in the array from the number 4 should be contained in the array (including 4 as well)
    So, I enter 12. This doesn’t mean the ending number of the Array should be 12, it means put 12 items.

  4. And then just click OK to set the Array in the variable. Then, save and Run.

  5. Now, when you Run the Flow, you’ll see the Output as below.
    Starting from number 4, there are 12 items and hence, ending at 15

Hope this was helpful!

Here are some more Power Automate / Flow posts you might want to check out –

  1. Retrieve Metadata of Global OptionSets from Dynamics 365 in Power Automate | HTTP with Azure AD action
  2. Primary Key of Activity type entity in a Dataverse connector in Power Automate | Quick Tip
  3. Split On in Power Automate in SharePoint trigger for Item updates
  4. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  5. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  6. Invalid XML issue in Dataverse connector for List Rows action | Fetch XML Query | Power Automate
  7. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  8. Invalid type. Expected Integer but got Number error in Parse JSON – Error at runtime after generating Schema | Power Automate
  9. Asynchronous HTTP Response from a Flow | Power Automate
  10. Setting Lookup in a Flow CDS Connector: Classic vs. Current Environment connector | Power Automate Quick Tip

Thank you!

One thought on “Range function in Power Automate | Quick Tip

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.