To create a dependency of Dropdown list to another in reactive web

Hi there, 

I am trying to create a dependency from a Dropdown List A to Dropdown List B based on what is selected in A. I've set up an OnChange event to assign a Local Variable to catch what is selected in Dropdown A and then refresh the Dropdown B list according to the local variable.

Currently, Dropdown B is not being filter and the list is entirely empty. 

Just to add on some screenshots of what I've setup.

Refersh table function

Current form - dropdown list (capex category) is not being filtered and list is empty even though i've selected a site in the first dropdown.

Hi Ling ,

Did you debugged and see the query results , is the query bringing the expected results with filter ? Also just to double check the other Drop-down you have is bind with the same query that you are refreshing.

Please attach the oml if possible for quick solution.



Hi PJ,

Yea I can see that the query is bringing back the expected results with filter when i put in the value into the local variable. I'm guessing that for some reason the local variable is not being assigned in the OnChange action. 

I've attached the OML here. Appreciate the advice! Thanks.


Hi Ling ,

One thing i found that the variable you rae using to filter data in on change is wrong , you rae using current id of 

GetCapexSites.List.Current.CapexSite.Id but what you assigned as variable in drop-down is 

GetCERFormById.List.Current.CERForm.CapexSiteId .

Please change GetCapexSites.List.Current.CapexSite.Id in on change to GetCERFormById.List.Current.CERForm.CapexSiteId. 

It should be like this 

Please just change this and try it should work .




Oh yes, PJ. Thanks for spotting that out! It works now. Appreciate it.

Equally happy to see it working for you !