1/4

isBetween: a rating strictly between the ends

Easy

A survey asks for a rating and treats only the middle of the scale as a neutral answer. Return true when ri!rating is strictly between 1 and 5, and false otherwise.

1 and 5 themselves are not neutral. A rating that was never given arrives as null and is not neutral either.

Input

  • ri!rating — Number (Integer)

Restrictions

Solve this without using and(), or() or if().

ri! Rule Inputs

ri!ratingNumber (Integer)
3

Example 1 — The middle of the scale

Input: ri!rating
3
Output:
true

Example 2 — On the lower limit

Input: ri!rating
1
Output:
false

Example 3 — On the upper limit

Input: ri!rating
5
Output:
false

Example 4 — Just inside the top

Input: ri!rating
4
Output:
true

Example 5 — Never answered

Input: ri!rating
null
Output:
false

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