Search code examples
outsystems

Issue with the DropDown list


I am having three drop down list each drop down list referring to each entity like enter image description here

In the web Page I am using the three drop down list like enter image description here In the preperation I filter the Bus accoding to the Location selected and Time accodring to the Bus Selected.

It works fine when we creating a new application but while editing it does not show the bus or time associated with the application filled out

enter image description here

So everytime I have to edit the application manually I have to select the Route bus and Time.How can I address this issue.Any help is greatly appreciated.


Solution

  • So, each dropdown list has a variable associated. That variable will carry the id of the selected row of the list added to the dropdown. In my case will be SelectedRouteId, SelectedBusId and SelectedTimeId.

    Now, on the preparation we need to filter the aggregate GetBuses by the SelectedRouteId and the aggregate GetTimes by the SelectedBusId: Preparation.

    The only thing left to do it's to refresh the query (to get the time of the chosen bus and the buses of the chosen route) and the block with the combo boxes (to refresh the data displayed). To do that we need to create action with Refresh Data of the buses or the time and do an Ajax Refresh of the combo boxes: Combo Boxes - On Change Actions.