error initializing [web] form but working in iOS App

1083
2
Jump to solution
02-05-2019 06:20 PM
JenniferMcKee
New Contributor

I have created a new survey in survey123 that pulls data from 2 csv files (that have no extra rows in them). I am able to open the survey in the Survey123 application but when trying to open the survey in the web form, which is how it will be used, i receive "Error: Initializing Form... Failed to load data from"

I've doubled checked everything i can find to double check and am fresh out of idea.

I have 1 csv that is used to prepopulate localities names in my area, which also has the region they're assigned to as well as their centroids. I am using this file to populate a hidden field to assign their region and well as trying to prepopulate the geopoint coordinates.

the 2nd csv file has specifics for shelters, name, address, and several other collected points. I do not have information for every locality so I have a choice field that pulls the locality they specified at the beginning and allows them to prepopulate the rest of the fields if they want to update values or they can enter brand new information.

1 Solution

Accepted Solutions
BrandonArmstrong
Esri Regular Contributor

Hi Jennifer,

I believe the error that you are encountering when attempting to load your survey in the web app is due to the pulldata function and calculation you are using for your geopoint(s).

If you take a look at the 'Calculate Location from CSV' sample in Survey123 Connect, you can see the recommended format for referencing lat/long locations using pulldata.

You will need to process different parts of your pulldata calculation into separate fields and then concatenate the lat/long values back together to be used in for the geopoint question.

Type         Name                 Calculation

calculate    lat                    pulldata('em_lookup','lat','locality',${locality})

calculate    long                 pulldata('em_lookup','long','locality',${locality})

calculate   location_calc    concat(number(${lat})," ",number(${long}))

geopoint   location             ${location_calc}

I have attached a sample of how this looks to this response.

Let me know how it goes.

Best,

Brandon

View solution in original post

2 Replies
BrandonArmstrong
Esri Regular Contributor

Hi Jennifer,

I believe the error that you are encountering when attempting to load your survey in the web app is due to the pulldata function and calculation you are using for your geopoint(s).

If you take a look at the 'Calculate Location from CSV' sample in Survey123 Connect, you can see the recommended format for referencing lat/long locations using pulldata.

You will need to process different parts of your pulldata calculation into separate fields and then concatenate the lat/long values back together to be used in for the geopoint question.

Type         Name                 Calculation

calculate    lat                    pulldata('em_lookup','lat','locality',${locality})

calculate    long                 pulldata('em_lookup','long','locality',${locality})

calculate   location_calc    concat(number(${lat})," ",number(${long}))

geopoint   location             ${location_calc}

I have attached a sample of how this looks to this response.

Let me know how it goes.

Best,

Brandon

JenniferMcKee
New Contributor

Thank you. That's actually how i fixed it late yesterday but didn't have a chance to update this post. I greatly appreciate you looking at it.