Blank Values When Primary Conditional Question is Updated

492
4
07-24-2020 12:00 PM
SurveyAdmin
New Contributor II

All,

I believe I am experiencing a bug in Survey123 Connect (v 3.1.9.20) where I have a select_one question that has a list of job locations.  Depending on what the user inputs as a job type one of four conditional questions becomes available to answer to detail the original job location. However, if the user chooses job location "A", and populates the required conditional question that follows but decides before submitting the survey, that the original job location selected was incorrect and changes job location from "A" to job location "B" and answers that related question, I will have a "blank" value in the original conditional question.

Ultimately, what is happening the conditional question that was selected first is "blank" instead of null, when the primary question is changed.

This is an issue especially when using Dashboards b/c there is now a blank value in and of the corresponding charts.

Has anyone else experienced this issue?

0 Kudos
4 Replies
Philip-Wilson
Esri Notable Contributor

Hi there,

Can you please check and confirm the version number, as 3.1.9.20 is not a valid release number?

Apart from the version number, what you are explaining is the correct behaviour. It appears you are making questions not-relevant based on the answer to the first question. In that case, when the questions are no relevant, they can not have a value. When you go back and change the first question, you make the following questions not relevant, so they lose their previous values, and then when a new answer is selected they will become available to be answered again, but have no value.

The reason you are seeing a different between "blank" and "null" is that during the editing process of these questions in the form, the first time it was answered has created an entry for that question, so it gets blanked out when made not relevant. This is different to when the question has not been answered at all and is no relevant, as there is no entry for that question to start with.

Regards,

Phil.

0 Kudos
SurveyAdmin
New Contributor II

Phil, 

Thank you for your reply.  The Correct version is 3.9.120.

Your response makes total sense, however on the "post processing" side this complicates the process of calculating fields and values outside of Survey123.  

I guess there are a few follow up questions:

1. Is there a away in Survey123 that IF the response to the first question is changed that the questions that have blank responses get "null-ed" out, thus eliminating the blank response?

2. Regardless of the selection of first question (there are 3 options A, B or A & B, all relevant questions to each primary selection are required, however would it be possible to set a calculation in the relevant field to set the value back to Null?

0 Kudos
SurveyAdmin
New Contributor II

Phil,

Thanks again for your reply, this behavior even though it is functioning as it should has presented a number of issues we have recently discovered with data that has been collected dating back to 2016.

Any information or suggestion on how to mitigate this within the Survey123 forms would be greatly appreciated.

0 Kudos
Philip-Wilson
Esri Notable Contributor

Hi Survey Admin,

Unfortunately there is no easy way to mitigate this from your survey forms on collection in the field app, as it is to do with underlying JSON data being stored in sqlite database, when you don't create something there is no values, but when you create something and then delete the value, this is different to not creating it at all. This is what happens when you change the relevance, and is why there is a different between a blank value and null value.

With the 3.11 release, which will be available soon, we will support a new "hidden" appearance on all question types and groups, you could use this instead to hide the questions, but keep their values and set the values to something you want, either null or a known value (9999) for instance. Not sure if this helps but it would mean the questions are never not-relevant and always have a value that you set. You can see the EAC documentation and get the latest 3.11 RC builds from the Early Adopter Community.

Regards,

Phil.

0 Kudos