Single Selection field

Design

In the Form Designer, you can add a single-select field and specify the options.

Each option is assigned a unique, immutable ID that is not visible in the Form Designer. The option’s ID is stored in a record, which means that if you rename an option in the Form Designer, the change are reflected in all previously collected data.

Data entry

A single select field is either displayed as a list of radio buttons, or as a drop down:

  • If there are 10 options or less and the field is required, the field is displayed as a series of radio buttons.
  • If there are 10 options or less, but the field is optional, the field is displayed as a dropdown
  • If there are more than 10 options, the field is always displayed as a dropdown

Formulas

You can refer to single select fields in formulas in two ways:

First, a reference to the single-select field itself evaluates to the selected option’s label. So you can write formulas such as:

  • CONCAT(Name, " - ", Gender) and it evaluates to, for example, “Nelson Mandela - Male”, or “Frida Kahlo - Female”.
  • Gender == "Female" , which evaluates to TRUE if the “Female” option has been selected. However, if you later change the label of the “Female” option to “Woman” or “Feminine”, for example, the formula will no longer be correct.

You can also use the “dot” notation to test whether a specific option is selected. For example:

  • Gender.Female evaluates to TRUE if the “Female” option has been selected.
  • Satisfication.[Very satisfied] evaluates to TRUE if the “Very satisfied” option has been selected. The brackets are required because symbols that includes spaces or other symbols must be “escaped” with brackets to avoid ambiguity.

If you use the dot notation, with the option label as a symbol rather than a string, then ActivityInfo can automatically update your formulas if the option is later renamed or corrected.

Next item
Default value