How to Evaluate Multi Choice Fields

By David Gyenes, Director of IT

Many people are still struggling with multi-choice type fields. We have already seen examples on how to define the choices, how to add a selection to a multiple-choice field and how to remove a choice. However, we have not discussed how to check a value if it is part of the selected choices or not. There are two ways to check selected values but only one of them has the option to test the selection as follows:

numbers(‘Multi Choice Field’)

or

chosen(‘Multi-Choice Field’)

To simply evaluate the result, we would need to use the chosen() function. We can apply a second parameter to the syntax. Let’s examine how it looks generally:

chosen(‘Multi-Choice Field’, EVALUATION HERE)

This evaluation can be a number, array of numbers or a text string. When we talk about a number it refers to the ID of the choice. If we want to check for text, we must refer to one string. Here are the examples for that:

chosen(‘Multi-Choice Field’, 1)

(Is the first option chosen?)

chosen(‘Multi-Choice Field’, [1,2])

(Are the first two options chosen?)

chosen(‘Multi-Choice Field’, “text here”)

(Is the “text here” option chosen?)

What we are getting as a result is a YES (true) or NO (false) if it is matching or not. The single ID number and the text are straight forward, but the number array requires a little explanation. When we want to know if multiple values are included in the selection; the formula would check if every value would be part of the original selection. It is an “and” condition, not an “or”. If one number is not part of it, then the result would be NO (false). This would complete all the possible functions surrounding the MC fields.

en_USEN