How to filter the data of comboboxes based on other filters as excel

Hi,

I am trying to filter the data of one combo box data based on the other combo box selection as excel even though they don't have any relation between them in the database. For example: If I  have three rows in table columns are PERSON NAME, AGE, SALARY and we have 3 combo boxes for them, If we select a certain amount in the salary combo box then the name and age filters should have only the data related to that particular salary. Can anyone suggest me how to do this?

Regards,

Trinusha.


Hi Trinusha,

I made you a quick example you can take a look at. I created only two Combo boxes, but I hope you get the point. If you have any questions, please do comment and I'll try to help as soon as I can. 


Best regards,

Miguel Marçal

Hi trinusha karumanchi,

You need to use the combo box property onchange (on the first combobox), to call an action and execute some logic, where that logic needs to setup the range of values you need for the second combobox.

Hope this helps!

Regards

Hi Trinusha,

In general, these are the steps:

  1. Set the On Change Property of the Combo Boxes that influence another to a Screen Action;
  2. In the Screen Action, do whatever you need to do to limit the data in the other Combo Boxes (e.g. Refresh Data), and Ajax Refresh the Combo Boxes.

EDIT: Damn, you guys are fast :).

Miguel Marçal wrote:

Hi Trinusha,

I made you a quick example you can take a look at. I created only two Combo boxes, but I hope you get the point. If you have any questions, please do comment and I'll try to help as soon as I can. 


Best regards,

Miguel Marçal

Hi Miguel,

Thank you for the quick response, I am also looking for the viceversa condition also like if we  have age instead of the people choosen by salary. If we select the particular age then the age related salary should be displayed in the dropdown of salary as below image in the excel.


Marco Arede wrote:

Hi trinusha karumanchi,

You need to use the combo box property onchange (on the first combobox), to call an action and execute some logic, where that logic needs to setup the range of values you need for the second combobox.

Hope this helps!

Regards

Hi Marco,

       I used this condition for first combo box but I want to this in viceversa also.

Regards,

Trinusha.


Hi Trinusha,

The information we gave should be sufficient for you to write the right code. It's all about getting the right data from the database. If you don't know how to do that, perhaps you should revisit some of the tutorials...

trinusha karumanchi wrote:

Miguel Marçal wrote:

Hi Trinusha,

I made you a quick example you can take a look at. I created only two Combo boxes, but I hope you get the point. If you have any questions, please do comment and I'll try to help as soon as I can. 


Best regards,

Miguel Marçal

Hi Miguel,

Thank you for the quick response, I am also looking for the viceversa condition also like if we  have age instead of the people choosen by salary. If we select the particular age then the age related salary should be displayed in the dropdown of salary as below image in the excel.


Hi Trinusha, 

Well, for the viceversa part, you use the same logic applied... If you want to "select the particular age then the age related salary should be displayed in the dropdown of salary", you create an OnAgeAction, that you call on the combo-box Destination. After that you get the data from the db and refresh the combo-boxes... Same logic.

Attached is another OML that does what you want. All 3 affect the other combo boxes. It may require a bit of adjustments but that's your part :D 


Hope it helps,

Miguel Marçal