How to copy records from a block?
Hi All,
I am working with Oracle Forms 6i and therefore not sure if I will get an answer but I hope one of you experts can help.
I have a base table data block. For the purpose of explanation, let us say the block has 3 items(fields from the base table) - Name, City, Group_No.
The block has a button called 'Next Group'.
Assume, the user creates two records.
Name City Group_No
David Toronto 1
Roger Montreal 1
The user then clicks on 'Next Group'.
The requirement is that the two records above that were created, should get copied to the next two records but with a Group_No of 2. So the data should look like -
Name City Group_No
David Toronto 1
Roger Montreal 1
David Toronto 2
Roger Montreal 2
The user can then go ahead and change the Name or City to something else.
The question therefore is - How to copy the existing set of records to the same block after the last record.
The number of items in the block can be different, and so a generic solution would be better.
I guess it can be done using pl/sql tables, but I am not sure how. Sample code would indeed be helpful.
Your help would be greatly appreciated.
Thanks is advance.