Home » Developer & Programmer » Forms » how to capture an entry and use it in another form??
how to capture an entry and use it in another form?? [message #173253] Sun, 21 May 2006 01:21 Go to next message
qewani
Messages: 51
Registered: December 2005
Location: uaq
Member
i have a login form i wana capture the user type and use it in another form,
how to do that?!?
Re: how to capture an entry and use it in another form?? [message #173261 is a reply to message #173253] Sun, 21 May 2006 03:36 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You could use a parameter or a global variable to do that.
Re: how to capture an entry and use it in another form?? [message #173284 is a reply to message #173253] Sun, 21 May 2006 07:30 Go to previous messageGo to next message
qewani
Messages: 51
Registered: December 2005
Location: uaq
Member
can u give me any expamle?!

for the global variable where do i have to put the code of that and how would it be?? and how can i call it in another form?

do u have any examples?! please help?
Re: how to capture an entry and use it in another form?? [message #173286 is a reply to message #173253] Sun, 21 May 2006 08:41 Go to previous messageGo to next message
qewani
Messages: 51
Registered: December 2005
Location: uaq
Member
i want to declare a global variable in my login form to hold the user_type, so can i put the global variable code in the when button pressed..give an exmaple of the code?

after pressing the bottun it will call another form named main form
now i want to call the global variable which i declared in the login form and use it in the main form where do i have to write the code of calling the global variable and how would it be? any examples!?

please any one who can help me...?!
Re: how to capture an entry and use it in another form?? [message #173296 is a reply to message #173286] Sun, 21 May 2006 10:31 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Global variables are "visible" through entire Forms session. You'd set it once and it remains the same until the session is over or you explicitely erase its value (or change it).

Let's assume that your login form has a text item called "login_block.user_name". When the WHEN-VALIDATE-ITEM trigger does its job (validates that user entered a correct value), you'd set global variable's value as

:global.user_name := :login_block.user_name;

Call another form using CALL_FORM, OPEN_FORM or NEW_FORM. There's no need to transfer global variable's value as it is already set and ready to be used in another form(s).

Delete its value using

erase('global.user_name');
Previous Topic: Problem in Form Development for Oracle Apps
Next Topic: Multiple check box checked at a time.......
Goto Forum:
  


Current Time: Fri Sep 20 06:30:46 CDT 2024