Select to view content in your preferred language

Survey123 Connect pulldata does not always pull the data

182
2
11-14-2024 05:07 AM
AdamAull
Emerging Contributor

Hello everyone. This issue appears intermittently. I have a Survey123 Connect XLSform using pulldata() that requests a value from a feature layer hosted on my ArcGIS Portal. The survey is hosted in my ArcGIS Online organization. Pulldata() is requesting values from the feature layer when the survey input falls inside a corresponding polygon.

While testing the survey and reviewing the results, I've noticed that sometimes the fields using the pulldata() function remain null instead of pulling the value. There hasn't been a solution I've found to explain or fix this. As first I thought the survey was completing too quickly for the values to pull from my Portal feature layer. So I entered multiple surveys quickly and got good results. The survey field is visible and I can see when pulldata() works and when it doesn't.

This project requires a Python script to process data server side. My thought is to add a catch to the Python which looks for null records, then use a MakeFeatureLayer, SelectLayerByLocation, and CalculateField to fill in the gaps. I'd rather not do that as it defeats the purpose of the pulldata().

Any advice is greatly appreciated.

pulldata("@layer", "getValueAt", "attributes.Subarea", "https://gis.____________.org/arcgis/rest/services/Administrative/EnvCode_Enforcement_Subareas/Featur...", ${Report_It_point})
0 Kudos
2 Replies
RaquelBBensadoun
Emerging Contributor

This problem just started today for us, could it have anything to do with the Esri update this week? Has this always been an intermittent issue for you?

0 Kudos
AdamAull
Emerging Contributor
Hi Raquel.

The project has been in development for a few months, with the pulldata() formula in use since October. This issue has always been present. I have a feature service running on my Portal from a published feature class in my SQL server. The feature class spatial reference is set to a local projection (NAD83 Illinois Stateplane East). The survey is pointing at another feature service on my SQL server with a spatial reference as WGS84 Web Mercator. This morning I was performing some testing on the with a Note field in the XLSform pulling data from the source feature service. There was a noticeable lag showing up in the form while populating the destination field. It acted as if the source feature service needed to be woken up, access the SQL, then pass the data back. I exported the source data from SQL into a file geodatabase, with a WGS84 Web Mercator spatial reference, and uploaded it to my Portal. After updating the pulldata() formula to pull from the hosted feature service. With further testing, the field relying on pulldata() to populate it work flawlessly.

I'm assuming that the lag was due to the Portal server requesting data from the SQL while possibly having to convert spatial references on the fly. Who actually knows? But it's working well now. Further testing will be needed to confirm.
0 Kudos