How to condition an APEX LOV when using APEX_ITEM to create a dropdown list within an interactive report?

649 views Asked by At

Hi everyone I am having a bit of a difficult time even trying to find articles on apex collections and the apex_item functionality but was wondering if anyone has any experience on how to condition a LOV when the the select list has been generated using APEX_ITEM.SELECT_LIST_FROM_LOV.Im still pretty new to using this functionality so I hope this does come across well and makes some sense!

I am currently using Apex 19.1 with oracle database 12c!

We have an apex app we are building and our users want the app to allow the user to pick the number of rows as the number of rows needed can vary for each user, so we achieved this by creating a page item that allows the user to select a number from 1 to 50 - this then generates an interactive report based on this number where the user can then select a further options within 3 select lists as shown below.

enter image description here

We have shown this concept to the business and they really like how this all works. They have identified a requirement where they would like these select lists to then be conditional before the selection is then passed into apex_collections so that when the 'Export From' option is selected it will only allow the user to see the countries that are available within the 'Import To' select list. Furthermore once the country has been selected they want the 'Depot DST' option to only show the available options for the selected country.

I have attempted to look at the select query within the shared component LOV for the application and change this around but I assume because there is no page item associated with the selected values that this wont work as the select list keeps going blank when testing out any changes I make. Any help or advice on how to achieve this would be greatly appreciated.

Regards, Helen.

1

There are 1 answers

1
damir huselja On

have you tried this:

under columns of your report select the column you want to be conditionally filled, when select on the right side of the apex developer look for the List of values submenu and the Cascading LOV Parent Column(s)

enter image description here

there select your parent column and incorporate the column in the where clause of your select for the list of values, pointing at it like this :YOUR_COLUMN NAME