"not" condition for relevant or choice_filter fields

Hi everyone,

I am working on a form to calculate the Household Dietary Diversity Score. I have 6 select_multiple questions (one for each type of meal during the days), and each question has the same list of answers (food groups). I would like to add a 7th select_multiple question with the same answer list but with food groups corresponding to answer choices that were NOT selected in previous questions.

I tried to insert a "choice_filter column, with the following code for the 6th question:
selected(${Q1}, name) or selected(${Q2}, name) or selected(${Q3}, name) or selected(${Q4}, name) or selected(${Q5}, name) or selected(${Q6}, name).
This results in the 7th questions only listing as choices the ones that were selected in previous question.

I don’t know how to use a “not selected” condition in the “choice_filter” part. But I would like to ideally have something that would resemble this:
unselected(${Q1}, name) and unselected(${Q2}, name) and unselected(${Q3}, name) and unselected(${Q4}, name) and unselected(${Q5}, name) and unselected(${Q6}, name).

Could anyone help ?

Thanks a lot!

Welcome to the community @mhdw3! Maybe this post discussed previously should help you solve your issue:

Thanks a lot @Kal_Lam !! This does perfectly the trick.

1 Like