Select to view content in your preferred language

Pulldata using JSON script 'mostly dead'

186
1
08-14-2024 10:52 AM
mmike_biologist
New Contributor

I have a public Survey123 form with an associated Script for pulling 3 attributes from 3 public feature layers (all polygons; i.e., County). Selected geopoints would then have the additional attributes (hidden questions) added in the data.
The script and form were pulling attributes from the public feature layers just fine, then unbeknownst to me, it stopped pulling in those attributes. I did not change those hidden questions in the form, nor did I change the JSON script. I also checked and those feature layers I want to pull from are all still public.
The kicker: I went into the Survey123 data to edit an observation, and as soon as I edited it, the pulldata apparently worked. When I edit a record it successfully performs a 'pulldata' and fills the 3 fields just as it was originally doing, and it pulled the correct attributes for that geopoint etc.
1. Any idea what caused these pulldata lines in the S123 form to suddenly stop working?
2. Why would a pulldata only work if I edit a record within the data tab of Survey123 web page?
3. As much as I'd like to know the answers to 1. & 2., I would greatly appreciate any tips to get the pulldata functions working again as the data comes in.

0 Kudos
1 Reply
DuncanC
Frequent Contributor

I think your issue is the public + javascript combination. You can pulldata @layer in public surveys, but you can't use javascript.

"JavaScript functions are only supported in forms completed by users in the same organization as the form author."

https://community.esri.com/t5/arcgis-survey123-blog/extending-survey123-smart-forms-with-custom-js/b...