ComboBox - omit an already selected option

Hello everyone!


I`m building a form that has a combo box in it. I'd like to omit an option that the user had already selected. Example: In my application, we have three options of one registry: GOLD, SILVER and BRONZE. If the user already created a registry of GOLD, that option is ommited and only Silver and Bronze become available. How can I do that?

Solution

Hello Marcio,

You can fetch the data to that combobox from a "action function" and create a filter to not get that data you already pick up. You only need to do a refresh on combobox and apply your filter.

Solution

Hi,


I think that what you can do is create an aggregate in your preparation with the data that you need, use the filter in that aggregate that remove the already created registry and then, in your combo box properties, select that aggregate as source. Then you can create an onChange action that refresh data and ajax refresh to the combo box.


Hope this can help you.


Regards,

Ricardo

If your question is about frontend, you have the "enabled" property, you can check if some option already was selected, and then put the enabled property of this element as false.


Best Regards,

Nuno Pereira

PAULO RICARDO FAGUNDES JUNIOR wrote:

Hello Marcio,

You can fetch the data to that combobox from a "action function" and create a filter to not get that data you already pick up. You only need to do a refresh on combobox and apply your filter.


Thanks Paulo!