developer 2000 exiting a block mind boggling
From: <ssharma24_at_my-deja.com>
Date: Fri, 07 Apr 2000 00:24:36 GMT
Message-ID: <8cj9rn$2pc$1_at_nnrp1.deja.com>
hi guys..
I had a problem that I wanted to put a message asking "do you want to save your changes" in an exit button on a block (not a modal block). I put same code on three different blocks, it works perfectly on one. on the other two, it does this: suppose I make a change to the block, and hit exit. It will let me exit (although the block status has changed). Then when I click again on the button that takes me to our block, forms regular message appears (Do You Want to save....). Then if I cancel out then it will take me to the block, and the block still has the change that I had made before the previous exit. Now if I hit exit, it will give me my personnal alert.. why is that?
Some body suggested to put this code into post_block, but post-block does not take commit. Here is the code:
DECLARE
blcstat VARCHAR2(20):= :SYSTEM.BLOCK_STATUS; rcdstatus varchar(20) := :system.record_status; i NUMBER;
BEGIN
if (blcstat = 'CHANGED') or (blcstat = 'new') or (rcdstatus = 'new') or (rcdstatus = 'CHANGED') then
end if;
else
Date: Fri, 07 Apr 2000 00:24:36 GMT
Message-ID: <8cj9rn$2pc$1_at_nnrp1.deja.com>
hi guys..
I had a problem that I wanted to put a message asking "do you want to save your changes" in an exit button on a block (not a modal block). I put same code on three different blocks, it works perfectly on one. on the other two, it does this: suppose I make a change to the block, and hit exit. It will let me exit (although the block status has changed). Then when I click again on the button that takes me to our block, forms regular message appears (Do You Want to save....). Then if I cancel out then it will take me to the block, and the block still has the change that I had made before the previous exit. Now if I hit exit, it will give me my personnal alert.. why is that?
Some body suggested to put this code into post_block, but post-block does not take commit. Here is the code:
button 1: Yes button 2: No button 3: Cancel
DECLARE
blcstat VARCHAR2(20):= :SYSTEM.BLOCK_STATUS; rcdstatus varchar(20) := :system.record_status; i NUMBER;
BEGIN
if (blcstat = 'CHANGED') or (blcstat = 'new') or (rcdstatus = 'new') or (rcdstatus = 'CHANGED') then
i := Show_Alert( 'MY_SAVE' );
if i = ALERT_BUTTON1 then
commit_form; go_block('project'); elsif i = alert_button2 then clear_block(NO_VALIDATE); go_block('project'); elsif i = alert_button3 then go_block ('something')
end if;
else
go_block('project');
end if;
END;
Thanks
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Apr 07 2000 - 02:24:36 CEST