Select to view content in your preferred language

Autopopulate a field

1226
4
Jump to solution
04-27-2021 04:44 PM
PetronilaMandeno
Frequent Contributor

Hello,

I am building a survey in Survey123 Connect. I have it just about right except one thing. It seems it should be simple, but I can't figure out how to do this:

A user is asked for their mailing address. Then they are asked if their property address is the same as their mailing address. If yes, I want the property address field to auto-populate with the mailing address they just entered. If no, then I have a follow up text box appear where they can enter in their property address (which is the same field the auto-populate would write to if they had said yes).

I have the second part set up correctly, but I can't figure out how to do the former (auto-populate from the mailing address field).

Is this possible?

Survey is here: https://survey123.arcgis.com/share/242bfa0476af4548bb6a0296f4e54abc

1 Solution

Accepted Solutions
PetronilaMandeno
Frequent Contributor

Okay, in the end, I did get it to work. However, I had to take off a relevant condition, i.e. the question wasn't supposed to show up unless they answered 'no', because that seemed to thwart the calculation. And I ended up using the concatenate formula ('concat' or something like that) instead of just pointing to the field or using pulldata (which didn't work). Anyway, it works now. Fingers crossed it stays that way!

View solution in original post

0 Kudos
4 Replies
PetronilaMandeno
Frequent Contributor

I think I figured it out. I had the calculation in the wrong column. I think that's what I did wrong. I'll try more testing tomorrow...

if(selected(${property_address1}, 'Yes'), '${mailing_address}', 'Please enter your property address')

 

0 Kudos
PetronilaMandeno
Frequent Contributor

Okay, in the end, I did get it to work. However, I had to take off a relevant condition, i.e. the question wasn't supposed to show up unless they answered 'no', because that seemed to thwart the calculation. And I ended up using the concatenate formula ('concat' or something like that) instead of just pointing to the field or using pulldata (which didn't work). Anyway, it works now. Fingers crossed it stays that way!

0 Kudos
DougBrowning
MVP Esteemed Contributor

You put quotes around the field name is maybe why.  

Should be 
if(selected(${property_address1}, 'Yes'), ${mailing_address}, 'Please enter your property address')

PetronilaMandeno
Frequent Contributor

Argh! Such a simple (stupid) mistake! Oh well. When I went to concatenate, I must have dropped the quotes so it worked. I'm not going to mess with it now since it is working, but next time, it will be cleaner! Thanks. 🙂

0 Kudos