Home » Developer & Programmer » Forms » Suppressing validation while pressing CANCEL button
Suppressing validation while pressing CANCEL button [message #83736] Thu, 04 December 2003 04:11 Go to next message
Susmita Sarkar
Messages: 3
Registered: December 2003
Junior Member
Hi,
I am facing a peculiar problem and not able to solve it for last 4 days.
I have kept the buttons in control block
and done the following settings
in property palette of "cancel" button.
keyboard navigable : NO
mouse navigable : NO.
Still the when-validate-item and when-validate triggers are getting fired when I am pressing CANCAL button from a record in multi-record block.
The following is the situation:
I added a new record at the end of the displayed record and changed the item of a list item(4th field of the record), then pressed 'Cancel' button. All The validations are fired starting from the 1st field in the record.
Please let me know, when your above said solution can fail.

I am to deliver the code to the client this week.
Re: Suppressing validation while pressing CANCEL button [message #83739 is a reply to message #83736] Thu, 04 December 2003 09:56 Go to previous messageGo to next message
ram kumar
Messages: 113
Registered: August 2002
Senior Member
what is the code in when button pressed trigger of cancel button?check that code or paste the code
Ram
Re: Suppressing validation while pressing CANCEL button [message #83741 is a reply to message #83739] Thu, 04 December 2003 21:48 Go to previous messageGo to next message
Susmita Sarkar
Messages: 3
Registered: December 2003
Junior Member
Code of when-button-pressed of Cancel button:
If :PARAMETER.PM_Mode = 'VIEW' then
Exit_Form(no_validate);
end if;
P_EXIT.CANCEL_FORM;

The form opens in two mode - Edit and View. In view mode all the fields are diabled as it is for query only. The problem is in EDIT mode.

Code of P_EXIT.CANCEL_FORM:
In this code system is throwing a message whether user wants to exit without commit. If yes is pressed, then exit with no_validate, else commit and exit.

But the form is not processing the code for this Cancel button. First it is processing the validations of the items and then validation of records and there itself it is failing. I have put messages and tracked the path. The when-button-pressed trigger is not fired at all. I have taken pring of current_item, cursor_item and trigger_item. Though the cursor_item is not changing, but the current_item and trigger_item is getting changed starting from the first field of the record and the validation are getting fired.

Is there any specific condition written in Forms 6 books where this "supress validation" fails?
Re: Suppressing validation while pressing CANCEL button [message #83746 is a reply to message #83741] Fri, 05 December 2003 07:25 Go to previous messageGo to next message
ram kumar
Messages: 113
Registered: August 2002
Senior Member
some how u'r record status is getting changed causing the itme to be validates...is there in place u assigning values.....
try to check :system.record_status t should be query...if it not..then it causes to validate..the form so it asking u do u want to save the changes...
Ram
Re: Suppressing validation while pressing CANCEL button [message #83761 is a reply to message #83736] Tue, 09 December 2003 04:48 Go to previous message
Rahman
Messages: 40
Registered: July 2003
Member
hi
instead of using when-validate-item use Key-Next-item trigger
copy the code of when-validate-item paste it in Key-Next-item trigger & delete when-validate-item
i hope it'll work
plz try n tell me the result
regards
Rahman
Previous Topic: Bfile display problem
Next Topic: how java can be called from PL/SQL in Forms4.5
Goto Forum:
  


Current Time: Sun Aug 14 22:56:51 CDT 2022