title: Oracle : Execute Query with LOV selected value
body: <p>I need to run a query with a value that is selected from a LOV.</p>
  
  <p>I've got the next setup : </p>
  
  <ul>
  <li>a block named "MENIU"</li>
  <li>a table named "MENIU" with a column "ID_MENIU".</li>
  <li>a LOV named "LOV_MENIURI"</li>
  <li>a parameter named P_IDMENIU</li>
  <li>a button on the form named "Alegeti Meniul"</li>
  </ul>
  
  <p>In order to run a query with the value selected from the LOV I've tried this : </p>
  
  <ul>
  <li>LOV return item "ID_MENIU" is set to PARAMETER.P_IDMENIU</li>
  <li>in the pre-query of block MENIU I've assigned the PARAMETER.P_IDMENIU value to MENIU.ID_MENIU</li>
  <li><p>Button "Alegeti Meniul" has the next "when-button-pressed" trigger code : </p>
  
  <pre><code>declare 
      success boolean;
  begin
  Enter_Query;
  success := show_lov('LOV_MENIURI');
  Execute_Query;
  end;
  </code></pre></li>
  </ul>
  
  <p>My problem is that when pressing the button for the first time nothing happens, if I press the button a second time LOV window appears and the query is executed twice.</p>
  
  <p>A GIF with the outcome:</p>
  
  <p><img src="https://i.stack.imgur.com/lCLnp.gif" alt=""></p>