Error: Initializing form ... survey123

1078
6
04-08-2019 09:33 AM
Highlighted
New Contributor III

When I try to access the url of my survey in the web application I get an error, the survey publishes it from suvey 123 connect and has in one of the calculations the pulldata function, from a cvs file, without this function the error does not appear anymore when I publish it, I attach the cvs file and the survey.
Thanks for the help, I really need it.

Reply
0 Kudos
6 Replies
Highlighted
Esri Frequent Contributor

Hi Liliana,

Thanks for sharing the xlsx file and csv file. I am looking into the issue and can see the error on the web form. The problem appears to be with the Fecha Acta de Inicio column heading which an error can be seen in the developer tools console logs when opening the web form.

As a test I removed all the columns except the 2 that are required for the pulldata() function. With only the 2 columns in the csv and save file as an actual csv (with comma separator, not tab, space or other format) I was able to successfully use the pulldata() function on the web form.

So seems there are a few issues and we need to investigate further, in the meantime you can workaround the problem by simplifying your csv file to just the columns you require and ensure it is a comma csv.

Regards,

Phil.

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

Hi Liliana,

After doing some more investigation into why the csv file will not load with pulldata() on the web app, it appears the names used as column names in the csv are not supported. It appears you are using the alias names in the csv from when you exported this csv from the feature layer. However these column names contain spaces, hyphens, extra long names, and ` characters above letters. These are not supported as per naming convention for field names in feature layers/tables and for name column in survey123 questions. If you update the csv column names to not include spaces, hyphens, extra long names, and ` characters the csv will load correctly in the web app.

Phil.

Reply
0 Kudos
Highlighted
Occasional Contributor II

Is this "Error: Initializing form... Failed to load data" message still an issue with csv file column header names? I'm trying to embed a survey into a dashboard in AGOL. If I cancel out of this error, my survey form appears in the embedded content page, but no data from my csv file will load. 

I tried loading another survey instead, with slightly better results. Some fields loaded (using pulldata), but others didn't. Date field, email links, and geopoint mapping (using lat/long fields from csv file) are not working in the dashboard.

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

Hi Adam,

Yes, it is likely the error above is caused by an invalid CSV file. If you are not seeing the data values in the question that use the pulldata @ CSV after you dismiss that error, it means there is an issue with the CSV file, likely has unsupported characters in it.

Regards,

Phil.

Reply
0 Kudos
Highlighted
Occasional Contributor II

I cleaned up my csv header names and republished the survey but am still getting the same error when I try to embed the survey into a dashboard. Is there more detailed info on what is not supported? Would field length or using multiple underscores in a column header be an issue? Could Survey field names, labels, or types cause this?

I don't have much to go on to tell me where/what is causing it to not work, just the generic "Error... Failed" message.

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

Hi Adam,

Yes, it is likely there is something in either your survey or external csv file that is not supported or causing the issue. Can you share your xlsx form file and the external csv file so we can take a closer look?

Regards,

Phil.

Reply
0 Kudos