Can I use `pulldata("@javascript")` to parse a text file uploaded together with the form?

199
1
Jump to solution
07-25-2022 02:42 AM
WPG03WPG03
New Contributor II

In the survey form, I would require the user to submit a text file which contains the information to populate the form.  But I can't figure out how I can retrieve the text file.  Any suggestion? Thanks.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
ZacharySutherby
Esri Regular Contributor

Hello @WPG03WPG03

A JavaScript function wouldn't work as JS functions cannot access local files. One option for an in app solution would be an add-in for the Survey123 field app. 

Another option would be to post process the data using a Python script after the record has been submitted. If you need the data in the feature service as soon as the record is submitted you could configure a Python script with a webhook,  or you can schedule a notebook in ArcGIS Online to run every 15 minutes. 

Thank you,
Zach

View solution in original post

1 Reply
ZacharySutherby
Esri Regular Contributor

Hello @WPG03WPG03

A JavaScript function wouldn't work as JS functions cannot access local files. One option for an in app solution would be an add-in for the Survey123 field app. 

Another option would be to post process the data using a Python script after the record has been submitted. If you need the data in the feature service as soon as the record is submitted you could configure a Python script with a webhook,  or you can schedule a notebook in ArcGIS Online to run every 15 minutes. 

Thank you,
Zach