Not selected from two multiple selects

I am sure that this problem has a solution, I just can’t find it and can’t figure it out, so really appreciate anybody who can help figure it. I attach a skeleton for of what i am trying to do.

  1. I am asking which diseases are impacting farmers as a select multiple.
  2. I then ask what vaccines are used as a separate and independant select multiple. Noting that not all diseases have vaccines.
  3. I then need to identify the diseases that: were selected in 1 AND have vaccines in the choices sheet BUT the vaccine was not selected in 2
  4. I then ask specific questions about each disease in 3 with a repeat group

So if the respondent says diseases a and b are problems, but does not vaccinate against a and b then the repeat group should ask questions about vaccines a and b

In the skeleton example I highlight the cells where I think input is needed. I also include a column in the choices sheet to link vaccine to disease because I am sure that this is part of the solution

SelectMultipleExample.xlsx (16.1 KB)

Hey .. ! :waving_hand:

You can try this:
SelectMultipleExample.xlsx (16.5 KB)

I've highlighted all of the changes in yellow for easier reference.

Have a great day! :smile:

2 Likes

Thanks very much. @MinimalPotato . This is a really nice solution and I would never have thought of it

1 Like

That's a clean solution, I wouldn't do much different!

I had a reply drafted on my phone yesterday but needed to get back to desktop to create a working example. Beaten to the punch.

If a vaccine can cover >1 diseases you could have a space separated set of disease name values in the filter (eg for humans, MMRV in the vaccine list would have a disease filter value of measles mumps rubella varicella). Or you could flip the logic and put a vaccine column against the diseases and insert a space separated list of all vaccines that apply to the disease (for this example, vaccine_filter for disease_01 would be vaccine_01 vaccine_02.) Would only need small changes to existing logic to use selected instead of =.

3 Likes

Thanks @ahblake . That is a helpful addition. Multivalent vaccines are something that I need to cover and had not quite solved, so will give your suggestion a shot