Conditional value lists in Oracle APEX?

I need to use the value of one Select List to populate the value of the second selection list, but the items in the Select List number two will be from completely different tables depending on what is selected in the number one list.

Is there a way that I can conditionally populate the second list based on the values ​​from the first? So far, my attempts to put an if statement in a LOV declaration have been unsuccessful ...

+4
source share
3 answers

The syntax for using IF in Apex LOV is as follows:

IF :P123_CHOICE = 'EMP' THEN RETURN 'SELECT ename d, empno r FROM emp'; ELSE RETURN 'SELECT dname d, deptno r FROM dept'; END IF; 
+3
source

I do not know if this is applicable in your case, but I used some APEX_ITEM functions in the past to create dynamic objects. You can look at APEX_ITEM.select_list_from_query , for example, to create a dynamic selection list.

0
source
  SELECT ename d, empno r FROM emp WHERE :P123_CHOICE = 'EMP' UNION ALL SELECT dname d, deptno r FROM dept 
0
source

All Articles