Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

comparing var in conditional statements

Not applicable

I have to place a condition in flow to only execute a policy only if a variable(which will have json payload) has no value. Currently I am using following conditions;

1)<Condition> ((var == null) or (var == "") ) </Condition> //evaluate to false or true based on var value

2) <Condition> (var == false) </Condition> // always evaluate to true regardless of value of var so act as assignment operator

3) <Condition>( !var) </Condition> // doesn't work, not valid

Is there any other shorter way than first statement to give specify this condition ?

0 4 1,006
4 REPLIES 4