Select to view content in your preferred language

Inconsistent Data Pull vs. Select_one

108
6
Jump to solution
yesterday
EmilyBuck
Occasional Contributor

Hola, fellow form fashioners!

I am updating a form and trying to improve its efficiency for the user and on our end, datawise. We collect  address information from customers in this form, and I have a csv document that I manually update (comes from different software) which I use to pull the addresses customers have in that system. However often the address is old, or for some reason that person is not in the currently attached csv, and then it must be entered manually. We mail out postcards based on this survey, so getting the address right is important and reduces a lot of effort on our end when that time comes. There isn't much I can do about the street address entry because we have a lot of weird rural addresses, but I can control the accuracy of the city/state/zip code. 

When the pull is not successful, I would like the user to be able to fill city/state/zip into a field that will autocomplete, like a select_one. 

Can this be done in one field (I'm assuming not), or do I need to have a dependent second field that calls on the list of options.. If the second route is best, how is best to check for a successful pull from the csv? You'll see one of my attempts in the 'relevant' column for cityzip_manual.

I am attaching a screenshot of the relevant xls section, I am hoping that is enough since I cannot share the full document. Thank you very much for any help! 

0 Kudos
2 Solutions

Accepted Solutions
Neal_t_k
MVP Regular Contributor

What you could do is set up 2 sets of address questions one from the feature service and one from the CSV. Then add a toggle that will make the CSV entries relevant if the pulldata from the feature is not successful.  After that you could do a collate for each address item to return a final address:  if(stringlength(${AddressFS})=0,${AddressCSV},${AddressFS})  etc.

for the relevancy you can try: string-length(${cityzip_pull})=0   or ${cityzip_pull}=''

You could also add a manual yes/no question to toggle the csv entry.

If you only want t keep 1 address, null the FS and CSV address questions and only collected the final collated questions.

 

View solution in original post

abureaux
MVP Frequent Contributor

a field that will autocomplete, like a select_one.

Have you considered using a "geocode" text field? This could be a reasonable replacement for the manual entry component, and can be combined with the method you are already using. You can use formulas to extract address components automatically. E.g., example below, or the link above is the Blog Post.

abureaux_2-1769026445222.png

This tends to work best for more popular locations. Rural is always hard. I also work with rural addresses, and in this situation I would still use this format. I simply allow users to update all the different address components after they do their initial search (hence the "relevant" statements in my example above).

If you are curious about what is returned, that is what the yellow row is for. You can safely omit it for regular use.

 

If you want to combine something like this with your current system, you can update the calculates with coalesce(). Coalesce() basically combines two fields and keeps the first valid answer. E.g., Based on my example above and your image, if you wanted to override the CSV selection with the manual selection, something like this would work: coalesce(${site_civic},${Street})

View solution in original post

6 Replies
Neal_t_k
MVP Regular Contributor

What you could do is set up 2 sets of address questions one from the feature service and one from the CSV. Then add a toggle that will make the CSV entries relevant if the pulldata from the feature is not successful.  After that you could do a collate for each address item to return a final address:  if(stringlength(${AddressFS})=0,${AddressCSV},${AddressFS})  etc.

for the relevancy you can try: string-length(${cityzip_pull})=0   or ${cityzip_pull}=''

You could also add a manual yes/no question to toggle the csv entry.

If you only want t keep 1 address, null the FS and CSV address questions and only collected the final collated questions.

 

EmilyBuck
Occasional Contributor

This sounds fabulous, thank you, I will attempt. I am wondering if you can tell me, or point me to an article, that will explain how to "null the FS and CSV address questions". That is something I've been wondering about doing but haven't had luck searching forums. I apologize if this is a very silly question. Thank you! 

0 Kudos
Neal_t_k
MVP Regular Contributor

@Emily   https://community.esri.com/t5/arcgis-survey123-blog/the-power-of-nothing/ba-p/893649

Neal_t_k_0-1769026684861.png

rows with this will just be available in form, and not submitted.

EmilyBuck
Occasional Contributor

oh cats in boxes... it was that easy. Thank you! Have you ever been a hero to someone so easily before 😂

0 Kudos
abureaux
MVP Frequent Contributor

a field that will autocomplete, like a select_one.

Have you considered using a "geocode" text field? This could be a reasonable replacement for the manual entry component, and can be combined with the method you are already using. You can use formulas to extract address components automatically. E.g., example below, or the link above is the Blog Post.

abureaux_2-1769026445222.png

This tends to work best for more popular locations. Rural is always hard. I also work with rural addresses, and in this situation I would still use this format. I simply allow users to update all the different address components after they do their initial search (hence the "relevant" statements in my example above).

If you are curious about what is returned, that is what the yellow row is for. You can safely omit it for regular use.

 

If you want to combine something like this with your current system, you can update the calculates with coalesce(). Coalesce() basically combines two fields and keeps the first valid answer. E.g., Based on my example above and your image, if you wanted to override the CSV selection with the manual selection, something like this would work: coalesce(${site_civic},${Street})

EmilyBuck
Occasional Contributor

Thank you very interesting! I will look into it. 

0 Kudos