Survey 123 Webform not auto-populating geolocation from CSV.

739
7
09-10-2019 07:11 AM
RVG296
by
Occasional Contributor

I am trying to pull data from a CSV which has the lat long values for 4-5 cities and make the map automatically update when we select the cities. This is totally working fine in Survey123 Field and Connect, but the web version is not working. I used the right syntax for pulling lat lons in two different calculate types. I also made sure the data sources are correct. But still, I am confused why this error happens only in the webforms. When I look into the chrome developer console, I get this. 

Attached is the xlsx file and CSV file.

Tags (1)
0 Kudos
7 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Rohit,

It appears there is an issue in value conversion of your 'location' question.  Forcing it to be a string by setting the bind::type field appears to address the issue.

0 Kudos
RVG296
by
Occasional Contributor

But I do not want {location} to appear in the survey. Thats the reason I have to use null. I also used the same process as per this esri tech support doc for setting up the location.

Error: Initialing Form... Failed to load data from (data source) 

I think this was happening because I am using a calculated field to get the username (property('username'))in field type hidden But if I changed that type to Username and did the same thing, the webform worked fine. Not sure if that was the issue.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Rohit,

You can still have the bind::Esri:fieldType column remain null- I was referring to the bind::type column (these are separate, if somewhat closely named, properties).

0 Kudos
RVG296
by
Occasional Contributor

Should I be changing that to String for {location}

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Yes, set the bind::type column to 'string' for the 'location' question.

0 Kudos
RVG296
by
Occasional Contributor

I just changed that to String and checked my webform but still it is throwing up the same error.

0 Kudos
RVG296
by
Occasional Contributor

James Tedrick

Thank you James.

Once I removed the property('username') in the calculation, the survey worked fine on the Web too.

Not sure if that is the main issue behind this.

0 Kudos