2
votes

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

1
I don't know how to do something in a column that is not editable in IG. Maybe is possible, but I don't know. If is not possible, maybe you can create your pl/sql manually, in this pl/sql I think do you have access to the value of the item. Check this post: community.oracle.com/thread/3937159romeuBraga

1 Answers

1
votes

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