How-to
Short answer: Add a Number field and compute it with Checkbox_Field.length().
Why it happens
Checkbox, multi-select and checklist fields hold a list of values. The length() method returns how many items are selected. See list expressions.
How to fix it
- Add a Number field to the form.
- Turn on Is this a computed field? to open the formula builder.
- Enter
Checkbox_Field.length(), replacingCheckbox_Fieldwith your checkbox field's ID. - Click Evaluate to test it, then Save.
Related list methods:
- To check whether one option is selected, use
Checkbox_Field.has("Option")inside anIF. - To check that several options are all selected, use
Checkbox_Field.hasAll("Option 1", "Option 2"). - To show the selected options as text, compute a Text field with
Checkbox_Field.concatenate(", "). - To read one selected option, use
Checkbox_Field.get(1). Positions start at 1.
Tip
To make users pick a set number of options, add the Min number of selections or Max number of selections validation to the checkbox instead.
