Skip to main content
2/7

text(): show a ratio as a percentage

Easy

Return the ratio as a whole-number percentage: 0.25 becomes "25%".

A % in the format multiplies by 100 for you.

Input

  • ri!ratio: Decimal

ri! Rule Inputs

ri!ratioDecimal
0.25

Example 1: A quarter

Input: ri!ratio
0.25
Expected output:
"25%"

Example 2: All of it

Input: ri!ratio
1
Expected output:
"100%"

Example 3: Fractions of a percent are cut off

Input: ri!ratio
0.126
Expected output:
"12%"

Example 4: None

Input: ri!ratio
0
Expected output:
"0%"

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