Re: Passing parameters between forms in Developer 2000
Date: 1997/10/07
Message-ID: <19971007005700.UAA06524_at_ladder01.news.aol.com>#1/1
>I am trying to pass parameter info from one form to another and have that
>info appear in a block that is not associated with a table. The called form
>appears, currently, but the passed parameter information is not appearing
>in the field associated with the block. Under "When-new-block-instance" I
>copy the parameter information to the block field, using the copy command.
>Why doesn't this work? What will work,if this won't.
>
>Thanks!
>
>Lauren
Hey Lauren,
U need to do the following things:
1. In theWhen-New-Forms-Instance Trigger, declare local variables to capture
the parameters and use the built-in GET_PARAMETER_ATTR(pl_id_or_name,
param_name, param_data_type, local_variable)
where
pl_id_or_name = the parameter list ID or name that u are passing param_name = actual name of the parameter. Ex. v_salary etc.. param_data_type = data type of the parameter list. Usually this will be TEXT_PARAMETER. Even if you have some numbers being passed, declare yourlocal variable in the new form as a varchar2 and then convert it into a numeric type after capturing the value
and local_variable is the variable that you define and use to capture the value of the parameter that is being passed.
2. U follow the above procedure for all the parameters that are being passed (i.e., declare as many local variables and capture the parameter values in the When-New-Form-Instance trigger).
3. After you are done capturing these values, you can manipulate the parameters as you want and place them wherever you want.
4. If all the above stuff seems too complicated, then try this simple alternative.
In the called form, create all the parameters are being passed to the form. U create these under the PARAMETERS Node in the Object Navigator.NOTE: The names of these parameters must exactly be the same as the parameters being passed.
That's it. You have the parameters and their values in your called form. You refer to them using :PARAMETER.param_name.
The disadvantage of this alternative is that, you create an overhead when create these parameters in your form i.e., you have to create them and store them as part of the form. However, in the first method, you just use them on the fly without incurring any overhead of creating the parameters. Received on Tue Oct 07 1997 - 00:00:00 CEST