Error--body::esri:visible and required

1340
11
03-01-2023 02:39 PM
DanielleG_Nashville
New Contributor II

I've been running a survey (published from Survey123 Connect) for over a month that had "required=yes" and the conditional visibility set in the "body::esri:visible" column; it performed last Tuesday without issue. This Tuesday--after doing the most recent Connect app update on Friday, and without making any changes to the survey / XLSform--the survey is failing to submit and seems to be enforcing "required=yes" questions that are not visible. As a temporary fix, I have moved the conditions to "relevant", but I need the data to NOT all be deleted if the questions are revisited, since the survey is being completed by students (who are accustomed to being able adjust a response as needed without losing another). None of the questions are in a repeat.

I saw this post: Survey123 Web: body::esri:visible vs required  but it does not address this issue as of the current update.

0 Kudos
11 Replies
IsmaelChivite
Esri Notable Contributor

Hi. I did a very simple test on this using version 3.17. See below. Both the mobile and web apps behaved as expected. That is, when the question 'example2' is visible, it is required, when not visible, it is not required. 

IsmaelChivite_0-1677795459675.png

We will need to explore this in more detail with your help. Can you share your XLSForm? If not, you may want to open an Esri Tech Support ticket.

DanielleG_Nashville
New Contributor II

Edit: Ok, it is breaking on a different survey as well, so I opened this back up! The below comment is still an oops on my part, but it didn't solve the overall problem!

 

 

When I got time to actually troubleshoot my survey rather than slap in a fix and quickly re-deploy, it seems to have had something to do with me accidently putting the command for an image question in the body::esri:visible column rather than the relevant column, and thus everything that followed that was dependent on the image question for visibility or relevancy wasn't showing up. I tried to recreate the problem outside of that, but it didn't re-occur unless I had the command in the image's body::esri:visible column. I think that the update simply enforced it not working there, which is what I now see that the Help Topics say should be the case for image questions.

I appreciate the help and consideration though!

0 Kudos
DougBrowning
MVP Esteemed Contributor

This broke all of my forms today also!  A field that is not visible is now tripping the required all of a sudden.  All my forms are now broke.  The visible is on a group if that makes a diff.

visibleandrelevantbroke.gif

JaivikP
New Contributor

@DougBrowning We are also experiencing the same issue, all our forms are broken. 

Upgraded S123 Connect to 3.17.54 and the conditions on body::esri:visible stopped evaluating in the survey. 

@IsmaelChivite Would be interested in knowing status on this issue. Is it related to version of S123 connect?

 

Thanks,

Jaivik

DougBrowning
MVP Esteemed Contributor

Mine it was the the required was still firing.  I got around this by adding my visible code to the required with an and.  The other option was change to relevant but it was not great for me.

ThomasWalker
New Contributor

How did that look, syntax wise? I cant access the below link, it is not available any longer.

0 Kudos
DougBrowning
MVP Esteemed Contributor

You can use the same syntax as you would in relevant column.  Anything that calculates to True.

0 Kudos
ThomasWalker
New Contributor

Could you provide me with an example? I'm really not sure how to put it in the field

I have surveys that still working presumably because they are version 3.15 but I cant use the syntax that worked previously in new surveys. I have tried just copying the old surveys to new ones and it works for a second then when any updates are made to it, the visible functionality just stops working. Updating relevant fields has had no effect either.

0 Kudos
DougBrowning
MVP Esteemed Contributor

${fieldname} = "yes"  or anything like that.  Post the form always helps.

0 Kudos