Hi everyone,
I have an extensive survey (10 pages) that works perfectly in any of the Survey123 apps, but when I launch on the web, the form could not initialize, showing up an error like
FormLogicError: Could not evaluate: (selected( /model/instance[1]/Encuesta_Ocupaciones_v2/info_loc_predio/tipificacionOcupacion , 'vivienda') or selected( /model/instance[1]/Encuesta_Ocupaciones_v2/info_loc_predio/tipificacionOcupacion ,'viviendaOtro')), message: Context node was not supplied.
What I have is a select_one list attribute ((tipificacionOcupacion) ) which lists 5 options, (Vivienda, viviendaOtro, cultivos , pastoreo). Later on, I have a set of questions in a repeat group that need to show only if two of the aforementioned options were chosen.
I have tried several options, but nothing seems to work.
(selected(${tipificacionOcupacion}, 'vivienda') or selected(${tipificacionOcupacion},'viviendaOtro'))
selected(${tipificacionOcupacion}, 'vivienda') or selected(${tipificacionOcupacion},'viviendaOtro')
${tipificacionOcupacion} = ('vivienda', 'viviendaOtro')
regex(${tipificacionOcupacion}, "vivienda|viviendaOtro")
regex(${tipificacionOcupacion},'vivienda|viviendaOtro')
Advice is greatly welcome because of I kind of desperate with this issue for all my surveys with multiples options chosen in a select_one list
Fernando Benitez
Hi Fernando,
Could you share the xlsx file?
Hi James,
yes I can, find it here enclosed, Looking forward to your insights,
just to make more clear, due to the survey is kind of big.
The field (row 18) is a select_one list (tipificacionOcupacion), once the user ticks Vivienda or Vivienda Otro, the repeat group in row 60 should appear if the user chooses the rest two options then this repeat is not displayed. Likewise, the note field (row 59) should be displayed only when user tick the options, Cultivos or Pastoreo. When I do the relevant for one choice works perfectly but when I add two options for this relevant then I got the error, once I display the survey on the web. I hope I’ve been clear. Please let me know if you have any questions,
warm regards
Hi Fernando,
Apologies for the late reply. It looks like the issue is when a repeat with a relevant statement is within the group. Could you apply the relevant statement to the group it's in (or make the repeat a page by itself)?
Hi James,
I'm experiencing the same issue, I have a repeat with a relevant statement (it is not within a group) triggering the same FormLogicError in the web app. The same form works fine in the field app. Just for testing, I applied the ?version=3.0 URL parameter at the end of the Survey link in the web and the FormLogicError does not appear anymore.. does it make sense for you? Could it be a workaround or just a coincidence? I'm configuring the survey for people who are beginners and I really would like to be sure that the configuration works perfectly in any environment. Thank you
survey123 connnect
Hi Elisabetta,
I would need to see the form to understand if this is the same issue; that being said, repeats are a type of group, so I could see that this could be the same issue.
Hi James,
Thank you very much for your reply, I can’t say how many times your hints, answers and suggestions in the forum helped me out to address all kind of issue or doubts!
I’m dealing with the repeats group for the first time.
Please, find at the links below a couple of excel giving the same result when used in web app (both work well in the field apps and in the web app if I add the URL parameter ?version=3.0). I’m sorry they are both quite messy, because they work on the same service and I did not have the time yet to clean up the useless rows in each one.
I get advantage for asking you a couple of things more:
Thank you very much!
Best Regards
Elisabetta
Hi James, sorry for my late reply...Yeah, I apply your suggestion and indeed worked, which I don't really understand how come this might be an issue.
Hello,
I have the same issue but I do not have the repeat inside a group. My survey is quite simple:
I have questions that are multiple choice and one of the choices is 'add other answers' -> Therefore, the repeat itself has a relevance. Inside the repeat is only 1 text question with no added restrictions or settings...
All was fine until I wanted to get rid of the empty related table rows, so I put an appearance 'minimal' for the repeat.
The error: FormLogicError: Could not evaluate: selected( /model/instance[1]/surveyname_v1/jautajums_3 , 'cits'), message: Context node was not supplied.
Is it possible to not have the empty rows in the related table? I do not need to be able to edit that data, the survey is for just capturing data.
Many thanks to any advice!
Hi Brita,
There is an issue when using the minimal appearance with repeat group in the web form currently. Are you seeing the empty rows get generated when the repeat is not relevant?