Select to view content in your preferred language

Autocomplete appearance return values

1203
8
11-01-2024 03:59 PM
EngineeringLockport
Occasional Contributor

When pulling data from my survey into an ArcPro project, the field that I have set the appearance to be "autocomplete" is not returning the value selected in the attribute table of the feature service.

The user selects their address from the survey, utilizing an autocomplete appearance.  When I open the table in my project, or in the feature service, that field just says "address", not the address that the user selected.

EngineeringLockport_0-1730500802374.png

How do I get the actual address that was selected to show in the table?

0 Kudos
8 Replies
ChristopherCounsell
MVP Frequent Contributor

It sounds like a survey123 data entry issue?

Can you share the xlsform?

If the correct value hasn't been submitted there might not be much you can do to resolve it now.

0 Kudos
EngineeringLockport
Occasional Contributor

I have attached the form.  This is a "trial" run as I have not created a survey before.  I need to get this form to work correctly, and then incorporate the correct set up in the one that will be used to collect data from the public.

I thought it was a calculate "pulldata()" that I needed to populate the address that was selected by the user in the feature service table.  I most likely have the syntax wrong.

Any advice would be greatly appreciated!

ChristopherCounsell
MVP Frequent Contributor

So select_one will give the users a list to choose from.

If you want to have them pick from a CSV, you need to change it to select_one_from_file

https://doc.arcgis.com/en/survey123/desktop/create-surveys/multiplechoice.htm#ESRI_SECTION1_34A4D88B...

You can the have the csv published in the survey media folder or linked to a CSV item in ArcGIS online. Updating the CSV file means users need to update the survey or launch directly from the app.

The select one choice, external CSV or not, gives users a label to select, and populates the answer with the name value.

If you want to populate the answers from a feature service, use the select one question type and the search appearance:

https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformsappearance.htm#ESRI_SECTION1_46A7...

Pulldata() has a few use cases but it's more about using a value, to get another value. It's a calculation, not a user interface list/appearance. E.g. if a user entered 'school 1' in question 1, question 2 could use pulldata() to calculate the schools ID from a CSV lookup table, or pulldata from a layer to get the current status of the school (open/closed).

https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_A3C2F35...

I'd suggest reviewing the above documentation links, but it sounds like you want select_one list_name with the search appearance against your feature layer.

0 Kudos
EngineeringLockport
Occasional Contributor

Is there anyway possible to get a return value (in my feature service table) of what the user selected, without having to put them all on the choices tab?

0 Kudos
ChristopherCounsell
MVP Frequent Contributor

Yes, use a CSV, or search a feature service for the choice list.

https://community.esri.com/t5/arcgis-survey123-blog/dynamic-choice-lists-using-search-appearance/ba-...

select_one, with the search appearance against a feature service. No calculation or pulldata.

EngineeringLockport
Occasional Contributor

I have tried everything.  select_one with autocomplete search() using a feature service,  I have even tried adding some addresses in the choices tab just to see if it would populate the address data in the feature service table.

EngineeringLockport_0-1730552538785.png

EngineeringLockport_2-1730553104742.png

but I still do not get the selection populated in the feature service table.  It just left the column blank

EngineeringLockport_1-1730552586362.png

 

 

I am very new at all of this, and have never had any formal training, it is mostly what I have picked up along the way.  I am much more comfortable and knowledgeable with the field maps app and web maps than I am with setting up a survey.  I believe it must be something simple that I am missing, or some incorrect syntax.

autocomplete search("LCRR_Survey_List?url=https://services9.arcgis.com/lmEnUXi1wwpfbImi/arcgis/rest/services/service_990476ac0a1a4815b484b0894...")

This syntax did not return "address" in the address column, but a blank.

In the autocomplete search () I do not know how to get it to return the selected address into the table.  I will need this data to complete reports after the survey is finished.

 

Many apologies for not being able to grasp this even with all of your help.

 

0 Kudos
EngineeringLockport
Occasional Contributor

I was able to get the address to populate in the table within the survey form when "manage in survey website"

but that required me to use the choices tab for selection.  I will continue to work on adding all of those until I can find a better way due to being on a bit of a deadline.

 

Thank you for all your help.

0 Kudos
ChristopherCounsell
MVP Frequent Contributor

https://community.esri.com/t5/arcgis-survey123-blog/dynamic-choice-lists-using-search-appearance/ba-...

  1. Add the following to your survey sheet
  2. Add the following to your choices sheet (just one row):
    1.  list_name: address_list
    2. name: address 
    3. label: address 

You may also need to enable 'query' on your feature service, or ensure people accessing your survey can. I can't query the layer, so there's no way for me to get address results in the search.

ChristopherCounsell_0-1730701905593.png

should see query:
ChristopherCounsell_1-1730701914945.png

It's likely that you've disabled ability of anonymous users to see any results or results submitted by other users, which is a problem if they need to obtain the addresses from the layer.

If you want to see more examples please create the Sample form Dynamic Choice Lists Using Search Appearance in Survey123 Connect.

0 Kudos