I have a survey with a map question followed by a read-only question. The read-only question just pulls which polygon the submitter clicked on in the map question. When I test the survey on a desktop web browser, Survey123 Connect, or the Survey123 mobile app, the calculator works. However, when I test the survey on a mobile web browser, the calculation doesn't run. I confirmed that after submitting the survey on a mobile browser, the map point the submitter clicked on gets saved (e.g. the feature layer shows a point on polygon 23), but the calculated field is blank (rather than saying "23"). How can I fix this?
Here's the calculation for the read-only question in the XLSform:
pulldata("@layer", "getValueAt", "attributes.Name", "https://services1.arcgis.com/EQOIfJIstOsYk5kO/arcgis/rest/services/City_GeneralPlanSurvey/FeatureSer...", ${map_point}, "") |
Thank you!
Is the layer being queried a public layer or a private layer? And does the web survey pass the appropriate token (the logged in user's token is provided automatically) to access that layer?
If you open the console (F12), do you get any errors when you execute the query?
It was a public layer. Unfortunately I ran out of time to troubleshoot and had to restructure the survey so that the map was read-only with labeled zones, and the submitter would type their chosen zone in a text box rather than clicking on it. Then I learned even that wasn't reliable because the read-only map would only load on the mobile browser about a third of the time. I ultimately had to add the map layer to a new experience and then link to the experience within the survey as a backup for when the embedded map wouldn't load. Disappointing solution but it technically worked.