Skip to content

Compound Predicates

Compound predicates let you check multiple properties of each element when using any or all quantifiers. Instead of checking a single value, you can test combinations of properties using and/or logic.

Use where (or satisfies) followed by parenthesized sub-conditions. Each sub-condition starts with its to refer to the current element’s property:

any __items__ of **Order**
where (its __status__ is equal to "shipped"
and its __quantity__ is greater than 0)

Check that at least one array element matches all specified conditions:

Interactive Example

Policy Rule
Test Data (JSON)

The Widget item matches both conditions (status = “ready” AND quantity > 0), so any returns true.

When no element satisfies all sub-conditions, the result is false:

Interactive Example

Policy Rule
Test Data (JSON)

Neither element matches both conditions simultaneously.

Use or between sub-conditions to match elements that satisfy any of the criteria:

Interactive Example

Policy Rule
Test Data (JSON)

Sub-conditions can reference properties from other objects using the __prop__ of the **Selector**:

Interactive Example

Policy Rule
Test Data (JSON)

This checks each grant against the request’s own action and resource properties.

Compound predicates follow the same empty-array rules as regular quantifiers:

  • any ... where (...) over an empty array returns false
  • all ... where (...) over an empty array returns true

You can use satisfies as a synonym for where:

any __items__ of **Order**
satisfies (its __status__ is equal to "shipped"
and its __quantity__ is greater than 0)

Both forms are identical in behavior.

Compound predicates are particularly powerful when combined with dynamic key lookups. See Platform RBAC for the current platform access model.

SyntaxWhat it does
any ... where (its __prop__ op value)At least one element matches the compound condition
all ... where (its __prop__ op value)Every element matches the compound condition
its __prop__Refers to a property of the current array element
the __prop__ of the **Obj**Cross-reference to another object (right side)
and / orCombine multiple sub-conditions