title: Oracle Apex : Get Selected list value and use the value in another region
body: <p>Dears ,</p>
  
  <p>I Have a selected list that contain values dynamiclly from the database ,<br>
  I am trying to build a Region Classic Report (Base on Function ) Using the selected value.<br>
  The source code of this region based on PL/SQL Function Body returning SQL Query as below : </p>
  
  <pre><code>DECLARE
     V_SELECT    VARCHAR2 (4000);
     V_SELECT2   VARCHAR2 (4000);
     V_DESC      VARCHAR2 (1000);
  BEGIN
     IF :P1224144_PRE_SEL IS NULL
     THEN
        V_SELECT :=
              'SELECT '
           || LTRIM (GML.GML_GET_COLUMNS ('RI'), ',')
           || ' FROM GML.GML_SCENARIOS ';
        RETURN V_SELECT;
     ELSE
        V_SELECT2 :=
              'SELECT '
           || LTRIM (GML.GML_GET_COLUMNS (:P1224144_PRE_SEL), ',')
           || ' FROM GML.GML_SCENARIOS ';
        RETURN V_SELECT2;
     END IF;
  END; 
  </code></pre>
  
  <p>My problem is that i cant get the selected value from the list always return null and the code will execute the first select (V_SELECT ) only .<br>
  I put the Page Action on Selection of the List as Redirect and Set Value .<br>
  <a href="https://i.stack.imgur.com/lh8Vv.png" rel="nofollow noreferrer">Correct Result when select null value Or 'RI'</a></p>
  
  <p><a href="https://i.stack.imgur.com/jkSCm.png" rel="nofollow noreferrer">No data found  is the result when select Not null value  </a></p>
  
  <p>Please Advice<br>
  Best Regards<br>
  Yousef Farraj  </p>