Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Oracle Forms issues - passing parameters accross multiple forms

Oracle Forms issues - passing parameters accross multiple forms

From: Preethi Nair <member34836_at_dbforums.com>
Date: Sun, 03 Aug 2003 01:18:08 +0000
Message-ID: <3192416.1059873488@dbforums.com>

I want to call formB from formA and pass parameters while doing it. BLOCK2 in formA contains a textitem named EMPID and I wand to pass the value in it to textitem named EMPID in BLOCK4 of formB. I created a parameter list and added items and values to it. I use call_form with the required entries to call formB.

DECLARE
        PLID PARAMLIST;
BEGIN

        PLID := GET_PARAMETER_LIST('PL');
        IF NOT ID_NULL (PLID) THEN
                DELETE_PARAMETER ('PL','P_EMPID');
        ELSE
                PLID := CREATE_PARAMETER_LIST('PL');
        END IF;
        ADD_PARAMETER('PL', 'P_EMPID', TEXT_PARAMETER, :BLOCK2.EMPID);
        CALL_FORM('C:\Project\formB', HIDE, NO_REPLACE,
        NO_QUERY_ONLY, 'PL');

END;

I added a parameter in object navigator/parameters and named it P_EMPID of type Char and length 11 (b'coz, :BLOCK2.EMPID is

Varchar2(11))

Also, I have written the following code in formB:
:BLOCK4.EMPID := :PARAMETER.P_EMPID;

I have written this code in the following three places of formB:

1) WHEN-NEW-FORM-INSTANCE --> form-level trigger
2) PRE-FORM --> form-level trigger
3) PRE-QUERY --> block-level(BLOCK4) trigger

Additionally, I also tried using GET_PARAMETER_ATTR to get the parameter value in WHEN-NEW-FORM-INSTANCE of formB. It is as

follows:

:BLOCK4.EMPID := :PARAMETER.P_EMPID;
DECLARE

        P_EMPID VARCHAR2(11);
        PLID PARAMLIST;
        PARAM_TYPE NUMBER;
        CURRENT_VALUE VARCHAR2(11);
BEGIN
        PLID := GET_PARAMETER_LIST('PL');
        IF NOT ID_NULL (PLID) THEN
                GET_PARAMETER_ATTR('PLID','P_EMPID',PARAM_TYPE,CURRE-
                NT_VALUE);
                :BLOCK4.EMPID := CURRENT_VALUE;
        END IF;

END;

In spite of all the above, when formB tries to start, I get FRM-47023 No such parameter named P_EMPID exists in form formB

What do I need to do?

Thanks,
Preethi

--
Posted via http://dbforums.com
Received on Sat Aug 02 2003 - 20:18:08 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US