multi select in oracle forms

How to Refresh Block in Oracle Forms?

We need to refresh a block in Oracle Forms, when we applied some filter for query or the data have been changed by the other user. If you just applied a filter or you have a doubt that the data have changed, then use EXECUTE_QUERY method on any button press or any other event. Below is the example:

Refresh Block in Oracle Forms Examples


In the above example, it is setting the focus to EMP block using GO_BLOCK method and then executing the query to populate the data in the EMP block. If the data already been queried before, then it will refresh the data by querying again in Oracle Forms.

If you are updating a data block using any loop and after every iteration, you want to make the updated data visible to the user while loop, then use the Synchronize command. Below is the example:

   For i in 1..10 loop
      :ABLOCK.AITEM := i;
   End Loop;

In the above example, it will update the item AITEM in ABLOCK with the value of (i) variable and will update/refresh the screen on every iteration using Synchronize command.

Written by Vinish Kapoor

An Oracle Apex Consultant, Oracle ACE, and founder of and a question and answer forum for developers. You can connect with me on Facebook and Twitter.


Leave a Reply
    • It should be something like this below:

      Create table emp_roaster (
      r_id integer,
      empno integer,
      cdate date,
      day_name varchar2(20),
      shift_timings varchar2(20),
      day_off varchar2(1),
      status varchar2(20))

      For every new month, you will generate records for every employee for a calendar month. You will populate only, the R_id (auto number), empno, cdate, day_name.

      Then you should provide the data entry in Matrix form for the roaster assignment.

  1. Hello Vinish
    I have a issue in Oracle forms , I developed a form by use a view which display the PO Details and Vendor details as for the Client Request some of filed should be updateable
    so I written When validate Item trigger to update data and I didn't commit or standard.commit any Validation because there may be chance end user don't like change After all the form development the data is updating when execute query the fields are updating Please help me is there any thing to do that the form should not update until save button is click

    Sandeep Ganta

  2. Sorry I forgot mention I have used Clear_form(full_rollback) It is working but It is Clearing the Parameter Section In the Form I just want it for only Block level

    • Why are you writing validate item trigger to update data? You can use the default Oracle Forms functionality.

      I think you just create a cancel or exit button in which you can use the clear_form(no_validate);

      If it is still not clear to you. Then please ask your question with more details on so that other community members can help you.

Leave a Reply

Your email address will not be published. Required fields are marked *