Support Portal

for ProcessRobot and WinAutomation

Start a new topic

Logical AND/OR operator in IF conditions


The AND "&&" operator can be used inside an "If" condition using the following format

First Operand: %TextVar_1 == "ABC" && TextVar_2 == "DEF"%

Operator: =

Second Operand: True

The OR "||" operator can be used in a similar way

First Operand: %TextVar_1 == "ABC" || TextVar_2 == "DEF"%

Operator: =

Second Operand: True


2 people like this idea

Does this work with Case Statements?


Hello Jaye, it does work.

You can put the "First Operand" in the Switch Action and then "True" or "False" in the Case Action.

Hello Peter,

I think that remember that there was a way in the Multiple OR and Multiple AND syntax for IF statement action to specify, NOT conditions, but I can not remember the syntax.

If this is possible to work, can you paste an example of the syntax with Multiple OR, AND syntax  here ?


Hello Joseph,

You could write it like that:

First Operand: %TextVar_1 == "ABC" && TextVar_2 == "DEF" || TextVar_3 == "DEF" %

Operator: =

Second Operand: True


Actually, I was wondering if there is a "NOT =="  Operator that could be combined within the Multiple AND,  syntax

%TextVar_1 == "Suzuki" && TextVar_2 == "Honda" && TextVar_3 != "BMW" %

thanks, yoko, that was the syntax that I had forgotten:  "  !=  "

Login or Signup to post a comment