Select to view content in your preferred language

Linking External choice list (csv) to survey123 form results in TypeError: Cannot read properties of undefined (reading 'map')

2677
4
Jump to solution
07-14-2023 02:19 AM
MichaelMole
Emerging Contributor

Hi, I have a strange error occurring on the survey123 Web APP.

  • I published a survey123 form from survey123 connect with an external choice list (select_one_from_file list.csv).
  • When I open the form on the Web App I receive the following error "TypeError: Cannot read properties of undefined (reading 'map')" and the geopoint map will not load.

The form functions perfectly without an error in the field App

I have tried publishing the survey with the choice list in the media file and I get the same error. 

If I publish the survey without linking the lists I do not get the error (but then obviously the select_one lists are not populated). It seems to only occur in the Web App and after I link an external choice list. 

I am using version 3.17.54

Any help with this would be great. 

Picture1.png

 

 

 

 

0 Kudos
1 Solution

Accepted Solutions
ChristopherCounsell
MVP Regular Contributor

Thanks!

For the csv:

  • Avoid the use of spaces or special characters in the 'name' column for the choices list. This has been a grey area as I've seen issues on this in the past, but sometimes it's identified as a requirement but other times not. e.g. in the blog but not the documentation for lists but then it is in the documentation here and here 
  • Same as above, duplicates aren't allows in the name column for choices per the blog
  • Rows 1154 - 1175 have no label values, a requirement

I'd recommend tidying up the choice list. You could start with the duplicate values and empty labels and see if that works. But I'd go farther with the special characters, as at some point in data mgmt world you'll hit an issue with them. If the issue persists, could take a deeper look.

@JamesTedrick can you see this post, and here, this idea, this help page, the rest of the ArcGIS Platform (Pro) and some of the existing defects/issues in the Esri system that have been submitted around the name column and choices / choice lists? 

Unrelated notes:

  • Right-click and 'paste-values-only' when working with Survey123 Connect XLSForms. Your calculations in the XSLForm indicate you have pasted with formatting. Seems to be OK in this instance, but doing so will override the cell formatting and remove data validation checks. e.g. you can paste reserve words and duplicate field names.

View solution in original post

4 Replies
ChristopherCounsell
MVP Regular Contributor

Can you share the XLSForm and csv?

0 Kudos
MichaelMole
Emerging Contributor

Hi magisian

See attached. xlsx and the choice list. 

Regards

ChristopherCounsell
MVP Regular Contributor

Thanks!

For the csv:

  • Avoid the use of spaces or special characters in the 'name' column for the choices list. This has been a grey area as I've seen issues on this in the past, but sometimes it's identified as a requirement but other times not. e.g. in the blog but not the documentation for lists but then it is in the documentation here and here 
  • Same as above, duplicates aren't allows in the name column for choices per the blog
  • Rows 1154 - 1175 have no label values, a requirement

I'd recommend tidying up the choice list. You could start with the duplicate values and empty labels and see if that works. But I'd go farther with the special characters, as at some point in data mgmt world you'll hit an issue with them. If the issue persists, could take a deeper look.

@JamesTedrick can you see this post, and here, this idea, this help page, the rest of the ArcGIS Platform (Pro) and some of the existing defects/issues in the Esri system that have been submitted around the name column and choices / choice lists? 

Unrelated notes:

  • Right-click and 'paste-values-only' when working with Survey123 Connect XLSForms. Your calculations in the XSLForm indicate you have pasted with formatting. Seems to be OK in this instance, but doing so will override the cell formatting and remove data validation checks. e.g. you can paste reserve words and duplicate field names.
MichaelMole
Emerging Contributor

Thanks

The csv choice list was definitely corrupted in some way. I cleaned it up and simplified some of the names. 

Its working perfectly!