Data is Null Error

2242
11
Jump to solution
03-02-2022 01:04 PM
BrandonA_CDPH
Occasional Contributor II

I have generated a Survey123 form using Survey123 Connect. I can't just "eliminate and add back in (which is my usual method of troubleshooting)" because I can't get the error to show on my side. Two users are both trying to test it and get the following error: "Data is Null. This method or property cannot be called on Null values."

I am using Connect version 3.13.239 and all three of us are using version 3.13 of the Field App.  This has happened on desktop and iPhones for both users.  I, as the survey owner, have had no problems at all on iPhone, iPad or computer.

I can't find any documentation showing what this error means or how to chase it down.  Any hints are appreciated. 

I can anonymize the form if needed and post, but right now it has some internal references that make it harder to share publicly.

Thanks in advance.

0 Kudos
1 Solution

Accepted Solutions
joe
by
New Contributor

This reminds me of a similar issue I had... Strange things could happen when geometry isn't right. 

I noticed in your XLSX there are calculations of geopoint and geoshape. Try to alter the calculation to avoid null values, e.g. for "ActLoc":

'' + concat(number(${ActY_null}),' ', number(${ActX_null}))

Or use an interim question for the above calculation. 

Hope it helps 🙂

View solution in original post

11 Replies
abureaux
MVP Regular Contributor

Without more info, it's hard to say (at least for me!). You may wish to include the XLSX form to help with troubleshooting.

On the off chance it is something simple, have you tried submitting a survey with minimal data? Basically, enter data in only the fields marked required and leave all others empty (this also includes removing any "default" text that may exist). Then submit the survey and attempt to do with that survey whatever it is you normally do. If you get the error, it likely means you have at least one field that needs to be made required to stop users from submitting NULL data in it.

0 Kudos
BrandonA_CDPH
Occasional Contributor II

Thank you for the suggestions. I have been racking my brain all day on this

I have a lot of required questions, so I can try making less required, but I don't know if that will help. It's kind of a long form, but I have attached what I'm working with. I'm trying to figure out what the vague error message is telling me. It has something to do with null data, but I haven't had a problem with blank fields in the past.

There's a likelihood that I have just spent too much time with this thing and I'm missing something basic. 🙂

Thanks.

0 Kudos
abureaux
MVP Regular Contributor

Sorry. To clarify, I don't mean make fewer required questions. I mean just enter data for ONLY the required questions. I've had surveys where some field that I didn't think needed to be required ended up causing me issues if they were left blank. So, submitting and working with a survey that has the minimal amount of data can sometimes help root out strange behaviour.

I will have a look at the XLSX and see if it works for me.

0 Kudos
BrandonA_CDPH
Occasional Contributor II

That's a good tip.  I'll go through and double check things. I do have some hidden and calculated fields, so maybe it's something with those.

0 Kudos
abureaux
MVP Regular Contributor

I will still look at this as-is, but I wanted to mention quickly that some of your issue may be related your names. Everything in the name column needs to be lowercase (e.g., OverallNote vs overallnote). I will run through the document and make this change, but wanted to mention this as we will technically be working with different documents after that change is made.

0 Kudos
BrandonA_CDPH
Occasional Contributor II

Thanks.  I can make that change in the final version and will keep that in mind.

0 Kudos
abureaux
MVP Regular Contributor

I had to make three changes to get this to work:

  1. All names are now lowercase (publishing requirement);
  2. The choice list corract was missing (I would guess because it contained sensitive info and you removed it?). I replaced this with a placeholder for my test; and
  3. I had to remove the field actaddress (and the few associated fields) because it was a geolocator which I could not replicate.

I published from Connect 3.14.256 and filled out in Field App 3.14.237. I was able to successfully send the survey using the method I described above (I.e., only filling in required fields) without any issue.

At what point were your users experiencing this issue? I am wondering if I am missing a step. But right now, I am unable to reproduce the issue.

Before you go too far with your own testing, I would suggest making all of the field names lowercase and having users test again just in case that was causing some odd behaviour. 

0 Kudos
BrandonA_CDPH
Occasional Contributor II

Thank you for the thorough examination. It sounds like you had the same experience I did (no issues). The users are able to fill in all the fields,  but when they submit, it throws the error. I'll try making my field names lowercase and have them try again. Hasn't  been an issue in the past, but worth a shot.

0 Kudos
joe
by
New Contributor

This reminds me of a similar issue I had... Strange things could happen when geometry isn't right. 

I noticed in your XLSX there are calculations of geopoint and geoshape. Try to alter the calculation to avoid null values, e.g. for "ActLoc":

'' + concat(number(${ActY_null}),' ', number(${ActX_null}))

Or use an interim question for the above calculation. 

Hope it helps 🙂