Dependent enumeration isn't cleared in CDMs

Hi all,

I have another question to the tune of “Is this a bug or is this how CDMs are supposed to work?”

In my project, I’m implementing a dependent enumeration where the trigger enumeration is in a different document. This results in some strange behavior. Because my actual use case is quite abstract, I’ll use an example:

In my example, a user can specify which species of tree they are planting by first selecting a “type of tree” and then a specific “species”. The list of option displayed for the “species” is narrowed down based on what’s selected for “type of tree”. So here, “type of tree” is the trigger and “species” is the dependent enumeration. If I model this within the same data model, this works nicely. When I change my selection of “type of tree” my selection of “species” is cleared and I see the updated list of options:

firefox_C0SpN8njoQ

However, when I model “type of tree” in a different data model that is referenced via CDMs (which is the use case I need for my actual project), this doesn’t work. The original selection in my “species” enumeration is not fully cleared, instead I see the technical value for this enumeration without the proper label (I have chosen numbers 0-4 as the “values” in my enumeration and have only put the actual species names as the localized label to visualize this issue, see screenshot below). This technical value also appears in the list of options until I make a new selection and only then disappears:

firefox_AsUCVGl9lR

It seems like a bug to me but I want to double-check here first, because CDMs have some “unintuitive” behaviors built in that are still intentional.

You can download my workspace here: <INTERNAL_LINK>

Best,

Lea

Hi @lea-clear-clover

Thanks for the question and for providing the models. There’s a few different things going on at the same time and it was good to be able to see exactly what you are working on.

Here’s what you can see in your workspace

  1. There are 3 CDMs, one each for Parent, Child and Grandchild
  2. There are 3 CFMs, one each for Parent, Child and Grandchild
  3. When you select the Grandchild “Charly” you are opening up the Grandchild_FM using Child Activities
  4. The Dependent Enumeration is only modeled on Grandchild_FM
  5. The value change happens when interacting with Child_FM

The solution was to model the Dependent Enumeration on Child_FM as well. This leads to the correct functionality.

2024.06-ext6 Model
Child_FM.json (9.0 KB)

Hi @malcolm-silver-ice ,

thank you for that solution! I would have never thought to model the dependent enum in both form models because it isn’t part of the Child_FM in my mind (i.e. it isn’t used in that form). But in some ways I guess, it actually is.

Thanks again,

Lea