Validation syntax for multi-select: all options selected


For a questionnaire to include participants, we would like to include only women that have all 4 criteria selected (name: incl_actions). I created a multi-select question with: 1, 2, 3, 4. Then if they do not comply with all 4 criteria, I would like to add a “static text” that this woman is not eligible. What syntax can I use for the validation?

I tried different syntax: incl_actions.ContainsAll / ContainsAny / ContainsMissing, but all of these did not work, and I could not find the answer on the forum yet.

Hope someone can help me out. Thanks you in advance,

Kind regards,

Consider an enablement condition like this:

// enable if incl_actions does NOT contain all of these codes: 1, 2, 3, 4
!incl_actions.ContainsAll(1, 2, 3, 4)

When this enablement condition is added to the static text, that text will appear when the condition above is true and not appear otherwise.

See results below:

Where have you encountered ContainsMissing?

You wrote that it didn’t work. What is it supposed to be doing?


    !incl_actions.Length == 4


Many thanks, that works perfectly!

Dear @sergiy
Thank you for your response. I just tried different things, as I was browsing through the forum and SurveySolutions documentation to find a syntax that would allow us to show the static text in case all four elements applied. Both !incl_actions.ContainsAll(1, 2, 3, 4) and !incl_actions.Length == 4, work out well. Many thanks for your assistance.