1/5

a!match(): turn a status code into a label

Easy

Return "Open" for "O", "Closed" for "C", "Pending" for "P", and "Unknown" for anything else.

Codes are exact and case-sensitive: a lowercase "o" is not a recognised code.

Input

  • ri!code — Text

ri! Rule Inputs

ri!codeText
"O"

Example 1 — Open

Input: ri!code
"O"
Output:
"Open"

Example 2 — Closed

Input: ri!code
"C"
Output:
"Closed"

Example 3 — Pending

Input: ri!code
"P"
Output:
"Pending"

Example 4 — An unrecognised code

Input: ri!code
"X"
Output:
"Unknown"

Example 5 — Lowercase is not a code

Input: ri!code
"o"
Output:
"Unknown"

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