How to use CALL_FORM with param_list ? Not working !!

comradec
comradec used Ask the Experts™
on
I'm trying to call another form and pass in an ID.

I do this by creating a parameter list, calling the form like this

        CALL_FORM('form_name',
                   hide,
                   no_replace,
                   no_query_only,
                   pl_id);

But i get an error like this:

"No such parameter name P_MYNAME_ID exists in form 'CALLED_FORM' "

What do i need to setup in the CALLED_FORM to recognise my param_list ?





Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Helena Markováprogrammer-analyst

Commented:
Did you create parameters in your called form ?

Author

Commented:
Yes, heres the procedure:

PROCEDURE call_client_form(v_myname_id IN NUMBER) IS

 pl_id PARAMLIST;
 pl_name VARCHAR2(10) := 'tmpdata';
 p_myname_id VARCHAR2(20);

BEGIN

 p_myname_id := to_char(v_myname_id);

 pl_id := GET_PARAMETER_LIST(pl_name);
 
 IF id_null(pl_id) THEN
     
        pl_id := CREATE_PARAMETER_LIST(pl_name);
 ELSE
       DELETE_PARAMETER(pl_id,'p_myname_id');

 END IF;

 ADD_PARAMETER(pl_id,'p_myname_id',TEXT_PARAMETER,p_myname_id);
 
 IF id_null(pl_id) THEN
        show_my_alert(1,'error',0);
 ELSE
     
        CALL_FORM('myform',
                   hide,
                   no_replace,
                   no_query_only,
                   pl_id);
 END IF;
 
 --DESTROY_PARAMETER_LIST(pl_id);
 
END;
Helena Markováprogrammer-analyst

Commented:
There must be a parameter in your called form, too:

p_myname_id
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Yes, heres the procedure:

PROCEDURE call_client_form(v_myname_id IN NUMBER) IS

 pl_id PARAMLIST;
 pl_name VARCHAR2(10) := 'tmpdata';
 p_myname_id VARCHAR2(20);

BEGIN

 p_myname_id := to_char(v_myname_id);

 pl_id := GET_PARAMETER_LIST(pl_name);
 
 IF id_null(pl_id) THEN
     
        pl_id := CREATE_PARAMETER_LIST(pl_name);
 ELSE
       DELETE_PARAMETER(pl_id,'p_myname_id');

 END IF;

 ADD_PARAMETER(pl_id,'p_myname_id',TEXT_PARAMETER,p_myname_id);
 
 IF id_null(pl_id) THEN
        show_my_alert(1,'error',0);
 ELSE
     
        CALL_FORM('myform',
                   hide,
                   no_replace,
                   no_query_only,
                   pl_id);
 END IF;
 
 --DESTROY_PARAMETER_LIST(pl_id);
 
END;
Helena Markováprogrammer-analyst

Commented:
In your form 'myform' create a text parameter P_MYNAME_ID.

In the on-line help see "Creating and Passing Parameter Lists" topic.

Author

Commented:
Yes, heres the procedure:

PROCEDURE call_client_form(v_myname_id IN NUMBER) IS

 pl_id PARAMLIST;
 pl_name VARCHAR2(10) := 'tmpdata';
 p_myname_id VARCHAR2(20);

BEGIN

 p_myname_id := to_char(v_myname_id);

 pl_id := GET_PARAMETER_LIST(pl_name);
 
 IF id_null(pl_id) THEN
     
        pl_id := CREATE_PARAMETER_LIST(pl_name);
 ELSE
       DELETE_PARAMETER(pl_id,'p_myname_id');

 END IF;

 ADD_PARAMETER(pl_id,'p_myname_id',TEXT_PARAMETER,p_myname_id);
 
 IF id_null(pl_id) THEN
        show_my_alert(1,'error',0);
 ELSE
     
        CALL_FORM('myform',
                   hide,
                   no_replace,
                   no_query_only,
                   pl_id);
 END IF;
 
 --DESTROY_PARAMETER_LIST(pl_id);
 
END;

Author

Commented:
"In your form 'myform' create a text parameter P_MYNAME_ID."

Yes, but i've created that list in the calling form. Wnt it already exist ?

How do i initialise the P_MYNAME_ID in the CALLED form?

In a pre-form trigger ?


Author

Commented:
"In your form 'myform' create a text parameter P_MYNAME_ID."

Yes, but i've created that list in the calling form. Wnt it already exist ?

How do i initialise the P_MYNAME_ID in the CALLED form?

In a pre-form trigger ?


Helena Markováprogrammer-analyst

Commented:
Yes, in a Pre-Form trigger you can "read" a value of P_MYNAME_ID parameter. This value is set in a calling form.

Author

Commented:
"In your form 'myform' create a text parameter P_MYNAME_ID."

Yes, but i've created that list in the calling form. Wnt it already exist ?

How do i initialise the P_MYNAME_ID in the CALLED form?

In a pre-form trigger ?


Author

Commented:
"In your form 'myform' create a text parameter P_MYNAME_ID."

Yes, but i've created that list in the calling form. Wnt it already exist ?

How do i initialise the P_MYNAME_ID in the CALLED form?

In a pre-form trigger ?


>"In your form 'myform' create a text parameter >P_MYNAME_ID."
>
>Yes, but i've created that list in the calling form. Wnt >it already exist ?

No - Henka is right.  The called form must also have the parameter defined.  The Object Navigator has an entry "Parameters" where you can do this.

>
>How do i initialise the P_MYNAME_ID in the CALLED form?
>
>In a pre-form trigger ?

I'm not sure if you mean reading the value, which Henka has already answered, or declaring the parameter which is what you do in the Parameters entry.

Author

Commented:
"In your form 'myform' create a text parameter P_MYNAME_ID."

Yes, but i've created that list in the calling form. Wnt it already exist ?

How do i initialise the P_MYNAME_ID in the CALLED form?

In a pre-form trigger ?


Author

Commented:
Thanks, defined the paramter in the called form.

Now works.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial