FormLogicError in survey123 webapp with relevant field: Context node was not supplied

4158
13
11-07-2019 01:56 AM
FernandoBenitez
New Contributor II

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

13 Replies
BritaVespere
New Contributor III

Hi,

I did remove relevance for repeats and applied minimal appearance and it does not generate empty rows. So I can confirm that it must be an issue that You mention.

However, I will stick to my original form and remove the empty rows later. 

PS I can see that there is an unusual behavior in the 'Data' section on survey123.arcgis.com regarding the way it shows data table and field names. I attached an image. I am not sure if this might already be detected...

s123_data_view_shifted

Regards, 

Brita

0 Kudos
DezsoLovicsek
New Contributor III

I am currently experiencing the situation you and Brita describe above.. one empty related record is being generated when the webform is submitted and the repeat is not relevant.

I tried to use the minimal appearance to prevent the empty record but whenever I use it I receive the formLogicError (Context node was not supplied). I tried several different configurations: moving the repeat outside of a group, and even removing the relevance condition on the repeat but I still get the same error in the webform whenever the minimal appearance is present on the repeat.

Since minimal did not work, I also tested using the compact appearance as well as putting the repeat inside its own group and putting the relevance condition on the group instead of the repeat. Though these attempts did not generate any errors, an empty record was still created when the repeat was not relevant.

Thank you for any insights that you can provide. I am using Survey123 version 3.11.

0 Kudos
Muhammad_AzhaziqBin_Mohd_Azlan
New Contributor III

Hello,

I'm using survey123 3.12 and it seem like the repeat with relevant statement issues in web app still not resolved after a year from last @JamesTedrick comment in Brita post about the issue in survey123 webApp. Is there any plan when this fix will be release?

0 Kudos
ZhifangWang
Esri Regular Contributor

@Muhammad_AzhaziqBin_Mohd_Azlan ,

The fix to the issue "minimal repeat with relevant expression leads to loading error in the Survey123 web app" is available to test on the Survey123 Beta website, it will be available in the next Survey123 December 2022 Update.

 

Thanks,

Zhifang

0 Kudos