Home » Developer & Programmer » Forms » Next record problem in When Validate Item trigger
Next record problem in When Validate Item trigger [message #174474] Mon, 29 May 2006 05:41 Go to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

Hii all

i wrote that code in my trigger item 'when validate item':
Quote:



IF (:GMTRDXXXX.METERSTATE = 3 ) THEN
next_record;
END IF;



when i run the form and enter '3' in this item it gives me that error:

Quote:


illegal restricted procedure next_record in when validate item trigger
ora-01403 no data found




i want to go to the next record in that block when that item contain '3' without continueing passing to the rest of my current record


Thanks for Everyone helped and helping me
Re: Next record problem in When Validate Item trigger [message #174475 is a reply to message #174474] Mon, 29 May 2006 05:47 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This trigger should be used ONLY for validation purposes; not navigation ones. Therefore, change it to something like this:
IF (:GMTRDXXXX.METERSTATE <> 3 ) THEN
   MESSAGE('Item value should be 3');
   RAISE FORM_TRIGGER_FAILURE;
END IF;
This should prevent user skipping this item unless a value of "3" is entered into it.

However, if you insist on keeping your code, put it into the KEY-NEXT-ITEM trigger.
Re: Next record problem in When Validate Item trigger [message #174538 is a reply to message #174474] Mon, 29 May 2006 08:18 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you solved your problem?

David
Re: Next record problem in When Validate Item trigger [message #174566 is a reply to message #174474] Mon, 29 May 2006 14:05 Go to previous message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member


thanks for your help
Previous Topic: how to use the same lov for different item
Next Topic: no need parameter form in roport
Goto Forum:
  


Current Time: Fri Sep 20 11:25:53 CDT 2024