Developer 2000 exiting a block and having a save message

From: <ssharma24_at_my-deja.com>
Date: Wed, 05 Apr 2000 23:45:30 GMT
Message-ID: <8cgj6m$3jf$1_at_nnrp1.deja.com>



I have a problem in the past where at the time was exiting a block (not a modal block). I wanted it to ask mewhether I wanted to save the changes or not (depending on whether the status of the box has changed or not..
Some body sent me this solution to put in post-block trigger:

DECLARE
blcstat VARCHAR2(20):= :SYSTEM.BLOCK_STATUS; i NUMBER;
BEGIN if blcstat = 'CHANGED' then
 i := Show_Alert( 'MY_SAVE' );
if i = ALERT_BUTTON1 then c
ommit_form;
else clear_block(NO_VALIDATE);
end if;
end if;
END; Well Post block doesn’t accept coommit??? Then I put the code in an exit button (on the block)…well, the message pops up some times in a weird manner. Sometimes it doesn’t even come up:
1. I have a block that behind the scene populate some of its fields (using copy value from item property) and then user has to enter one field on the block to populate the whole record. Well, the above code doesn’t give me any message while I am exiting the block (assuming that I had made some changes). When I click on a button to go back to that block, then it will ask me whether I want to save or not???

Thanks guys

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Apr 06 2000 - 01:45:30 CEST

Original text of this message