title: PL/SQL Dynamic action [Set Value] not recognizing apex item value
body: <p>I have a problem setting the value of an apex item (P13_3) using a pl/sql defined dynamic action. At the moment the dynamic action is triggered using a button. For example if "530000000019" is entered into the item (P13_3), after the clicking the button it should return a value (Product Code) and set the item with that value.</p>
  
  <p>This is the pl/sql code that runs when the button is clicked:</p>
  
  <pre><code>DECLARE
  p_code    products.prod_code%TYPE;
  p_id      products.prod_id%TYPE;
  BEGIN
      p_id := :P13_2;
      SELECT prod_code INTO p_code FROM products WHERE prod_id = p_id; 
      RETURN p_code; 
  
  END;
  </code></pre>
  
  <p>This is the error that appears: </p>
  
  <p>Ajax call returned server error ORA-01403: no data found for Set Value.</p>
  
  <p>This means that no data was returned when the SELECT INTO clause ran. I then altered the code and ran this code to see if there were any faults in the code:</p>
  
  <pre><code>DECLARE
      p_code    products.prod_code%TYPE;
      p_id      products.prod_id%TYPE;
      BEGIN
          p_id := 530000000019;
          SELECT prod_code INTO p_code FROM products WHERE prod_id = p_id; 
          RETURN p_code; 
  
      END;
  </code></pre>
  
  <p>This code returned a value and the set value dynamic action was successful. This therefore means, that in apex was not picking up the value in the P13_3 item.</p>
  
  <p>I have a apex process that has similar syntax that calls the P13_3 apex item and it runs successfully. Here is the code of the apex process:</p>
  
  <pre><code>DECLARE
  b_code    products.prod_id%TYPE := :P13_3;
  p_quant    products.prod_qnty%TYPE := :P13_2;
  BEGIN
  
      UPDATE products
      SET prod_qnty = prod_qnty - p_quant
      WHERE prod_id = b_code;
  
  END; 
  </code></pre>
  
  <p>If I am not mistaken, I would say that this proves that the problem lies with dynamic action and not the pl/sql code. I am currently using apex 5.1 (The 16 Dec release). Please Help. Thank you in advance :)</p>