Power Automate (WDL) function
min / max — Power Automate (WDL) function reference
Smallest or largest argument.
Syntax
wdl
min(collection|value1, [value2, ...]) / max(collection|value1, [value2, ...])
Examples
wdl
max(variables('a'), variables('b'))→ A number
wdl
max(createArray(item()?['Score1'], item()?['Score2'], item()?['Score3']))
→ The highest of the three scores
wdl
min(variables('requestedQty'), variables('availableStock'))→ The smaller of the two, capping a request at the ceiling
Common mistakes & gotchas
- min()/max() accept either a single array argument or two-or-more individual scalar values — mixing both forms in one call is not supported and throws.
- All elements must be numbers; an array containing even one string or null throws rather than being ignored.
Related Workflow Definition Language functions
From Math