Validation For Enumlist Branches

Hello Everyone,

I am trying to setup validation for an Enumlist in a Form.
I have the following columns:
[Service] -->There are 3 options in this button-style, intentional Enumlist. Let’s say “A”, “B”, and “C” for ease.
[Selection] -->There are 3 button-style, intentional Enumlists with each list hidden until the corresponding [Service] is selected in the previous step. Let’s name these 3 lists: , [Y], [Z]. Each of these lists has 6 options.

I am trying to set up validation so that [Service] will show an error message in the following edge case:
1.) In [Service], an “A” is selected, revealing the corresponding [Selection], let’s say .
2.) In the corresponding list in [Selection], one or more options are selected.
3.) Then “A” is de-selected in the [Service] Enumlist .

This edge case results in the options in [Selection] still being selected and that data gets recorded when the form is submitted. I cannot set up a validation which shows an error to prevent the [Service] from being de-selected if a [Selection] was made.

I have the following validation:
AND(
CONTAINS([SERVICE],“A”),
CONTAINS(,ANY()),
(NOT(CONTAINS([SERVICE],“”)))
)

I tried multiple variations of NOT(), multiple AND(), OR(), but I can’t figure out the logic to get this right. My goal is to have this edge case covered for all elements in the tree (Service, Selection, and the 1-6 options) so de-selecting the parent triggers an error and does not allow any selected-but-hidden data entry. I spent many hours working tweaking and researching a solution for this but can’t seem to get anything right.

Once I get this logic, I plan to input custom IFS() logic for error messages which I will spend probably many more hours figuring out through trial-and-error what works. Having sounds logic in the validation will be a good guide for that though as I can probably decipher the IFS() step by step.

In these cases I typically make the independent column only editable when the dependent column is blank.

1 Like

Hey Marc. Thank you for the reply. Can you please elaborate? I am assuming the ‘independent’ column would be the primary [Service] which starts the branching, but how would I set it to only be editable if the dependent column is blank? I mentioned this in other words regarding my validation logic frustration in my post. I need some actual examples to work off of or something to tweak for my specific purposes.

Correct

By using ISBLANK() in editable_if.

1 Like

Thank you Marc! This worked like a charm! So much grief spent. I was even working on making a virtual column as a validation for selection. Your solution is much easier.