2/7

or(): check that any condition holds

Easy

Delivery is free when the order total is at least 500 or the customer is a member. Return true when it is free.

Inputs

  • ri!total — Integer
  • ri!isMember — Boolean

ri! Rule Inputs

ri!totalInteger
600
ri!isMemberBoolean
false

Example 1 — Big order

Input: ri!total
600
Input: ri!isMember
false
Output:
true

Example 2 — Member with a small order

Input: ri!total
100
Input: ri!isMember
true
Output:
true

Example 3 — Neither

Input: ri!total
100
Input: ri!isMember
false
Output:
false

Example 4 — Exactly 500 counts

Input: ri!total
500
Input: ri!isMember
false
Output:
true

Example 5 — Both

Input: ri!total
700
Input: ri!isMember
true
Output:
true

Appian Expression Tips

  • • Use ri!variableName for rule inputs
  • • Use a!localVariables(local!x: …, body) for locals
  • • Use a!forEach(items: …, expression: fv!item) to iterate
  • • Use where() / reject(fn!isnull, list) to filter