Hi,
Im on APEX 5.1 and Oracle 12 C.
I'm working with a 2 page master detail form. My detail form is an interactive grid (by default). I need to enter multiple rows in the detail and have them sequentially assigned a row number starting with 1. The unique field on the master and detail is Sample_ID. So in the master table SAMPLE_ID is the PK and in the detail table the SAMPLE_ID and LINE_NUMBER are the PK.
In oracle forms I have something like this. I modified it for APEX and I have it in the default value for the item. It works great for the first row, but not the second. Can you tell me how I might accomplish this. In the oracle form we force a save when navigating to the next record.
Declare line_number number;
Begin
Select nvl(max(line_no),0) + 1 into line_number
From SAM_LINES_AX@haasprod_link
Where sample_id = :P23_SAMPLE_ID;
Return LINE_NUMBER;
End;
Thanks in advance.
Trish