Background: I'm creating a survey form using Connect. One of the questions relies on a pulldata calculation referencing a separate feature service. Respondents are instructed to first create a polygon feature in one survey, then find it by name in the survey I'm working on now.
autocomplete search('Plowshed_Name?url=https://services2.arcgis.com/ZkOsbg84o8DsPPaP/arcgis/rest/services/service_846a043cc192441a9015bca80...') |
pulldata("@layer","getRecord","https://services2.arcgis.com/ZkOsbg84o8DsPPaP/ArcGIS/rest/services/service_846a043cc192441a9015bca80...","Plowshed_Name='110 Fourth Street South'") |
Problem: I can't get what I need using the dynamic list input, either the JSON using getRecord or the field value using getValue. Since I had success hardcoding the above and I'm hoping to query it for other attribute values, I'm mostly focused on using getRecord. I have the ${Plowshed_Name} as dynamic input using the appearance written above, which I pass through a text calculation ${Plowshed_name_string} made by concat('"Plowshed_Name=',"'",${Plowshed_Name},"'",'"'). The output exactly matches the value hardcoded to query the JSON in second bullet, single quotes, double quotes, and all.
The question using the dynamic input has blank value no matter what selection I make from the dropdown list. The calculation in question reads:
pulldata("@layer","getRecord","https://services2.arcgis.com/ZkOsbg84o8DsPPaP/ArcGIS/rest/services/service_846a043cc192441a9015bca80...",${Plowshed_name_string}) |
I've spent two days searching forums, referencing help articles, and interrogating copilot. I've tried adding custom JS scripts. What gives?
My guess is that the pulldata is firing before the selection is made, which would make sense. Try adding a relevant to the pulldata field of something like ${selection} != '' or string-length > 0. That way it does not run the pulldata lookup until it has a value from the selection.