multi select 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

Begin
   Go_Block('EMP');
   Execute_Query;
End;

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:

Begin
Go_Block('ABLOCK');
   For i in 1..10 loop
      :ABLOCK.AITEM := i;
      SYNCHRONIZE;
   End Loop;
End;

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.

Vinish Kapoor

An Oracle Apex Consultant, Oracle ACE, and founder of foxinfotech.in and orclqa.com a question and answer forum for developers.

This Post Has 8 Comments

  1. MUHAMMAD MANSOOR

    How to Refresh Block in Oracle Forms?
    I WANT TAKE FMB 

    1. MUHAMMAD MANSOOR

      Dear Sir :how to create employee attendance roster structure TABLE PLEASE EXPLAIN

    2. Vinish Kapoor

      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.

  2. MUHAMMAD MANSOOR
    please EXPLAIN CHECK BOX BACK ON QUERY How to Refresh Block in Oracle Forms?
    
    1. Vinish Kapoor

      I don't understand your question, please explain well. Thanks.

  3. Sandeep Ganta

    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

    Thanks
    Sandeep Ganta
    8978267124

  4. Sandeep Ganta

    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

    1. Vinish Kapoor

      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 orclqa.com so that other community members can help you.

Comments are closed.