1. What is the issue? Please be detailed.
I have a Cascade Selects question that has several layers, has multiple values in some cells, and I want to put a a choice filter with that has several nested If Statements which look like are not recognized. The issue is I'm using duplicate responses with some optional questions. The reason I'm doing it this way is because it will be easier to maintain a list this way instead of having unique named choices for every combination of responses.
This is what is currently in the choice filter in row 16 select_activity
If(${q_place2}!='','selected(username, ${username}) and selected(places0, ${q_place0}) and selected(places1, ${q_place1}) and selected(places2, ${q_place2})', If(${q_place1}!='','selected(username, ${username}) and selected(places0, ${q_place0}) and selected(places1, ${q_place1})', 'selected(username, ${username}) and selected(places0, ${q_place0})'))
which returns: XPath evaluation: cannot handle function 'If'
3. What have you tried to fix the issue?
My situation looks most similar to this but I couldn't find anything else similar on the forum. While my form validates by using these three by themselves, I don't know how to use them in combination with each other to get the behavior I want.
selected(username, ${username}) and selected(places0, ${q_place0}) and selected(places1, ${q_place1}) and selected(places2, ${q_place2})
selected(username, ${username}) and selected(places0, ${q_place0}) and selected(places1, ${q_place1})
selected(username, ${username}) and selected(places0, ${q_place0})
The basic logic is to start by looking at the column in the choices tab that is furthest to the right to see if its empty and proceed to the left.
I should also note that I made a post earlier today regarding Collect not displaying proper responses when regex is used in a choice filter with multiple comma separated values.
4. Upload any forms or screenshots you can share publicly below.
Farm_Time_share.xlsx (13.3 KB)