title: How to change the push button label text and add a new functionality in runtime? Oracle Forms
body: <p>I'm learning Oracle Forms and Reports, This time I would like to coding within a push button some functionalities. I've added a push button named "Filter" for active the "enter_query" mode to add some search criteria using "WHEN-BUTTON-PRESSED" trigger in item level and adding code within this trigger. It's too easy to code: </p>
  
  <pre><code>BEGIN 
    ENTER_QUERY; 
  END; 
  </code></pre>
  
  <p>But now, I have to add two new functionalities to this button: </p>
  
  <p>1- First, When I write some search criteria and after push in the second button named "SEARCH" to retrieve data relationated the button "filter" have to rename to "LAST  RECORD" and if I press "LAST RECORD" button the form should to retrieve only  the last record retrieved of the las search. I've think about how I should to  resolve this problem and I've tried to add SET_ITEM_PROPERTY to trigger but  it is not working correctly.</p>
  
  <pre><code>BEGIN 
     ENTER_QUERY; 
     SET_ITEM_PROPERTY('BLOCK_NAME', LABEL, 'LAST RECORD'); 
     LAST_RECORD;
  END;
  </code></pre>
  
  <p>2- And finally, after press in "LAST RECORD" button, It should to rename to "CANCEL" and if I press in this button one more time it should to clear the form and start again in the first position named "FILTER" to start a new search criteria as many time as the client want to do it...</p>
  
  <p>Do you have any idea? Thanks.</p>