Home » Developer & Programmer » Forms » Regarding Key-next and When-validate-item
icon9.gif  Regarding Key-next and When-validate-item [message #155829] Wed, 18 January 2006 18:34 Go to next message
srinivasocp
Messages: 91
Registered: December 2005
Location: INDIA
Member
HI Everyone,

Suppose if I have defined two triggers Key-next and When-validate-item on the same item.

If my key-next is going to fire first and When-validate-item later
how can the validation happen if I write a code like go_item('XXXX')
in my Key-next.Does it mean that if u write a code in key-next to jump to some other item, no validation takes pLace?

Please explain it to me as it is the most frequently asked Quest in Interview.

Regads
srini...
Re: Regarding Key-next and When-validate-item [message #155840 is a reply to message #155829] Wed, 18 January 2006 21:04 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I thought the When-Validate-Item trigger fired before the Key-Next-Item trigger.

David
Re: Regarding Key-next and When-validate-item [message #155910 is a reply to message #155829] Thu, 19 January 2006 11:28 Go to previous messageGo to next message
srinivasocp
Messages: 91
Registered: December 2005
Location: INDIA
Member
Hi ,

Can u please tell me which one will fire first and what happens when my Key-next is taking me to next-item and how
does the when-validate-item take place.

Please let me Know
Re: Regarding Key-next and When-validate-item [message #155945 is a reply to message #155910] Thu, 19 January 2006 16:30 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
How about YOU create a test form, add the two triggers each with a 'message' and 'pause' command pair so that you know which one has fired, run the program and tell US which one runs first?

David
Re: Regarding Key-next and When-validate-item [message #569921 is a reply to message #155829] Sat, 03 November 2012 04:12 Go to previous messageGo to next message
rajput_106@hotmail.com
Messages: 3
Registered: November 2012
Junior Member
Key Next Item fires before the when validated trigger
icon14.gif  Re: Regarding Key-next and When-validate-item [message #570067 is a reply to message #569921] Mon, 05 November 2012 06:31 Go to previous messageGo to next message
shareef.hiasat
Messages: 3
Registered: November 2012
Location: Jordan
Junior Member

rajput_106@hotmail.com wrote on Sat, 03 November 2012 12:12
Key Next Item fires before the when validated trigger



and remember you cannot put commit in
when-validate-item
Re: Regarding Key-next and When-validate-item [message #570100 is a reply to message #570067] Mon, 05 November 2012 11:54 Go to previous messageGo to next message
Littlefoot
Messages: 19468
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
True, you can't use COMMIT in WHEN-VALIDATE-ITEM trigger, but more accurate statement would be that you can't use any restricted procedure in that trigger.

However, what does your statement have to do with the question discussed in this topic?
Re: Regarding Key-next and When-validate-item [message #570133 is a reply to message #570100] Mon, 05 November 2012 17:59 Go to previous messageGo to next message
cookiemonster
Messages: 10899
Registered: September 2008
Location: Rainy Manchester
Senior Member
And since this topic is 6 years old is there any point resurrecting it?
Re: Regarding Key-next and When-validate-item [message #570158 is a reply to message #570133] Tue, 06 November 2012 01:51 Go to previous messageGo to next message
rajput_106@hotmail.com
Messages: 3
Registered: November 2012
Junior Member
Mr srinivasocp
I have came across with the problem that you are facing the way i solved that issue, i just delete the when validate trigger and wrote condition on key-next-item then it just work out and i got relief finally from ths problem
Example of simple code on key next item
if :a>0 then
message('abc ');
else
go_item('XXXX');
end if;

thanx
Re: Regarding Key-next and When-validate-item [message #570181 is a reply to message #570158] Tue, 06 November 2012 06:22 Go to previous messageGo to next message
cookiemonster
Messages: 10899
Registered: September 2008
Location: Rainy Manchester
Senior Member
Of course if you just use key-next-item then there is no way to stop the user entering an invalid value.
You need to use a validate trigger for that.
Re: Regarding Key-next and When-validate-item [message #570185 is a reply to message #570181] Tue, 06 November 2012 06:58 Go to previous messageGo to next message
Littlefoot
Messages: 19468
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Moreover, KEY-NEXT-ITEM won't even fire if you navigate through it with a mouse (i.e. you don't use keyboard's <TAB> or <ENTER> keys which are responsible for KEY-NEXT-ITEM trigger), so nothing you put in there will ever be executed.
Re: Regarding Key-next and When-validate-item [message #570228 is a reply to message #570185] Wed, 07 November 2012 00:35 Go to previous messageGo to next message
rajput_106@hotmail.com
Messages: 3
Registered: November 2012
Junior Member
but if you are using both the triggers(when validate trigger and key next item and wrote condition on when validate) then the same prob arose that is key-next-item fires before when validate trigger and and no sooner key-next-item will fire it will jump to the specified item and after jumping that item then valdate trigger fire at that time that cause no meaning (it is in query mode )

[Updated on: Wed, 07 November 2012 00:36]

Report message to a moderator

Re: Regarding Key-next and When-validate-item [message #570277 is a reply to message #570228] Wed, 07 November 2012 08:09 Go to previous messageGo to next message
cookiemonster
Messages: 10899
Registered: September 2008
Location: Rainy Manchester
Senior Member
I have no idea what you mean by this:
rajput_106@hotmail.com wrote on Wed, 07 November 2012 06:35
and after jumping that item then valdate trigger fire at that time that cause no meaning (it is in query mode )

Re: Regarding Key-next and When-validate-item [message #590952 is a reply to message #570277] Wed, 24 July 2013 06:08 Go to previous messageGo to next message
rajesh4851
Messages: 85
Registered: January 2007
Member
Dear friends,
I have similar problem. Pls give me some inputs to achive this result.

There is a multi record block in my form. When user tries to enter duplicate data in this block and tab out from the last field i.e. end_date then a pop-up should be raised.
"This is duplicate record, you want to keep it?" It has 2 buttons, Yes or No.

When user clicks "Yes" button the data should be saved immediately(committed).
Since i put this validation in when-validate-item of that end_date filed i can't use commit-form; Is there is any work around to achive this ? Pls suggest some ideas.

Regards,
Raj

Re: Regarding Key-next and When-validate-item [message #591243 is a reply to message #590952] Thu, 25 July 2013 15:58 Go to previous message
Littlefoot
Messages: 19468
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What happens if user selects "No" (i.e. he doesn't want to keep it)?
Previous Topic: Tab page text color in oracle form
Next Topic: TimeoutPJC Not working when separateframe=true
Goto Forum:
  


Current Time: Wed Aug 20 08:13:43 CDT 2014

Total time taken to generate the page: 0.25850 seconds