Single Selection

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 will be reflected in all previously collected data.

Data entry

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

  • If there are 10 options or less and the field is required, the field will be displayed as a series of radio buttons.
  • If there are 10 options or less, but the field is optional, the field will be displayed as a dropdown
  • If there are more than 10 options, the field will always be 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 will evaluate to the selected option’s label. So you can write formulas such as:

  • CONCAT(Name, " - ", Gender) and it will evaluate to, for example, “Nelson Mandela - Male”, or “Frida Kahlo - Female”.
  • Gender == "Female" , which will evaluate 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 will evaluate to TRUE if the “Female” option has been selected.
  • Satisfication.[Very satisfied] will evaluate 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 ambiguouity.

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
Understanding Key fields