/
RANDOM_OPTION ()

RANDOM_OPTION ()

Use this function to make a random selection of one of the options of the question where this FORMULA is invoked

This FORMULA is only valid in multi-option type questions (RADIO or CHECK)

Input Parameters

ParameterTypeDefaultDescription



No parameter required

Return value

This function returns the ID of the OPTION randomly selected

Execution

  • On FORM creation
  • On FORM open
  • During FORM completion

Examples

Suppose that this FORMULA is invoked in a RADIO question intended to generate a random message for the user. The example question has three options, where each option is a messages:

  • Option 1: "Don't forget to walk 500 steps today"
  • Option 2: "Remember to eat at least 5 vegetables"
  • Option 3: "Don't use to much salt in your foods"

If this question includes the FORMULA RANDOM_OPTION(), then the value returned will be randomly selected between 1, 2 and 3

FormulaDescription
RANDOM_OPTION()May return 1, 2 or 3

Related content