Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Tabular form - How to automatically set ID column's value on Add Row?

DannyS-OracleOct 24 2016 — edited Oct 24 2016

Hi guys, I am making this tabular form, where user can do Insert, Update, and Delete operations. The table has PK column called ID, and this field keeps causing problem upon submission.

I want to make the ID column hidden on the tabular form, and expecting it to be automatically filled with new value whenever a user click the "Add Row" button. Initially I thought Apex can handle that if I set the ID column as Identity Always or Default. But:

If I set the ID field as Identity Always upon the table creation, the tabular form will throw "ORA-32795: cannot insert into a generated always identity column (Row 14)".

If I set the ID field as Identity Default upon the table creation, the tabular form will throw "Cannot insert NULL to ID".

What is the right way to handle this problem? I am using Apex v5.0.4.

This post has been answered by DannyS-Oracle on Oct 24 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 21 2016
Added on Oct 24 2016
2 comments
1,525 views