Hi all,
I am having trouble passing attribute data to Survey123. I created a simple form from the Survey123 web page containing two single line text questions and a map. I saved the form, and configured it to be accessed by me only and to open in the browser directly.
I created a webmap containing only this layer and the default basemap and saved it. I then updated the popup with a hyperlink to the survey that looks like this:
https://survey123.arcgis.com/share/8f45592bb9084c8592c90640f3a1c78c&field:Species={species}
Now when I click on the link either from my webmap or the Explorer app, the webpage loads correctly and the url looks like this:
https://survey123.arcgis.com/share/8f45592bb9084c8592c90640f3a1c78c&field:Species=Alder
Alder being the correct data, so the url seems to be working. However, the relevant question field (Species- in my form is still blank.
Can anyone explain why the form is not populating please?
Thanks!
Hi,
Have you checked the Survey123 form schema to confirm the name of the field? This is often different to the question title; it might be that the actual field name is "species", which would explain why it isn't populating.
Hi Joshua,
I have checked that, and in fact the actual name is 'species', but changing this in the popup url doesn't work either. I end up with:
https://survey123.arcgis.com/share/8f45592bb9084c8592c90640f3a1c78c&field:species={species}
and the url is:
https://survey123.arcgis.com/share/8f45592bb9084c8592c90640f3a1c78c&field:species=Alder
But I still have a blank box.
My schema looks like this:
Label Name
Species species
I feel like i'm missing something. Weirdly, if I change {species} to {Species} in the url, the reference still works (Alder).
One thing I wondered about is this: I am passing the feature layer created by the survey form to my map as I would like to be able to visualise the points created by field workers and then allow them to update the observations, or add new points (tree safety inspections) through the same survey. Do you think this could be the issue?
Thanks.
Hi,
I notice when hovering over those urls that it's still directing to &field:Species with a capital, I'm not sure if that is what is happening in reality or just what you've typed to me but it's worth checking. It seems you may have updated the display text but not the underlying link url. Otherwise the formatting of the url looks fine to me, it seems like everything is working properly except for the matching of the fields, or else the survey wouldn't be opening or "Alder" wouldn't be getting populated.
I don't think consuming the survey feature layer in the web map would be causing this behaviour. To avoid these potential issues you can try getting the field populating working outside of the web map, i.e. just clicking https://survey123.arcgis.com/share/8f45592bb9084c8592c90640f3a1c78c&field:species=Alder
Ah, no, sorry that was me being lazy and copying and pasting from above, rather than pasting the actual url - the url itself has definitely changed.
I have tried a couple of things since, including creating a separate feature layer, and following the ESRI tutorial exactly as I describe below, and i'm still encountering the same issue.
An update:
I followed the following tutorial: https://community.esri.com/t5/arcgis-survey123-blog/using-app-links-to-launch-survey123-from-explore...
Creating a survey and linking it with the Shenandoah Operational Map I downloaded via ArcGIS Pro. The only difference to the protocol was that I used the browser link https://survey123.arcgis.com/share/ rather than the app link. I has exactly the same issue. I got the survey and the correct field value in my url, but it did not pass it to the form itself.
Ahh, I should have looked at the documentation again. Replace the & with a ? and you should be fine.
"The Survey123 web app can accept parameters in the same format as the field app. The only difference is that you must use a question mark to separate the item ID of the survey from the first parameter, rather than an ampersand (ampersands are still used to separate parameters). The following example URL passes the surname and coordinate parameters to a survey in the Survey123 web app:
That's it!!! Thank you so much.
No worries, glad I could help out!