Select to view content in your preferred language

Cannot read properties of null (reading '0')

2951
3
01-18-2022 01:19 AM
Maryse
by
Emerging Contributor

Hello,

I am having the error message Cannot read properties of null (reading '0') when trying to edit a record from S123 website.

Details about the survey:

# I have created my survey in S123 Connect

# I am using a simple .csv file (~200 locations + some details), there is no special character in the title just uppercase

# I do not use repeats

# I am using exif & pulldata just to extract photo latitude/longitude, as below, for each of the 6 photos areas

Calculation -> pulldata("@exif", ${_photo_upstream}, "GpsLatitude") | bind::esri:fieldType -> esriFieldTypeDouble

# I also have a photo name "question" (for the report as we want the site_id in the photo name + the specific name of each photo) with a calc field completed as below:

Calculation -> ${site_id} + ${_photo_area1} 

# I also have a couple of questions conditioned to hide the "details" text box. The surveyor has to select any of the choices  for the text box to appear (it will appear for every choices)

Relevant -> ${fence_crossing}='yes' or ${fence_crossing}='no'

# All the 'select one' and 'select multiple' questions are formatted as below, for the 'other' choices:

Relevant -> selected(${access_}, 'other')

 

A guess: 

The surveyor do not necessary take photos for each of the 6 areas. However, when NO photos is taken, the latitude and longitude show up with a 0 value in S123 website (when it should be null ?). I thought this might be the issue however when all the photos are taken (so no 0 lat/long) the error is still appeearing.

I am able to edit a record even after receiving this error message, however, all the calculations indicated above are being cancelled after re-submitting.

/The records just need editing for a  checker and approver to add their name + date/

 

Tags (3)
0 Kudos
3 Replies
by Anonymous User
Not applicable

Hi @Maryse,

There could be an issue with the CSV file, we normally see this error when there is unsupported characters in the CSV, or a blank line at the end, or some other formatting issue. Opening the CSV is NotePad++ and inspecting it can often help, as opening in Excel saves the CSV with additional formatting.

If you can please send your Excel (XLSForm) and CSV file I can take a look.

Regards,

Phil.

0 Kudos
Maryse
by
Emerging Contributor

Hi @Anonymous User 

Please find a sample of both .csv file and the survey form. Formatting is the same beside few "general" questions and anyway the issue is still applying -> photo coordinates disappear when resubmitting from S123 website.

 

Many thanks,

Maryse

0 Kudos
JhoanUrquia
Emerging Contributor

Hello @Anonymous User 

Im phasing the same error when I'm traying to use the "mode=copy" URL parameter 

This is because that parameter is not supported on Enterprise? 

 

Any idea?

 

Thanks in advance  

0 Kudos