Select to view content in your preferred language

Create a dropdown menu of codes which will autopopulate the name from a related list in the next field.

523
12
Jump to solution
07-29-2024 06:35 AM
SarahJorgensen
New Contributor III

Hi there,

New to ArcGIS here, so please bear with me. 😉

I have several lists of coded features (e.g. habitat codes and bird species codes; please see screenshot below) which I want to apply to drop down menus in Field Maps Designer to collect data in Field Maps. I would like to create a dropdown menu for each of the 2 code types  which will autopopulate the name in the next field in Field Maps. 

Is there a simple way to do this in Field Maps Designer?

Thanks in advance.

IMG_0202.png

0 Kudos
1 Solution

Accepted Solutions
RhettZufelt
MVP Notable Contributor

This button in the map viewer will open the Form editor:

RhettZufelt_0-1722530902912.png

Then, highlight the field you want to calculate the value for (in this case ALT_NAME):

RhettZufelt_1-1722530933015.png

and click + New expression.  (The check mark next to PopulateFullName means that expression is attached to the selected field)

And this is what my expression look like:

RhettZufelt_2-1722530967434.png

Then Click OK and save the map.

You can also edit the Form in Field Maps Designer:

RhettZufelt_3-1722531265397.png

RhettZufelt_4-1722531272967.png

R_

 

View solution in original post

12 Replies
jcarlson
MVP Esteemed Contributor

I do not believe such a thing is possible in Field Maps. To my knowledge, dropdown menus there will be based on either a field's domain or a hard-coded list of options.

If you need a dynamic dropdown list, Survey123 is what you need.

- Josh Carlson
Kendall County GIS
0 Kudos
RyanUthoff
Regular Contributor

This might be possible using contingent values. It allows you to define valid field values that are dependent on values in other fields. It might be tedious to setup though. https://doc.arcgis.com/en/field-maps/android/use-maps/fill-out-forms.htm

You also might be able to accomplish this in Arcade, although it you might end up with a huge Arcade expression if you use a bunch of if statements. See this blog post. https://www.esri.com/arcgis-blog/products/field-maps/field-mobility/common-calculated-expressions-fo...

 

0 Kudos
RhettZufelt
MVP Notable Contributor

How is your list 'related'?

From your question, why can't you just use your coded lists as domains/choice list?  These will automatically be available as a dropdown in Field Maps app.

Are you trying to get the code in one field and the full name in the next?

R_

0 Kudos
SarahJorgensen
New Contributor III

Thanks @RhettZufelt.

Yes, I'm trying to get the code in one field and the full name in the next. Do you know how I can achieve this?

0 Kudos
RhettZufelt
MVP Notable Contributor

If you set up a Domain/Choice List on your first field (I used the NAME field):

RhettZufelt_0-1722437043173.png

Then in the edit Form, I have calculated value for the ALT_NAME field set to:

$feature.NAME

Then, when I add a feature and select the value from the dropdown in the NAME field:

RhettZufelt_1-1722437179692.png

The ALT_NAME field is automatically populated with the full name:

RhettZufelt_2-1722437211285.png

 

R_

 

SarahJorgensen
New Contributor III

@RhettZufelt thank you so much for this.

I have followed the first step of your suggestion fine.

However, can I just ask you to clarify where I can access the "edit Form" to get to the second step where I can calculate the value for the ALT_NAME field?

Thanks.

S_

0 Kudos
RhettZufelt
MVP Notable Contributor

This button in the map viewer will open the Form editor:

RhettZufelt_0-1722530902912.png

Then, highlight the field you want to calculate the value for (in this case ALT_NAME):

RhettZufelt_1-1722530933015.png

and click + New expression.  (The check mark next to PopulateFullName means that expression is attached to the selected field)

And this is what my expression look like:

RhettZufelt_2-1722530967434.png

Then Click OK and save the map.

You can also edit the Form in Field Maps Designer:

RhettZufelt_3-1722531265397.png

RhettZufelt_4-1722531272967.png

R_

 

SarahJorgensen
New Contributor III

@RhettZufelt Excellent! It worked! This exactly what I was looking for! Thanks for all your help.

0 Kudos
JamieCooper
New Contributor

@RhettZufelt Are you doing this in Field Maps Designer?

@SarahJorgensen Thanks for asking the initial question - I've been needing help on this for awhile.