0 votes

Hi all -- I'm experiencing an issue with the *if function using the and operator. See code below. If I choose ONLY "Alternatives to dairy" or "Alternatives to eggs" then the program skips to the end when it should not. What am I doing wrong? Thanks much for your help.

*question: Which of the following types of food have you eaten in the past THREE MONTHS?
    *type: checkbox
    *tip: Select all that apply. If none of the options apply, leave them all unchecked.
    Meat including pork, beef, chicken, turkey, and other meats
    Fish or other seafood
    Dairy products
    Eggs
    Alternatives to meat or fish (e.g., veggie burgers, soy meatballs)
    Alternatives to dairy (e.g., almond milk, soy cheese)
    Alternatives to eggs (e.g., egg replacer)
    *save: screener

*if: not("Alternatives to meat or fish (e.g., veggie burgers, soy meatballs)" in screener) and not("Alternatives to dairy (e.g., almond milk, soy cheese)" in screener) and not("Alternatives to eggs (e.g., egg replacer)" in screener)
    *goto: end

 

by (5.8k points)

1 Answer

0 votes

There is an issue with the way not is parsed.

If you change the condition to 

*if: (not("Alternatives to meat or fish (e.g., veggie burgers, soy meatballs)" in screener)) and (not("Alternatives to dairy (e.g., almond milk, soy cheese)" in screener)) and (not("Alternatives to eggs (e.g., egg replacer)" in screener))

it will work.

by (5.8k points)
Welcome to Guidedtrack Q&A, where you can ask questions and receive answers from other members of the community.
134 questions
144 answers
55 comments
40 users