Logic Operators: AND (&&) and OR (||)

Doc Auto Team
Doc Auto Team
  • Updated

AND or OR statements allow us to evaluate multiple logic statements at one time.

OR Statement

For an OR statement, we use the double pipe syntax: ||

This operator is used if any one of the statements must be true. Each statement must be contained within round brackets ().

Input {#(jurisdictionRegion=='British Columbia') || (jurisdictionRegion=='Nova Scotia')}Company{/}
Meaning IF the jurisdiction IS British Columbia OR Nova Scotia, then print "Company"
Sample Data British Columbia Ontario
Output Company blank

AND Statement

For an AND statement, we use the double ampersand syntax: &&

This operator is used if multiple statements must be true at the same time. Each statement must be contained within round brackets ().

Input {#(jurisdictionRegion!='British Columbia')&&(jurisdictionRegion!='Nova Scotia')}Company{/}
Meaning IF the jurisdiction IS NOT British Columbia AND NOT Nova Scotia, then print "Corporation"
Sample Data British Columbia Ontario
Output blank Corporation