0
votes

I have created a form with two textbox items and one editable datagrid in oracle apex form. Now i want to store those two items data along with this grid's records in single database table as we can do in invoice form. My items are in form region and grid is in its sub region. How to write the insert query. I have written a query but its storing only form items data but not grid's data.

my query as follow :

insert into FOREIGN_SAMPLE (REF_NO,PARTY_NAME,PRODUCT_NAME)
values (:P22_REF_NO,:P22_PARTY_NAME,:PRODUCT_NAME);

Here, PRODUCT_NAME is field of grid view and other 2 are form items.

1

1 Answers

0
votes

Here's how:

  • interactive grid should contain those two columns (ref_no, party_name)
  • as their source, use form items (:P22_REF_NO and :P22_PARTY_NAME)
  • once you enter values into the product_name column in the interactive grid and save changes, ref_no and party_name will be saved along with product_name

In other words: don't write your own INSERT statement.