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!

Interactive Grid Primary Key column generated from max+1 value from table

Shahroz AhmedMay 24 2023

Hello Everyone!

I have created an IG and i have a column of transactions. This is a master detail form and Serial Number is foreign key of Master and TRNO(transaction) is primary key of Detail.

The TRNO should be MAX(trno)+1 where srno = :srno

Now when I create single entry and save the IG, it works. But not for more than one row, because it gives unique constraint violation (obviously the table haven't been updated).

I cannot even save a single record because of some logic. The user needs to have at least two entries, one for credit and one for debit to save IG.
Can anyone please explain how to achieve this.

Comments
Post Details
Added on May 24 2023
3 comments
351 views