Difference between revisions of "Constraints"
(→List of Constraints: Adding XOR constraint) Tags: Mobile web edit Mobile edit Advanced mobile edit |
Tags: Mobile web edit Mobile edit Advanced mobile edit |
||
Line 23: | Line 23: | ||
[[Constraint: Airplane Mode|Airplane Mode]] | [[Constraint: Airplane Mode|Airplane Mode]] | ||
− | [[Constraint: AND / OR | + | [[Constraint: AND / OR / NOT|AND / OR / XOR / NOT]] |
[[Constraint: Application Running|Application Running]] | [[Constraint: Application Running|Application Running]] |
Revision as of 11:09, 19 July 2021
Constraints are optional and can be used to allow or prevent a macro/action from running based on certain conditions.
Constraints can be placed on macros to allow or prevent the entire macro firing based on the set condition(s). You can also add constraints directly to individual triggers and actions from the 'Edit Macro' screen, by clicking on the trigger/action and selecting "Add constraint"
A constraint is evaluated at the point a trigger fires or action runs and a macro/action will only run if the constraint condition is true.
By default if adding more than one constraint to a macro they will be combined with an AND condition (e.g. all added constraints must be true). This can be changed in the dropdown in the constraints title to an OR condition. In this case only one of the added constraints needs to be true for the macro to run.
Nesting constraints
If you need more sophisticated logic applied to constraint there is a special AND/OR/XOR/NOT constraint that can be used. Any constraints nested under the logic constraint will have that logic operator applied. It's also possible to nest multiple logic constraints to create complex logic. For example:
AND | - Constraint 1 | - OR | - Constraint 2 | - Constraint 3
In the above example, Constraint 1 must always be true AND at least one of (Constraint 2 OR Constraint 3) must be true.
List of Constraints
Macro(s) Invoked/Not invoked Recently