Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

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 788
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.