Power Automate (WDL) function
range — Power Automate (WDL) function reference
Sequence of integers.
Syntax
wdl
range(startIndex, count)
Examples
wdl
range(1, 5)
→ [1,2,3,4,5]
wdl
range(1, variables('pageCount'))→ [1,2,3,...] one entry per page
wdl
range(0, length(variables('rows')))→ A zero-based index array matching an existing array's length
Common mistakes & gotchas
- The second argument is a count, not an end value — range(1, 5) yields 5 items [1,2,3,4,5], not "up to 5".
- count must be a non-negative integer, and startIndex + count must stay within Int32 range or it throws.
Related Workflow Definition Language functions
From Arrays & collections