Whenever we have a data type of integer that has a null value reported on the survey (for fields that are not required), the actual data value that is stored for the field is 0. Is there some setting or some such that we need to set so that null values are reported as null instead of 0?
Based on some of our older data, this is a new 'feature'. We have records from older surveys where null integers are indeed reported as null instead of 0.
Thank you.
Solved! Go to Solution.
Hey Brandon.
Thanks for looking into this issue. I really appreciate your help and persistence.
Hello,
Is this still a known bug? I am currently experiencing the same issue, using Survey123 Connect 3.5.166. I'm getting null values when the survey is submitted from the web browser. The field app defaults to 0, but I have a survey that needs to be filled from the web browser. Any help is much appreciated.
Hi Martin,
The issue(s) mentioned in this thread have been resolved. Please share your XLSForm if you are encountering inconsistencies in submitted values between the field app and web app. Also provide us with the version of the field app that you are using when submitting the survey.
Best,
Brandon
Brandon,
Thanks for the quick reply. I'm using version 3.5.177 of Survey123 on my cell phone. On the XLSForm I have set the default to 0 for these fields, however all these fields/questions are conditional, only appearing on the form when the answer is 'yes' on the previous question.
The issue caused by these null values is that when any of the 4 calculation fields I have on the XLSForm encounters an empty value, it returns NaN as a result. I must be doing something wrong, I have just recently started using Survey123 Connect instead of the web designer.
Please find form attached.
Thanks,
Martin
Hi Martin,
The behavior that persists when submitting using the web app is actually the correct behavior. When a question is is not relevant, even a default value will not and should not be stored in the data. Only upon becoming relevant should the value be persisted.
We have a defect regarding the behavior that you are encountering with the field app, where default values are being populated even when the question has not yet become relevant. We are hoping to be able to address this with our next release.
The logic of your form may need to be reconsidered so that the expected behavior (default values not being persisted until the question becomes relevant) does not surprise you when it is fixed in Survey123 Connect and the field app.
Best,
Brandon
Hi Brandon,
Thank you for taking a look at my XLSForm and clarifying that! I just wasn't sure which behavior was the correct one. I still need these questions not to be shown unless the user replies 'yes' on the previous question, so I'll adjust my calculation fields so they convert any nulls to zeroes.
Thank you for your help!
Martin
Hi Martin,
The issue with default values populating when a question is not relevant has been fixed and you can test it out with latest 3.6 beta builds available on EAC. The latest version to test with is 3.6.100. Please let us know your feedback.
Regards,
Phil.