Constraint: Compare Values

Revision as of 11:21, 9 January 2026 by MacroDroidDev (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This constraint allows or prevents a macro/feature from running based on a comparison between two values or variables.

Options

  • Compare Type - Indicates what type of comparison to perform from boolean, integer, decimal, string, array or dictionary.
  • Value1 - The first value to compare
  • Value2 - The second value to compare
  • Operator - Depends on the type of comparison (for example for string you can check if value1 contains value2, for integers you can compare if value1 is greater than value2)

Example

Example 1: Enable mobile data only when a usage flag is set

Triggers

Screen On/Off - Screen On
Actions

Mobile Data On/Off (Enable)
Constraints

Compare Values - [data_allowed] = 1

See Also