What's the use of Form Question Aliases?


It is an improvement over using Form Question Ordinals (Question Number) to reference a form question in an expression. For example - if using this expression:

#form.questions[10].answers[0].display

Anytime the questions are re-ordered on the form, the above expression will reference the wrong question and require updating the question number accordingly.


To solve this problem, Form Question Aliases were introduced. With these, the expressions don't need to be updated because a form question alias isn't dependent on the question number (ordinal).


How to use Form Question Alias

  1. Edit an existing question on a form and expand the advanced section. 

  2. The value in "Question Alias" is the Question Alias that can be used in expressions. This value can be customized and any string can be used as long as it's unique for all questions in the current form. 

    • By default the question alias is always a number but editing this and using descriptive names will make the expression more readable. i.e. For question 1 updating the Alias to "QuestionText", "question1" etc

    • Note: Spaces are not allowed in Question Aliases 

  3. Question Aliases for all questions can be seen together by clicking "Show All Aliases"

  4. Using the image from above to reference question 1 "Example Question Text", we would use the alias "22". Below are examples of using the question Alias. 

    • Expressions on Form Questions: i.e. Required Conditions, Visible Conditions etc. 

      #form.questionsMap[22].answers[0].content != null
      #form.questionsMap.22.answers[0].content != null
      #form.questionsMap['22'].answers[0].content != null


    • Expressions for Events: i.e. Action or Trigger filters, values etc.

      ((#form.questionsMap[22].answers[0].content != null))