Select to view content in your preferred language

Using Calculated Values to populate Contingent Values

2281
17
Jump to solution
07-22-2023 05:20 AM
OliverIshmael
Frequent Contributor

I have set up a field group with Contingent Values to help filter combo box fields on my form. For some of these fields, I am using Calculated Values to populate default values to save users time.

The contingent values function properly within the form but once the user has filled out all the fields in the field group, Field Maps displays the error: 'Value combination is invalid' and then the survey can't be saved.

Is this a known issue / is there a workaround?

0 Kudos
17 Replies
OliverIshmael
Frequent Contributor
0 Kudos
KevinBurke
Esri Contributor

Thank you for the video @OliverIshmael . That is similar to what I configured on my end using my data and it worked fine in my case. So therefore something else must be going on. 

Is that map/data hosted in AGOL?

Can you share a copy with me to test with? 

-Kevin

0 Kudos
OliverIshmael
Frequent Contributor

Hi @KevinBurke do either of these users relate to you:

OliverIshmael_0-1692036637776.png

 

0 Kudos
KevinBurke
Esri Contributor

Hi @OliverIshmael 

 

Please use the ArcGIS Field Maps user account. 

 

Thank you

-Kevin

0 Kudos
OliverIshmael
Frequent Contributor

Thanks Kevin, I have sent you an invite.

0 Kudos
KevinBurke
Esri Contributor

Thank you for sharing the map with me @OliverIshmael . Can you also please share the feature service to the group? The map cannot successfully load for me to see the form without it. 

0 Kudos
OliverIshmael
Frequent Contributor

Hi @KevinBurke sorry about that, please try again.

0 Kudos
KevinBurke
Esri Contributor

Thank you @OliverIshmael. I've been able to resolve the issue.

For the Region and Site fields, your calculated expression needs to be changed to the following:
- return "1" for the Region field

return "2" for the Site field

The reason for this is because the value above represents the code in the coded-value domain applied to those fields. When the form loads in Field Maps, you will see the correct descriptions of "North West Wales" and "Coed y Brenin Forest Park" applied and the contingent values will work successfully. 

In arcade the syntax above assumes the value getting passed is the code and not the description, which is why it wasn't working previously. 

Thanks

-Kevin