Skip to main content
2/5

a!map(): list the fields a record has

Easy

Return the field names of the record, as a list of text.

A record with no fields has no field names.

Input

  • ri!record: Map

ri! Rule Inputs

ri!recordMap
a!map(name: "Ann", age: 30)

Example 1: Two fields

Input: ri!record
a!map(name: "Ann", age: 30)
Expected output:
{
  "name",
  "age"
}

Example 2: One field

Input: ri!record
a!map(city: "Pune")
Expected output:
{"city"}

Example 3: An empty record

Input: ri!record
a!map()
Expected output:
{}

Example 4: Three fields keep their order

Input: ri!record
a!map(a: 1, b: 2, c: 3)
Expected output:
{
  "a",
  "b",
  "c"
}

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