How to execute steps on module startup without preparation in Reactive Apps?

I have created a Reactive Web app and I have a drop-down on the initial screen.  The aggregate associated with that drop-down gets populated on startup.  That seems to work ok.  Right now, there's only one item in the aggregate/drop-down and it seems that it is selected automatically when the drop-down is populated via the aggregate on startup...

I have a Change event on the drop-down so that when the user selects something in the drop-down, other drop-downs are populated based on the first drop-down selection.  But since the change event is not fired, I don't know how to make the module go and populate those other drop-downs.  If this were a traditional web app, I could populate the first drop-down in the preparation and then check to see if an entry were automatically selected and if so, go and populate the other drop-downs.  But I don't have that capability with the reactive web apps.

Even when I click on the down-arrow in the first drop-down, the change event doesn't fire because I guess there's only one item in the list right now and I'm not changing anything.

How can I deal with this situation and force it to check the first drop-down for a selected value and populate the others even though the user didn't have to select an item in the first drop-down?

Solution

Hi Sylvia,

Instead of using the onchange event just put the other dropdowns inside a block with the id of the first dropdown has input. this will make the bloc to refresh when that variable changes. check the example I attached.

Regards,

Marcelo

Solution

Hi Sylvia,

Did the solution Marcelo provided help you with your use case?  

If not, can you please share an example of what you are trying to achieve, maybe a simplified module illustrating the situation or a screenshot of Service Studio, so we can understand the problem a bit better and suggest a solution?

Marcelo Ferreira wrote:

Hi Sylvia,

Instead of using the onchange event just put the other dropdowns inside a block with the id of the first dropdown has input. this will make the bloc to refresh when that variable changes. check the example I attached.

Regards,

Marcelo

This was a huge help!  Thanks, Marcelo!


Vitor Teixeira wrote:

Hi Sylvia,

Did the solution Marcelo provided help you with your use case?  

If not, can you please share an example of what you are trying to achieve, maybe a simplified module illustrating the situation or a screenshot of Service Studio, so we can understand the problem a bit better and suggest a solution?

Yes, his solution was spot on.  Thanks!