Oracle/forms 6i

Advertisement


Question
I hav developed a form in forms 6i. This form is having one tabular layout data block say D1. No of records appearing in this datablock are 10 at a time. I hav a checkbox in this data block(D1). Now I hav a button on other manually created data block(D2). I want to update a column of table in the database on the click of this button for all checked box which are ticked....Now I hav to write a coding on this button(When_button_pressed) but i dont know how to loop and reach all those ticked checkbox of the other data block(D1) shown on the tabular layout..so wht is the coding that has to be done to identify all ticked checkbox of D1 on other data block(D2)

Answer
Hi Puneet,

You can try the following code in your 'when-button-pressed' trigger on blk D2.

go_block('D1');
First_Record;
LOOP
  --   do processing
  IF Checkbox_Checked('D1.chk_box') THEN
     update table1
        set field1 = <value>
      where <where condition>;
  END IF;

  IF (:System.Last_Record = 'TRUE') THEN
     EXIT;
  ELSE
     Next_Record;
  END IF;
END LOOP


Hope this helps.

Regards

Suchitra

Oracle

All Answers


Answers by Expert:


Ask Experts

Volunteer


Suchitra Joshi

Expertise

I can answer questions regarding SQL, PL/SQL, Procedures, Functions, Triggers, SQL Loader, Oracle Forms, Oracle Reports, and some basic dba and performance tuning activities.

Experience

15+ years of Oracle PL/SQL Development

Education/Credentials
B.Sc (Electronics), Diploma in Computer Applications (DCA)

Awards and Honors
Oracle PL/SQL Developer Certified Associate (OCA)
Oracle Database: SQL Certified Expert
Brainbench certifications in Oracle Administration, PL/SQL, Developer 2000

©2012 About.com, a part of The New York Times Company. All rights reserved.