| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Forms 5 block synchro question
Hi, Johan
I had the same problem. Here is my solution.
This is part of CLEAR_ALL_MASTER_DETAILS_PROCEDURE procedure, which Forms
generates when you use master/details
....
IF frmstat = 'CHANGED' THEN
curblk := First_Changed_Block_Below(mastblk);
--
-- If we find a changed block below, go there
-- and Ask to commit the changes.
--
IF curblk IS NOT NULL THEN
Go_Block(curblk);
Check_Package_Failure;
Clear_Block(ASK_COMMIT); -- This built-in displays message 'Do you
want to commit'
--
-- If user cancels commit dialog, raise error
--
IF NOT ( :System.Form_Status = 'QUERY'
OR :System.Block_Status = 'NEW' ) THEN
RAISE Form_Trigger_Failure;
END IF;
END IF;
I suggest to replace standart code with something like this:
....
IF frmstat = 'CHANGED' THEN
curblk := First_Changed_Block_Below(mastblk);
--
-- If we find a changed block below, go there
-- post changes, and set form-level flag that changes was made.
--
IF curblk IS NOT NULL THEN
Go_Block(curblk);
Check_Package_Failure;
Clear_Block(NO_COMMIT);
/*
I place :changes in non-database block, default value is NULL
Before exiting form I check :changes value and execute
COMMIT_FORM if necessary
*/
:changes:='YES';
POST;
END IF;
Hope this helps
Good luck, Kirill
Received on Wed Mar 22 2000 - 09:45:14 CST
![]() |
![]() |