Select to view content in your preferred language

Arcade Combo box Filter Expression

607
2
09-08-2023 07:20 AM
Labels (3)
fjramos
Regular Contributor

Good morning,

 

I am trying to see if I can maybe get some help or get pointed in the right direction on creating an expression for filtering combobox (drop-down) attributes. I am currently attempting to do this on ArcGIS Online to use for Field Maps field collection. I posted a question previously asking if it was possible to do this, I got somewhat of a "yes" answer. I attempted to use the "Forms" tool in the Map Viewer with little to no success. I think I may have to create a custom expression, or maybe there's already a template expression out there that I can use. I'll provide screenshots below to explain what I am attempting to do.

1.) The "SUBTYPECODE" will determine what filters on the next attribute drop-down.

fjramos_0-1694182362808.png

 

2.) So once the selection is made on the first drop-down (SUBTYPECODE), the COND TYPE should only show related options, for example, "OH 1Ph Primary, OH 2Ph Primary, OH 3Ph Primary, Private OH 1Ph Primary, etc." and filter out the unrealted like "UG 1Ph Primary, OH 1Ph Secondary, etc."

fjramos_1-1694182362808.png

 

I have two "combobox (drop-down)" attributes that I'm trying to relate to each other. If I select something in the first combobox (SUBTYPECODE) I would like it to filter out what is not related on the second combobox (COND TYPE). I've tried looking up sample expressions, but haven't found any yet. I think to achieve this would require a "if" expression? Any info would help, thank you.

0 Kudos
2 Replies
RhettZufelt
MVP Notable Contributor

You can set these up as contingent values in Pro and publish to the hosted feature service to accomplish this.

Then, in Field Maps, when you select OH Primary, the 'related' options will show at the top as "RECOMMENDED", but the rest of the list (the red lined values) will still be available under "OTHER".

RhettZufelt_0-1694188426065.png

 

R_

 

 

fjramos
Regular Contributor

Oh man that's awesome! Unfortunatley we don't have Pro (yet).

0 Kudos