I have a drop down which contains dynamic options to for example select a customer.
When a customer is selected I want to show the customer data in a separate customer details group. This works.
When a customer not exists I want to add it using a pop-up. This also works.
But when a customer is added I want also that this new customer is directly selected by the dropdown, and therefore showing. the data of this created and selected customer in the customer details group. This part I can’t get to work. Somehow the dropdown and the customer details group are interfering each other in this use case.
Use a custom state on the dropdown to feed the default value of the dropdown. When you add a new customer, set that custom state and reset the input so it will get the new value, even if the dropdown was previously set to something else.
The dropdown with Default value set by the custom state:
Reset the dropdown input (By referencing the dropdown in the Only when condition, it causes it to be part of the reset even though it wasn’t part of this workflow. It will always be either valid or invalid, so always trigger):
This sounds quite easy indeed. I was thinking about using a custom state but I didn’t think about the reset input option. Specially using the only when condition to put this input in scope of the workflow is a very nice thing to know.
I will try this out this weekend. Will post my findings here