Home » Developer & Programmer » Forms » Screen asks do you want to commit records?
Screen asks do you want to commit records? [message #157453] Thu, 02 February 2006 08:53 Go to next message
Safeeq.S
Messages: 100
Registered: October 2005
Location: Bangalore
Senior Member

Hi,
I have a customized form in Apps. I have PO number text item which is assocaited with a lov. When i select a PO and it retrieves the record associated with that PO.

when i close the form without making any changes its asking me " Do you want to save the changes?". I dont want this messa\ge to be displayed if there is no change is being done in that form.

Can anyone provide me a way to suppress this message if i didnt make any changes?
Re: Screen asks do you want to commit records? [message #157461 is a reply to message #157453] Thu, 02 February 2006 09:17 Go to previous messageGo to next message
vban2000
Messages: 207
Registered: March 2005
Senior Member
Hi Safeeq

under which mode did you perform the operation? Entery Query, or just capturing New...

it sound to me you have a query form (taking a guess here Wink ), however, your block is based on a Table (i.e. not control block), you are using a database block.. is this the case?? if so, you might want to change to Control-Block or find a work around..

If this is the case, Oracle since you are entering a new record, hence is asking you to commit or cancel.

For your information, to supress the message - just an example..
:system.message_level :=5;
clear_form(no_validate)
:system.message_level :=0;


hope this helps...

Regards
AnDy

[Updated on: Fri, 03 February 2006 00:29]

Report message to a moderator

Re: Screen asks do you want to commit records? [message #157494 is a reply to message #157461] Thu, 02 February 2006 15:26 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Andy,

I think there is a flaw in your code. I would code it like this:

declare
v_oldlevel varchar(2);
begin
...
...
v_oldlevel := :system.message_level;
:system.message_level := '25'; -- VARCHAR2 !
clear_form(no_validate);
:system.message_level := v_oldlevel;
...
...
end;

Agree?


Re: Screen asks do you want to commit records? [message #157535 is a reply to message #157453] Fri, 03 February 2006 01:14 Go to previous messageGo to next message
vban2000
Messages: 207
Registered: March 2005
Senior Member
Embarassed oops.. Zijlstra. Yes, it did have a big flaws, the second messge_level should be 0. (corrected!) Thanks for pointing it out.

the message level is varchar2. (agreed!)

Quote:


SYSTEM.MESSAGE_LEVEL stores one of the following message severity levels: 0, 5, 10, 15, 20, or 25. The default value is 0.

SYSTEM.MESSAGE_LEVEL can be set to either a character string or a number. The values assigned can be any value between 0 and 25, but values lower than 0 or higher than 25 will generate an error. During a Runform session, Forms Developer suppresses all messages with a severity level that is the same or lower (less severe) than the indicated severity level.



I think setting message level to '25' is bit too high, since it supress 'critical' message, also. '5' should be enough.

AnDy

Re: Screen asks do you want to commit records? [message #157685 is a reply to message #157453] Fri, 03 February 2006 19:19 Go to previous message
M0nst3r
Messages: 38
Registered: February 2006
Location: Wherever the Money Is
Member
It's generally not a good idea to mask this issue using :SYSTEM.MESSAGE_LEVEL.

Not enough information has been provided to allow me to understand how the form works, but here are two things to check:

1. It sounds like your PO Number field isn't really a database item and should be on a control block.

2. If #1 fails to remove the message, then you may be making changes to the form in your POST_QUERY trigger. If so, set the record status back to 'QUERY' at the end of your POST-QUERY trigger.

Something like the following code:
:SYSTEM.RECORD_STATUS := 'QUERY';
-or-
SET_RECORD_PROPERTY(CURRENT_RECORD, 'PO_BLOCK', STATUS, 'QUERY');
Previous Topic: multi record block loop problem
Next Topic: Being authorize for report.
Goto Forum:
  


Current Time: Fri Sep 20 05:40:18 CDT 2024