Difference between revisions of "Constraint: AND / OR / XOR / NOT"

Tags: Mobile web edit Mobile edit Advanced mobile edit
Line 1: Line 1:
 +
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
This constraint may be used to perform logical operators on any child constraints that are added to this constraint.
 
This constraint may be used to perform logical operators on any child constraints that are added to this constraint.
  
 
To add child constraint(s) tap the constraint in the edit macro screen and select the 'add constraint' option. All child constraints will appear indented directly under this constraint.
 
To add child constraint(s) tap the constraint in the edit macro screen and select the 'add constraint' option. All child constraints will appear indented directly under this constraint.
 
+
</pre>
 
When several constraints are used, they are linked by an implicit AND i.e. ALL the constraint conditions have to be TRUE for the [[Actions|action]] to execute.
 
When several constraints are used, they are linked by an implicit AND i.e. ALL the constraint conditions have to be TRUE for the [[Actions|action]] to execute.
  

Revision as of 17:34, 30 January 2024

This constraint may be used to perform logical operators on any child constraints that are added to this constraint.

To add child constraint(s) tap the constraint in the edit macro screen and select the 'add constraint' option. All child constraints will appear indented directly under this constraint.

When several constraints are used, they are linked by an implicit AND i.e. ALL the constraint conditions have to be TRUE for the action to execute.

If you need a more sophisticated logic, you can link the constraints with logical operators:

  • AND (by default)

ALL constraint conditions below this operator have to be TRUE. If no other logical operators are needed, this one is not necessary

  • OR

AT LEAST ONE of the constraint conditions below this operator has to be TRUE

  • XOR (XOR = eXclusive OR)

ONE AND ONLY ONE of the constraint conditions below this operator has to be TRUE

  • NOT

NEGATION of the constraint condition attached i.e. the constraint has NOT to be TRUE for the action to execute.

All these constraints and operators can be nested to get even more sophisticated conditions.