Set Conditional Visibility in Field Maps Smart Form using a wildcard for domain values

999
2
Jump to solution
06-01-2021 01:23 AM
CinthiaEichhorn
New Contributor III

I am new to Arcade, and  setting the conditional visibility on a Group in the Field Maps Smart Form based on multiple values in an attribute domain.  

Those values are:

bone

bone, carcass

carcass

feathers

feathers, bone

I can get the group to display for one value by using DomainName($feature,"mortremains")== "bone"

However, I would like for the group to appear if any of the attribute values have the text "bone" as part of the attribute value.  But, a wildcard option, doesn't seem available.  Tried the ||, but that didn't work either.

Is there a wildcard option in Arcade for the DomainName($feature,"mortremains")== "bone" ?

 

 

0 Kudos
1 Solution

Accepted Solutions
AaronPulver
Esri Regular Contributor

I think you could use the Find function to do this. It'd be something like:

Find("bone", DomainName($feature, "mortremains")) >= 0

I haven't tested this but I think it should work.

View solution in original post

2 Replies
AaronPulver
Esri Regular Contributor

I think you could use the Find function to do this. It'd be something like:

Find("bone", DomainName($feature, "mortremains")) >= 0

I haven't tested this but I think it should work.

CinthiaEichhorn
New Contributor III

@AaronPulver    This works perfectly.  Thank you!!! :smiling_face_with_smiling_eyes::smiling_face_with_smiling_eyes::smiling_face_with_smiling_eyes:

To help others who may read this, there was also another choice as well:

All three (bones, feathers, carcass)

So the field user has these options:

bone

bone, carcass

carcass

feathers

feathers, bone

All three (bones, feathers, carcass)

I have three groups in the smart form that need to appear for the field user: bones group, feathers group, carcass group depending on what they see once they track the VHF signal.  @AaronPulver 's solution allows the correct groups to display based on their choice.