I am trying to pull a list of Case IDs into a dropdown menu using Survey123 Connect.
I've inserted the following info in the appearance column of a "select_one list_caseID" row:
autocomplete search('list_case_id?url=https://services8.arcgis.com/euhkr1dAJeQBIjV0/arcgis/rest/services/service_fb0410d92ff74e75981d175d7...')
The dropdown field is blank and even when I type in the field, no results populate.
Can someone help me with this?
Solved! Go to Solution.
Hi Nicholas, thanks for providing your XLSForm.
Currently the name and label for the list_caseID choice list are caseID and Case ID, respectively. Could you please try making the name and label for the list_caseID choice list the same value, i.e. caseID (assuming this matches the field name in the feature layer exactly)?
Hope this helps. Best, Jim
Hi Nicholas, thanks for providing your XLSForm.
Currently the name and label for the list_caseID choice list are caseID and Case ID, respectively. Could you please try making the name and label for the list_caseID choice list the same value, i.e. caseID (assuming this matches the field name in the feature layer exactly)?
Hope this helps. Best, Jim
Thank you @Jim-Moore. I changed all my names and labels to "caseID" instead of "list_caseID" and this seems to have fixed the issue.
Thank you again!
@Jim-Moore
One more question. Is it possible to do a choice_filter when pulling an external list like this as well? I want to filter the caseID options that show up for specific radioBrands selected in this XLSForm?
Hi @RutledgeNicholas glad to hear you got it working.
Regarding filtering the choices - instead of using choice_filter, you can use the optional search/filter parameters in the search() expression itself, as described here:
Dynamic Choice Lists using Search Appearance - Esri Community
I am having an issue populating my survey xls form with the autocomplete search option, excel is not connecting the search function with the choices entry and offering validation rule violations. My problem is actually much bigger though so here it is in a nutshell:
I want users to enter a taxlot number from the autocomplete search function described herein; pulldata("@layer","getRecordAt"...) to retrieve said taxlot; and finally intersect said taxlot with various other layers (individually defined) to pulldata("@layer","getValueAt",...) and I keep breaking the parser with the attached xls form : (
I am working with Survey123 Connect v3.20.63, public REST services, and one hosted service also publicly shared. Many thanks in advance for any help on this.
Thanks for sharing your XLSForm. In the calculation for the geoshape question:
pulldata("@layer", "getRecordAt","<url>","MapTaxlot=${MapTaxlot}")
This should use the getValue operation to retrieve the geometry of the tax lot. The WHERE clause also needs to include quotes around the value. So something like this:
pulldata("@layer", "getValue", "geometry", "<url>", concat("MapTaxlot='", ${MapTaxlot}, "'"))
Check out the Query a Feature Layer sample in Survey123 Connect for some useful pulldata("@layer") examples.
Regarding the zoning and idrzone questions, unfortunately the calculations for these will throw an error because they're attempting a polygon-in-polygon query; the getRecordAt and getValueAt operations require a geopoint as input (i.e. point-in-polygon query).
Hope this helps, Jim
Thank you Jim! So many different sources for info had me confused, I appreciate your help. Cheers!
So now I have a different issue, this code
pulldata("@layer","getValueAt","geometry","https://gis.co.benton.or.us/arcgis/rest/services/Public/TaxlotService/FeatureServer/189", concat("MapTaxlot=' ",${MapTaxlot}," ' "))
is not returning the taxlot geometry and the survey still expects a point location input.
Seems like this is a simple enough concept but clearly I'm not catching on... and Survey123 connect won't show a map at all which is not helpful, I have to open the survey a web browser to see the map
The pulldata("@layer") expression shown above should use the getValue operation, as opposed to getValueAt. The distinction is that getValueAt requires a geopoint so that it can query the feature layer "at" a particular location; whereas getValue uses a WHERE clause to filter the features by attribute (in this case, filter on MapTaxlot and return its polygon).
Could you please try changing to getValue and see if that helps?
Jim