Power Automate (WDL) function
greater / less — Power Automate (WDL) function reference
Numeric comparison.
Syntax
wdl
greater(value, compareTo) / less(value, compareTo)
Examples
wdl
greater(variables('total'), 1000)→ true / false
wdl
greater(length(item()?['Description']), 500)
→ true / false
ISO-formatted date strings sort correctly with lexical comparison.
wdl
less(formatDateTime(utcNow(), 'yyyy-MM-dd'), formatDateTime(item()?['ExpiryDate'], 'yyyy-MM-dd'))
→ true / false
Common mistakes & gotchas
- greater()/less() work on numbers and on ISO 8601 date strings directly, but comparing two strings that are neither valid numbers nor dates just does plain lexical comparison, which rarely gives the result you expect.
- Mixing types, e.g. greater(5, '3'), throws rather than coercing — both arguments must resolve to the same comparable type.
Related Workflow Definition Language functions
From Logic & comparison