unary operator in conditional flow

Not applicable

It seems like even unary operator needs two operands in conditional flows. So following would be wrong statements; Is that right?

<Condition>(Not javascriptvariable)</Condition>

<Condition>(!javascriptvariable)</Condition>

0 3 695
3 REPLIES 3

Not applicable

I am getting error when I save these conditions saying " Invalid condition, Reason: Both the operands for NOT expression should be logical."

Not applicable

Hello @Mayank ,

Yes, we need to use the following:

<Condition>(javascriptvariable != "true")</Condition>

Not applicable

ok great, that should take care of both conditions where variable has null value and empty string both .

Apigee documentation lists both operators ! and != separately so its little confusing for users. Thanks for repsonse.