Home » Developer & Programmer » Forms » calling function inside the procedure (merged 2)
calling function inside the procedure (merged 2) [message #510044] Thu, 02 June 2011 05:19 Go to next message
Loganathan0084
Messages: 1
Registered: June 2011
Location: Bangalore, India
Junior Member
hi All,
i have created a function in form field(when validate item) this should be called in separate procedure..
How to call this function in procedure?....
Re: calling function inside the procedure [message #510047 is a reply to message #510044] Thu, 02 June 2011 05:23 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
Loganathan0084 wrote on Thu, 02 June 2011 11:19

i have created a function in form field(when validate item)

What does that mean exactly?
Re: calling function inside the procedure [message #510049 is a reply to message #510047] Thu, 02 June 2011 05:31 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Don't create it as a part of WHEN-VALIDATE-ITEM trigger - create it as a function (you'll see a node in Object Navigator window). Doing so, you can call it from wherever you want.
Re: calling function inside the procedure [message #510052 is a reply to message #510049] Thu, 02 June 2011 05:35 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
That'd allow you to call it from anywhere within the form. To call it from other forms it'd need to go in a pll or the database.
Re: calling function inside the procedure [message #510056 is a reply to message #510052] Thu, 02 June 2011 05:53 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Right; what I meant (and never said) was that it is any trigger or a procedure within that form. Today it is "normal" to put such a code (that is used more than once) into its own, well, "program unit". However, if someone insists, it is possible to leave it in a trigger and call it with EXECUTE_TRIGGER.

I can't test it now, but I *suppose* it is still here (for backward compatibility, I'd say) as the "old" Forms versions (prior to 3.0) didn't have "Program units" section so EXECUTE_TRIGGER was the only way to do such a job (i.e. reuse piece of code).
Previous Topic: record status bar
Next Topic: Need to get conditional Window apprea in the form
Goto Forum:
  


Current Time: Thu Sep 12 08:56:43 CDT 2024