Skip to content

or

Description

When using or to connect two expressions, the entire condition evaluates is 'true', if at least one of the expressions is 'true'.

Unknown values

or follows three-valued logic. Because a single true is enough to make the whole expression true, true or unknown is true, not unknown - the unknown side cannot change a true or, so the rule resolves to a definite true rather than staying pending. The expression only becomes unknown when the missing side could still flip the outcome (for example false or unknown).

or true false unknown
true true true true
false true false unknown
unknown true unknown unknown

Need the second question to be asked only after the first is answered? Use or else instead.

Example

Say, a document is needed for a person who either lives in Germany or pays taxes in Germany.

p is Person
p.tax_domicile = de 
or
p.domicile = de

With these expressions, connected by or, attached to a document, that document will only appear in the case for client Peter Müller if he lives in Germany, but works and pays taxes in France. It will also appear in the case for Valérie Jupeau, who works in Germany, and pays taxes there, but lives in Basel.

However, it will not appear in the case for Claudia Dunkelmann, a German citizen who works, pays taxes, and lives in Spain.