2/5

enumerate(): build numbered row labels

Easy

Return ri!n row labels: {"Row 1", "Row 2", "Row 3"} for 3.

There is no list of rows to loop over — only a count — which is exactly what enumerate() is for.

Rows are numbered from 1, as a person would read them.

Input

  • ri!n — Integer

ri! Rule Inputs

ri!nInteger
3

Example 1 — Three rows

Input: ri!n
3
Output:
{
  "Row 1",
  "Row 2",
  "Row 3"
}

Example 2 — A single row

Input: ri!n
1
Output:
{"Row 1"}

Example 3 — No rows

Input: ri!n
0
Output:
{}

Example 4 — Five rows

Input: ri!n
5
Output:
{
  "Row 1",
  "Row 2",
  "Row 3",
  "Row 4",
  "Row 5"
}

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