Home » Developer & Programmer » Forms » Return value to calling form from called form (Oracle Forms,6i,xp)
Return value to calling form from called form [message #356106] Wed, 29 October 2008 09:50 Go to next message
yoonus.it@gmail.com
Messages: 109
Registered: June 2007
Location: kuwait
Senior Member
Hi,

How can i return value from a called form to calling form.

This is my scenario

There are two forms. On form A there is a total field(textbox) when double clikced this will bring form B. Actual calculation of the field of A is happing in form B. When form B is exited i want the total from B feild to be displayed in total field(textbox) of form A.

Looking forward to your advising Smile

unus
Re: Return value to calling form from called form [message #356151 is a reply to message #356106] Wed, 29 October 2008 15:00 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You could consider use of a parameter or a global variable.
Re: Return value to calling form from called form [message #356254 is a reply to message #356151] Thu, 30 October 2008 01:42 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you considered updating the value in the database in Form B and then requiring the information in Form A?

David
Re: Return value to calling form from called form [message #356594 is a reply to message #356254] Fri, 31 October 2008 06:25 Go to previous messageGo to next message
yoonus.it@gmail.com
Messages: 109
Registered: June 2007
Location: kuwait
Senior Member
i am updating in the database but i dont want to query it in Form A because i know value in the Form B it self.so just want to get that value passed to A.
Re: Return value to calling form from called form [message #356595 is a reply to message #356151] Fri, 31 October 2008 06:29 Go to previous messageGo to next message
yoonus.it@gmail.com
Messages: 109
Registered: June 2007
Location: kuwait
Senior Member
Littlefoot, can you give me an example how to do it with parameter. I know how to pass parameter to called form but how will pass back to calling form. I am actually stuck with an application Sad
Re: Return value to calling form from called form [message #356697 is a reply to message #356106] Sat, 01 November 2008 02:48 Go to previous message
white_phoenix
Messages: 19
Registered: November 2007
Junior Member
Easy,

at form B, do assign the global variable to copy the value

for example at form B where the calculation happens

:global.totalB := :blockB.total; 



at form A, form level trigger, when-windows-activated assign the variable back


:blockA.total := :global.totalB;



Razz
Previous Topic: Need to allow user to update data
Next Topic: HDD SerialNumber
Goto Forum:
  


Current Time: Mon Feb 03 14:58:45 CST 2025