I am trying to write a custom error message that needs to refer to 2 different questions that are part of loops. Respondents identify which brands of products they use early in the survey, and then this constructed brand list drives loop blocks of questions throughout the survey from that point on.
Respondents then also identify what types of Representatives they see from those brands (Representatives2yrs) and there are 3 levels. Only 2 of those representative types are relevant to question (RepPercCases), and the second one is not shown.
I want to check if they selected Representative type 1 or 3 in (Representatives2yrs), and if not, display an error message in (RepPercCases) if they enter a value > 0 in (RepPercCases). Here is the code I am trying to use in Advanced tab ("after" submitting), but it doesn't work and gets stuck:
if (SSI_GetValue ("Representatives2yrs_1.1") == 0 && SSI_LoopValue() == 1 && [% RepPercCases_r1.1 %] > 0)
strErrorMessage = "You entered a value where we were not expecting one based on your previous question responses. Please verify you answers.";
Any suggestions? I am also not sure if it needs to refer to the loop iteration/values or not.
Any help would be appreciated.