Any way to retrigger/reload External Enumerations?

The values for the External Enumeration Dropdowns are always loaded as soon as the form is opened (when opening the Detail Activity).
In our case we have to (every time someone changes a relationship/binding) show different values in the External Enumation Dropdown. Basically our External Enum Values are dependent on the Relationship Binding values.
How do I retrigger loading the External Enum values (there seems to exist no action for that)?

Hi @werther-veiled-cliff,

the ExternalEnumerationProvider is called every time the dropdown renders. So any state change is sufficient. Or is the question about how to load new data into your provider?

Hi @tim-deep-thread ,

you´re right, we want to load new data into the provider :slight_smile:
Yes, the ExternalEnumProvider is called everytime the ui state changes. My problem is just, that the ExternalEnum is within a Detached Repeat. If a Field changes within the Form of the Detail of the Repeat then the provider is called, but if I change a Field outside of the Detached Repeat the Provider isn´t called anymore. In our case we want the Provider to be called/refilled every time a Relationship Binding (which is outside the Detached Repeat) is edited.

Ok, to get new data into your provider, I would suggest to listen to the Events.valueChange action of the binding dropdown in a middleware (or saga, if you need to fetch the new data asynchronously) and then update some global state (Redux or some good old global variable) which can be accessed by the provider.

To trigger the rerendering, I would create a custom control with the formModelMap that continues to render the default one, but has some additional dummy state that is dependent on your external enumeration values. If you store your data in Redux state, you could write a dummy selector.

Let me know if this solution works for you. Otherwise, I think a new requirement should be created. I’m thinking (no promises, just my personal thoughts) turning the ExternalEnumProvider into a customizable selector could help, because it rerenders the component on its own. Or maybe even a dependency mechanism for external enums has to be created