I am setting up a survey to use the search() function to query a feature service layer to auto-populate values in a drop down for users to select. I then want other fields to auto-fill attributes in the Survey123 from the feature service layer with the pulldata() calculation. When I set up these functions, the list is empty and the pulldata() function (when tried separately) is also empty. The feature layer is in a referenced feature service hosted on our enterprise portal and the Survey123 form is being built in the same same portal. What am I doing wrong?
My search() expression in the appearance option:
w2 autocomplete search("site_name_picker?url= https://<enterprise_url>/server/rest/services/PNHP/NHA_EDIT/FeatureServer/0") |
My pulldata() expression in the calculate option:
pulldata("@layer", "getValue", "attributes.nha_join_id", "https://<enterprise_url>/server/rest/services/PNHP/NHA_EDIT/FeatureServer/0",concat("site_name='", ${site_name}, "'")) |
I've attached photos that show the .xlsx file and the blank drop down list.![survey123_1.PNG survey123_1.PNG](https://community.esri.com/t5/image/serverpage/image-id/114707i68DFE837243A8818/image-size/large?v=v2&px=999)
![survey123_2.PNG survey123_2.PNG](https://community.esri.com/t5/image/serverpage/image-id/114708i9A34A666A91D4EDC/image-size/large?v=v2&px=999)
![survey123_3.PNG survey123_3.PNG](https://community.esri.com/t5/image/serverpage/image-id/114709iF3712458FC2EBBA3/image-size/large?v=v2&px=999)