0

I am trying to populate fields with attributes from my feature layer service hosted on ArcGIS Online. I am using the JavaScript sample template available on Survey123 Connect and following along with the Working with web services section of this blog post about the pulldata() function.

When I use the web service url provided in the template my survey works as expected (populates fields with attributes of the feature that intersects with the geopoint). When I try with my own url from ArcGIS Online nothing happens. Am I missing something when publishing my layer as a feature service? It is shared with my organization and I am signed-in to Survey123. My URL looks like this: https://services6.arcgis.com/1QLe7xIMQ0LfJiB1/arcgis/rest/services/XXXXXXXXXX/FeatureService/0

1
  • Any luck with this one? I'm having similar issues with that function...works for other layers but not my published datasets.
    – Afidus
    Dec 14, 2023 at 16:05

2 Answers 2

1

Although a bit off-topic, please note that you can save yourself some time if you consider using Javascript, that Javascript functions are disabled when used outside your organisation or used on a public (non-login) survey.

0

Javascript is not required anymore:

The pulldata("@layer") function was introduced with Survey123 version 3.16 (October 2022). It allows you to query an ArcGIS layer and retrieve data from it ... [and] simplifies the syntax for querying ArcGIS layers, and it can be used in public surveys too!

Source: https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-pulldata-quot-layer/ba-p/1224415

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.