1/5

a!map(): build a record from separate values

Easy

Return a record with a name field and a score field, taken from the two inputs.

Field names are exactly name and score.

Inputs

  • ri!name — Text
  • ri!score — Integer

ri! Rule Inputs

ri!nameText
"Ann"
ri!scoreInteger
90

Example 1 — A name and a score

Input: ri!name
"Ann"
Input: ri!score
90
Output:
a!map(name: "Ann", score: 90)

Example 2 — A different person

Input: ri!name
"Bo"
Input: ri!score
40
Output:
a!map(name: "Bo", score: 40)

Example 3 — A score of zero is still a score

Input: ri!name
"Cy"
Input: ri!score
0
Output:
a!map(name: "Cy", score: 0)

Example 4 — An empty name

Input: ri!name
""
Input: ri!score
10
Output:
a!map(name: "", score: 10)

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