Reputation: 6909
I have a records table with the following columns :
Record_ID - primary key
Item_ID
Record_Text
Record_Status
Create_Date
Each item can have multiple records. I display the table data in an interactive grid. The grid only displays data for one item at a time. Item_ID
is a hidden field on the page P2_ITEM_ID
On my grid Record_ID
and Item_ID
are hidden field, I only display Record_Text
, Record_Status(a checkbox
for Active/Inactive
), and Create_Date
as display only field. When insert is done, primary key is generated automatically, Create_Date
is populated with a trigger, so the only fields that
need to be supplied are Item_ID
, Record_Text
and Record_Status
. When Add Row is clicked, the user populated Record_Text
and checks the checkbox
for Record_Status
. But how do I populate Item_ID
for each row automatically from a hidden variable?
Thanks
Upvotes: 2
Views: 4634
Reputation: 6909
I was able to accomplish that by setting a default value for the Item_ID column of my grid to type Item
and the Item field I set to the hidden field P2_Item_ID
Upvotes: 1