How to use ternary operator in power automate?
Well, before to I show you, let's go over some concepts...
1.
The ternary operator structure
- The expression must be a boolean value (true or false), never put an object, array, or string, as it will return an error:
Applying ternary operator
"What do I make, if my expression is an object, array, or string?"
In this case, we can use the operators: Greater, Less, or Equals.
For example:
if(variables('Age') > 19,'Yes', 'No') ❌
if(greater(variables('Age'),19),'Yes', 'No') ✅
If the age is greater than 19, show yes in compose
The result:
That's all for today! 🤟🏻
Top comments (0)