Can you limit the drop down list of domain values displayed in one field based on a value provided in a previous field using Arcade for Field Maps?

3520
8
Jump to solution
01-22-2021 04:01 PM
by Anonymous User
Not applicable

I have a dataset being used where a crew member will determine an Observation Code based on the conditions they're seeing in the field. Once they've selected the Observation Code they have to select a 'Recommended Follow Up Action' in a separate field. Currently, they have to select from the entire list of possible 'Recommended Follow Up' values that are in the Domain but ideally I'd like only the choices relevant to the selected Observation Code to be shown. Is this possible?

I've set something similar up for this in S123 but we're migrating the whole process to Field Maps. 

@Anonymous User  The expressions you shared in another thread in response to user Valven were really helpful for me, would you have any ideas? 

Thanks for any and all suggestions! 

1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Currently this is not possible using Arcade. Field Maps (and Collector) use the domains defined in the fields, types, or subtypes. There is an on-going effort with hosted feature services, runtime, and the apps to support contingent values that are published from ArcGIS Pro.

 

One option that might work for you (if you only need one field to control other fields) would be to define sub-types using the Observation Code field as the sub-type field. You could then define a different set of domains for each sub-type. Sub-types can be authored in ArcGIS Pro and are supported in Field maps today.

View solution in original post

8 Replies
by Anonymous User
Not applicable

Currently this is not possible using Arcade. Field Maps (and Collector) use the domains defined in the fields, types, or subtypes. There is an on-going effort with hosted feature services, runtime, and the apps to support contingent values that are published from ArcGIS Pro.

 

One option that might work for you (if you only need one field to control other fields) would be to define sub-types using the Observation Code field as the sub-type field. You could then define a different set of domains for each sub-type. Sub-types can be authored in ArcGIS Pro and are supported in Field maps today.

by Anonymous User
Not applicable

Looking forward to when we can bring contingent values over from Pro, until then I'll look into the sub-type work flow you suggest. Thanks for the speedy reply! 

LeanneTough
New Contributor II

Do you have any documentation on this Aaron? I don't entirely understand how this would solve the problem.

0 Kudos
by Anonymous User
Not applicable

@LeanneToughSubtypes can have different coded values for each type of feature.

For example, say you are collecting fruit tree information. If the subtype field is "tree_type" and options are "Apple" and "Cherry", then for the "fruit_type" field you could have options of "Honey Crisp" and "Cortland" for apple trees, and have options of "Black Tartarian" and "Sweet" for cherry trees.

The main limitation is that this only works when a single field ("tree_type") is controlling the domains.

0 Kudos
GaryChristensen1
New Contributor II

I've created a group of attributes that I only want to display for certain subtypes - subtypes related to water utilities. So this is what I tried:  

var sublist
sublist = Subtypes($feature)

IndexOf(["Water Connection", "Water Junction Fitting", "Water Pressure Valve", "Water Service Valve", "Water System Valve"], sublist) >= 0

That didn't work, so it seems like I should  be querying the Subtype Code where "Subtype Code in (6, 13, 14, 17, 22) .  Any help with this would be appreciated.

0 Kudos
GaryChristensen1
New Contributor II

This is the expression that worked for me:   

var sublist
sublist = Subtypes($feature)
IndexOf([6, 13, 14, 17, 22, 23, 24, 25], $feature.assetsubtype) >= 0

0 Kudos
NurullahAdıgüzel
New Contributor II
In the current version, is it possible to restrict the domain using Arcade on Field maps?
0 Kudos
by Anonymous User
Not applicable

@NurullahAdıgüzelThis is not possible in the released version. The Field Maps team is actively adding support for contingent values - stay tuned.

0 Kudos