Search Combo Box doesn't update data

Hello everyone,
I´m having a trouble with a search combo box. The thing is, I have a search combo box where i can choose the brand of the car, and another search combo box that, depending of the brand choosed, will automatically update for the models of that brand.

What is happening is that when i edit one car and i change the brand, the combo box with the model will show the models associated to that new brand, but also the older model.

For example, the car is a Seat Ibiza. But now, i want to update and say that the car is a Citroen C3. I still have the option "Ibiza", and that's not supposed.

How can i solve this?
*I'm a newbie in Outsystems

Thank you in advance


maybe you check your filter for this aggregate and also you need to put an ONCHANGE action for the brand combo box which will refresh the aggregate and combo box of model both. 

Hi Ines,

Could you provide your OML file?
It's not understandable with one screenshot because also we need to check your dropdown properties such as source and on change event and your aggregate.

With best regards,
F.Karatay

Solution

Hello Inês, 

First thing, the source of your second combo box must be a list, not an entity. 

If you use an aggregate in preparation to provide the list as the source to the combo box, you can set a filter that chose only the cars based on the selected brand. 

Second, the first combo box must call a screen action when changing. So, set up the OnChange property of it. This screen action will be called using Ajax, so in the action you need to do two things. 

1. Execute a Data Refresh in the aggregate you used as source to second combo box, so it filter correctly, 

2. and an Ajax refresh in the combo box. Itself, so it shows the new list. 

Let us know if you are able to do that or if you still experience problems. 

Cheers 

Solution

Thanks!!

vikas chauhan and Eduardo Jauchmvp I followed your advices and it works perfectly!

It was the filter that I had on the aggregate in my preparation that was not correct.


Best Regards

Inês Santos wrote:

Thanks!!

vikas chauhan and Eduardo Jauchmvp I followed your advices and it works perfectly!

It was the filter that I had on the aggregate in my preparation that was not correct.


Best Regards

Happy to help



Thanks for letting us know, Inês. 

Happy coding. ??