Dependent Dropdown not working with rest api

Hi Team, I am facing one issue. I have retrieved data from API for Well, Battery and Asset. And I have added these fields as dependent dropdown in Data Grid 2. Below is my domain model -   But if I select Asset value from drop down then in battery dropdown values are not coming.   Note - In well, battery and asset overview pages, I have retrieved data from an API and there is no association in API between these fields. In mendix, I have created association, but data is not getting associated automatically. And, in my well overview page, I have added reference object of battery's (entity) battery name (attribute) then in each record, I need to edit and map the battery name to the well manually. So, is there any way to map it automatically?
1 answers

Hi Sweety,

Can't we do it while importing the data??

We can use NPE to import data from the REST call, and then, iterate through each record one by one, and map it into the persistent entities, also, while mapping it into the persistent entities, we can retrieve the Battery object and associate it with the Asset object, or vice versa.

THis way, this process will be done automatically.

If you don't want to use this method you can go with the event handlers, ( I won't recommend using this, as it makes the application slower).


Let me know if you have any issues,

Hope it helps!


(Resilient It Services)