How to pass value from one form to another form... [message #179605] |
Wed, 28 June 2006 03:28 |
oracleproblem
Messages: 47 Registered: May 2006 Location: Dhaka
|
Member |
|
|
Friends,
I have several input forms in my project...Now I am facing a problem that I need to pass one or two value from one form to another input form..for some reason...but I do not know how..so please if anyone know this how then please help me ....better if with example.....imtiazmasud
|
|
|
|
|
Re: How to pass value from one form to another form... [message #179617 is a reply to message #179610] |
Wed, 28 June 2006 04:20 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
oracleproblem wrote on Wed, 28 June 2006 10:46 | friends,
I need a bit of detalis of that..please better if details with example........imtiazmasud
|
From Forms help, an example of a global variable.
/*
** Built-in: DEFAULT_VALUE
** Example: Make sure a Global variable is defined by
** assigning some value to it with Default_Value
*/
BEGIN
/*
** Default the value of GLOBAL.Command_Indicator if it is
** NULL or does not exist.
*/
Default_Value('***','global.command_indicator');
/*
** If the global variable equals the string we defaulted
** it to above, then it must have not existed before
*/
IF :Global.Command_Indicator = '***'
THEN Message('You must call this screen from the Main Menu');
RAISE Form_Trigger_Failure;
END IF;
END;
From Forms help passing parameters:
/* Example 2:
** Call a form, pass a parameter list (if it exists)
*/
DECLARE
pl_id PARAMLIST;
theformname VARCHAR2(20);
BEGIN
theformname := 'addcust';
/* Try to lookup the 'TEMPDATA' parameter list */
pl_id := GET_PARAMETER_LIST('tempdata');
IF ID_NULL(pl_id) THEN
CALL_FORM(theformname);
ELSE
CALL_FORM(theformname,
hide,
no_replace,
no_query_only,
pl_id);
END IF;
CALL_FORM('lookcust', no_hide, do_replace, query_only);
END;
From Forms help, the creation of a parameter list:
/*
** Built-in: CREATE_PARAMETER_LIST
** Example: Create a parameter list named 'TEMPDATA'. First
** make sure the list does not already exist, then
** attempt to create a new list. Signal an error
** if the list already exists or if creating the
** list fails.
*/
DECLARE
pl_id ParamList; pl_name VARCHAR2(10) := 'tempdata';
BEGIN
pl_id := Get_Parameter_List(pl_name);
IF Id_Null(pl_id)
THEN
pl_id := Create_Parameter_List(pl_name);
IF Id_Null(pl_id)
THEN
Message('Error creating parameter list '||pl_name);
RAISE Form_Trigger_Failure;
END IF;
ELSE
Message('Parameter list '||pl_name||' already exists!');
RAISE Form_Trigger_Failure;
END IF;
END;
If you use parameters, make sure that the form you are calling has the parameters defined. Form parameters can be found in the object navigator.
MHE
|
|
|