Combining DependentEnumeration with DependentField not working properly

Hi Modelling-Friends,

  • I have an enumeration and it’s values depend on another enumeration - a classical dependent enumeration. Easy! :slight_smile:
  • That (dependent) enumeration should only be displayed, though, if another condition is true - a classical dependent field. Piece of Cake! :cake:

The problem is, when I say that the dependent field should not only hide/show the enumeration, but also clear it’s value, when hidden, then the SME displays the following error:

The field [Id include_8f377_field_db87d] is part of a dependent enumeration and a dependent field with “Clear”, “Value”, or “Field Value”. The behavior of the combination is not defined.

Why is it not possible to hide and clear a dependent enumeration?
I can understand that setting a “Value” in the dependent enumeration would be a problem, because it is unclear if that value would be present. But I can’t find a logical problem with clearing a value.

Any ideas?

Thank you!
Bianca

Hi Bianca,

in order to clear a field that is also dependent on a dependent enumeration, it is necessary to apply a small workaround:

  1. The field of interest needs to be moved in a separate group (Data Model).
    CreateSubgroup

  2. Apply a clearing via dependent group on that group (Form Model).

Since dependent enumeration and dependent field can set or change the value of a field, this could lead to conflicting situations if modelled incorrectly, e.g. setting an initial value via dependent enumeration while also clearing the field at the same time using dependent field.
To avoid these situations, it is no longer possible to use a combination of dependent enumeration and dependent field as soon as the value is affected, which is also the case when the value gets cleared.

Best
Henner

Hi Henner,

sorry for my late reply!

Thank you, very much! Your solution/workaround worked :+1:

I still think that my case is a pretty normal and quite usual use case and should be supported without having to use a workaround. But, yes, I also understand the implications you mentioned and a clean solution is probably not trivial…

Cheers,
Bianca