I have a Survey123 form where I extract a value from a polygon layer for a polygon overlapping with the surveyor's location using pulldata() and "GetValueAt".
Usually the location overlaps with just one polygon, and so the default behaviour of extracting the value from the first intersecting polygon is fine, but sometimes there are multiple.
In that case, I'd like to generate a list of the values of all overlapping polygons.
Is there any way to do this? I know it's not a default behaviour of pulldata() and this question has been asked before (e.g. https://community.esri.com/t5/arcgis-survey123-questions/can-you-use-pulldata-to-grab-data-from-mult... and https://community.esri.com/t5/arcgis-survey123-questions/pulldata-quot-layer-quot-and-multiple-recor...) but wondered if there were any workarounds people have come up with since? E.g. can I count how many polygons a point overlaps with, and then submit the requisite number of pulldata() requests (somehow ensuring that I don't just query the first polygon multiple times), concatenating all the values from each request?
Not sure it would work, but you could try something as you describe using query parameters; "outStatistics" to count the results and "resultOffset" to get each record. You might be able to use a repeat to get all the records dynamically but if there are not too many overlaps it might be easier to start just by making multiple questions up to the max number of overlaps and concat. Again not sure if it would work in practice.
https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer/
Survey123 Tricks of the Trade: pulldata("@layer") - Esri Community
Not sure if it would work for your work flow, but another option could be a select_multiple and a search appearance. You could search at the specific locations and the search would list all the polygons, the user would have to check all the boxes though for this to work.
Dynamic Choice Lists using Search Appearance - Esri Community
Or you could try: for the select multiple question depending on how many total polygons are in the feature, you may be able to populate all options in the "default" column, so when the list is populated every option is checked by default.
Either of these would take a lot of testing and experimentation to assess if it would work.