Difficulty in passing parameter in Forms 4.5

Difficulty in passing parameter in Forms 4.5

Post by Jimm » Thu, 09 Oct 1997 04:00:00



I have difficulty in passing parameter list between two forms.

        Assume forms FORM1 has a button with the following codes:

        declare
                para_id paramlist;
        begin
                para_id := get_parameter_list('para_name');
                if not id_null(para_id) then
                        desttoy_parameter_list(para_id);
                end if;
                para_id := create_parameter_list('para_name);
                add_parameter(para_id,'p1',text_parameter,'testing');
                call_form('FORM2',no_hide,no_replace,no_query_only,para_id);
        end;

        But in FORM2, when-new-form-instance trigger, I don't know how to code
and show the p1's value in para_id. (it should show 'testing') I know
that it needs to define the parameter list again in FORM2. But I have
tried many times in different ways and still get the error message "p1
not defined in FORM2". Could anyone help me to solve this problem?
(press button in FORM1 and open FORM2 to show p1)

Thank in advance,
Jimmy

 
 
 

Difficulty in passing parameter in Forms 4.5

Post by JJame » Thu, 09 Oct 1997 04:00:00


Hi Jimmy! I had what sounds like a similiar problem.  I was working in
Developer 2000.  I discovered that if I regenerated the form, it solved the
problem.  The forms generator can be started by looking under the same
folder as where you start the form designer.



Quote:> I have difficulty in passing parameter list between two forms.
> tried many times in different ways and still get the error message "p1
> not defined in FORM2". Could anyone help me to solve this problem?
> (press button in FORM1 and open FORM2 to show p1)

> Thank in advance,
> Jimmy


 
 
 

Difficulty in passing parameter in Forms 4.5

Post by wraith » Thu, 09 Oct 1997 04:00:00


FORM2 has a set of user defined parameters(created in the object
navigator) all parameters that you pass to FORM2
must use those names.  Once you have done this you can reference the
parameter just like any block variable.

Charles


> I have difficulty in passing parameter list between two forms.

>         Assume forms FORM1 has a button with the following codes:

>         declare
>                 para_id paramlist;
>         begin
>                 para_id := get_parameter_list('para_name');
>                 if not id_null(para_id) then
>                         desttoy_parameter_list(para_id);
>                 end if;
>                 para_id := create_parameter_list('para_name);
>                 add_parameter(para_id,'p1',text_parameter,'testing');

> call_form('FORM2',no_hide,no_replace,no_query_only,para_id);
>         end;

>         But in FORM2, when-new-form-instance trigger, I don't know how
> to code
> and show the p1's value in para_id. (it should show 'testing') I know
> that it needs to define the parameter list again in FORM2. But I have
> tried many times in different ways and still get the error message "p1

> not defined in FORM2". Could anyone help me to solve this problem?
> (press button in FORM1 and open FORM2 to show p1)

> Thank in advance,
> Jimmy

 
 
 

Difficulty in passing parameter in Forms 4.5

Post by Mark Freudenbe » Fri, 10 Oct 1997 04:00:00


Jimmy,

When passing parameters between forms, the second form must have a
parameter with the same name as the one you are passing to it from the
first form.  That means you must have created that parameter at design
time (under the parameter node in the object navigator).  When the
second form is called and a parameter is passed to it, the parameter
in the second form is given the value of the passed parameter.  You
can access or use this parameter as follows:

:parameter.param_name

You can change it by assigning new values to it or reference it for
other needs.

Good luck.

Mark Freudenberg



Quote:>I have difficulty in passing parameter list between two forms.

>    Assume forms FORM1 has a button with the following codes:

>    declare
>            para_id paramlist;
>    begin
>            para_id := get_parameter_list('para_name');
>            if not id_null(para_id) then
>                    desttoy_parameter_list(para_id);
>            end if;
>            para_id := create_parameter_list('para_name);
>            add_parameter(para_id,'p1',text_parameter,'testing');
>            call_form('FORM2',no_hide,no_replace,no_query_only,para_id);
>    end;

>    But in FORM2, when-new-form-instance trigger, I don't know how to code
>and show the p1's value in para_id. (it should show 'testing') I know
>that it needs to define the parameter list again in FORM2. But I have
>tried many times in different ways and still get the error message "p1
>not defined in FORM2". Could anyone help me to solve this problem?
>(press button in FORM1 and open FORM2 to show p1)

>Thank in advance,
>Jimmy