Concat ID from 1 hidden auto response & 1 user input response

115
2
Jump to solution
06-06-2018 09:43 PM
Highlighted
New Contributor

I'm creating a survey for a state historical commission; I need to automatically populate a field to be used for ID creation. I need the "select_one" of the county name (CountyName) to automatically select the corresponding 2 character county abbreviation code (CountyAbbrev). I'm not sure how to make it choose the code once the county name is selected in a way that iI can then concat it into the ID number; I'd like (need, really) to keep the county abbreviation hidden, as well.

I have had success with getting the (CountyName) to create the ID:

concat(${CountyName},'-',${SurveyNum}) becomes CountyName-12345.

I need to be able to have

concat(${CountyAbbrev},'-',${SurveyNum}) becomes CN-12345.

I've not been able to find an answer to this particular situation.

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Esteemed Contributor

Hi Danielle,

There are a couple of different ways to accomplish this. The easiest would be to have the name of the county choice list be the county code; the user would see the county name, while you can use the code in the concat function.  Alternatively, you could create a lookup table and use pulldata to match based on the county (see Use existing data in your survey - the pulldata( ) function).

View solution in original post

2 Replies
Highlighted
Esri Esteemed Contributor

Hi Danielle,

There are a couple of different ways to accomplish this. The easiest would be to have the name of the county choice list be the county code; the user would see the county name, while you can use the code in the concat function.  Alternatively, you could create a lookup table and use pulldata to match based on the county (see Use existing data in your survey - the pulldata( ) function).

View solution in original post

Highlighted
New Contributor

Thank you! That did exactly what I need--without even needing to use the pulldata function!

Reply
0 Kudos