Parameters in Call_Form

Hi,
A form A call to a form B using Call_Form built-in. I would like to pass values from B to A.
What alternative to globals variables does exist to do that ?
Thanks.

Use parameters. In the Forms Builder, in the Navigator window, there is a node called Parameters. You can create a parameter there and refer to it in your form using :PARAMETER like it's a block. e.g.
if :parameter.myparam is not null then
... -- Do something with the parameter.
end if;
The calling form needs to build up a parameter list and pass it using OPEN_FORM, CALL_FORM, etc.
Regards,
Robin Zimmermann
Forms Product Management
200211

Similar Messages

  • Query in Parameters in Oracle Forms 6i

    Can any one explain me how to go with parameters in oracle forms 6i's Object Navigator.If explained with an example it will be of great help for me.
    Thanks,
    Prathap

    Hello,
    Forms parameters are usefull to receive a value from a calling form or for a command line.
    You can pass a value to a form through these parameters, which value can be read inside the form.
    Assume your form have to display only employees of departement 10.
    In the parameter node, you create a new parameter then name it : DEPARTEMENT (number)
    A the start of this form, you can filter the data in the Where clause property of the block:
      DEPTNO = :PARAMETER.DEPARTEMENTand, when the first form call this one, it pass this parameter in the CALL_FORM() built-in
    Declare
      pl_id PARAMLIST;
      pl_name VARCHAR2(10);
    Begin 
      -- create the parameter list --
      pl_name :=  'temp';
      pl_id :=  get_parameter_list(pl_name);
      IF NOT ID_NULL(pl_id) THEN
        destroy_parameter_list(pl_id);
      END IF;
      pl_id := create_parameter_list(pl_name);
      -- add the parameter to the list --
      add_parameter(pl_id, 'DEPARTEMENT', TEXT_PARAMETER, 10);
      -- call the employees dialog --
      call_form('EMP_DIALOG', HIDE, NO_REPLACE, NO_QUERY_ONLY, NO_SHARE_LIBRARY_DATA, pl_id);
    End ;Hope this is clear enough.
    Francois

  • Forms 10.1.2.0.2: Web Form does not appear at Runtime with CALL_FORM

    Hello there,
    We have a number of forms we're executing as web forms using Oracle JInitiator 1.3.1.22. We have one form in particular that, when a button is pressed, is supposed to call another form via the CALL_FORM built-in.
    We are passing a parameter list to the new form, and executing the CALL_FORM built-in with these Setting Parameters:
    CALL_FORM( formmodule_name => '<OUR_FORM_NAME>',
               display         => NO_HIDE,
               switch_menu     => NO_REPLACE,
               query_mode      => NO_QUERY_ONLY );When we run the starting form as a web form (via JInitiator 1.3.1.22), and press the button to call the other form, all buttons on the starting form are greyed-out/disabled. The called form does not appear.
    I have carried out a number of checks with my own debugging tool (stored procedure writing messages to a table via an autonomous transaction), and forms focus is definitely been transferred to the called form. For example, the WHEN-NEW-FORM-INSTANCE trigger in the called form is definitely being executed.
    I suspect this problem is JVM-related rather than Forms-specific. My current plan of attack is to request the Application Server Logs tomorrow morning (I don't currently have access to them) and see if I can find any Java-related error messages. However, if any of you reading this have experience of this type of problem and can offer any assistance, please don't hesitate to let me know your suggestions/advice.
    Cheers.
    James

    You could check the settings of the window in the calling form. If its set to "Modal" or "Dialog", and the window in the called form has other settings, the new window might be opened "behind" the old window.

  • Problem with Call_Form to Return to the Previous Screen with Saved Results

    Hello All,
    I have two forms (e.g. Form A & Form B) both forms have options to call one another with a Push Button included in the form. Our users want to be able to return to Form B from Form A with a previous search result and parameters saved in Form B. I was able to use the following code to make this happen:
    1. In Form B, I added the following code in the When-Button-Pressed Trigger for the 'PB_Return_2_Form_A' item:
    CALL_FORM('Form_A', HIDE,NO_REPLACE, NO_QUERY_ONLY);
    2. In Form A, I used the following code in the When-Button-Pressed Trigger for the 'PB_Return_2_Form_B' item:
    EXIT_FORM;
    The above code works beautifully when I enter form B first and search the database with all the required parameters entered, the parameters and search results were displayed upon return from Form A. But the problem is when I enter Form A first, the form exits abruptly. I tried to use pre-condition testing in Form A such as the following code:
    IF :GLOBAL.DWR01_First_Call = 'Y' THEN
    NEW_FORM('DWR_SEL', NO_ROLLBACK);
    :GLOBAL.DWR01_First_Call := 'N';
    ELSE
    EXIT_FORM;
    END IF;
    (BTW, I initialize the :GLOBAL.DWR01_First_Call variable to 'Y' in the 'When-New-Form-Instance' Triggers in the form level.) But the above code does not work. For some reason this :GLOBAL.DWR01_First_Call = 'Y' condition always gets executed such that the working part of code is by-passed.
    If any of you can help me on resolving my problem asap, I would really appreciate it.
    Thanks to you all in advance,
    Jinlan
    --

    Thanks all for the information and help. I have read through the information provided in the links above, and modified the global variable accordingly in both the calling and called forms, but all tries failed. From my failed attempts, I realize that my current design might not work because the value of GLOBAL.DWR01_First_Call seems to be 'Y' each time when Form A is called as such the 'EXIT_FORM' statement in the ELSE condition will never be executed. This intrigues me with the following questions:
    I. How do I use the debug in Forms 6i to step thru the values of a variable at a given execution state? (Although, I am pretty certain that the :GLOBAL.DWR01_First_Call value is always going to be a 'Y' each time when Form A is called, it would be nice if I could see it myself and not just guessing. :) )
    II. By now, I am pretty sure my current design may not work... How do I make my code to work for the situation I described above? For your convenience, I restate my situation again below and hopefully it will clarify my needs:
    Both Form A and Form B have options to call one another with a Push Button included in each form. Our users want to be able to return to Form B from Form A with a previous search result and parameters saved in Form B, and the following code works:
    1. In Form B, I added the following code in the When-Button-Pressed Trigger for the 'PB_Return_2_Form_A' item:
    CALL_FORM('Form_A', HIDE,NO_REPLACE, NO_QUERY_ONLY);
    2. In Form A, I used the following code in the When-Button-Pressed Trigger for the 'PB_Return_2_Form_B' item:
    EXIT_FORM;
    But, the above code kicks the user out of the application completely if the user enter Form A first and then select Form B by pressing the 'PB_Return_2_Form_B' push button(BTW, this access mechanism is most commonly used by our users). So, how do I allow users to enter Form A first and allow them to call Form B and proceed with entering parameters and search query, without exiting the form.
    Any and all the help you can provide on this will be greatly appreciated.
    Thanks millions in advance,
    Jinlan Tomasic
    [email protected]
    1(907)458-6899

  • Passing and Retrieving parameters problem...

    Hello,
    I am very green to Oracle forms builder. I have a multi-form application that I am trying to create a parameter list for on the first form and pass that parameter to a second form via the OPEN_FORM method. I am able to create the parameter, I set a runtime breakpoint and ran the form and verified that the correct value is there. I can then call the second form using the CALL_FORM('form_name',ACTIVATE,NO-HIDE,'params_list_name'). Once the second form pulls up how do I verify that the parameter is indeed there and how do I access that parameter.
    The project I am working on is a simple log in screen where a user would enter his or her ID and Password/Pin, this is the first form. The trigger on the "log in" button verifies that the user entered the correct information and calls the next form. I am assuming that passing a parameters list is the most effecient way to do this. I would like to pass the UserID to the second form and use it in the WHERE clause of a SQL expression in order to show the user his or her personal data. Do I need to create a PRE_FORM trigger on the second form to accept the passed parameters list?
    Any help would be much appreciated.
    Alex

    on your second form, on object navigator's parameter node, create the parameters having the same names you defined in your first form. then
    you can use it as :PARAMETER.your_param_name anywhere in the second form.

  • Forms Help- calling another forms w/ parameters

    Hi- I am new to forms development.
    When calling a form, I see samples of code that use the 'execute' procedure, and then pass a few parameters.
    I try to open a different form, use this syntax, and I get errors...along the lines of the parameters are wrong.
    My question- is there a place in the application where I can find a listing of forms I can call, and what parameter names to use?
    Thanks

    hi
    Definitions : FORM parameters are variables of TYPE char,number, or date that you define
    at design time.
    Let us assume that I am calling form in this script.
    ** Example:   Calls a form, passing a parameter list if the
    **            parameter list exists.
       Here it passes the city_name and City_date;
    DECLARE
      pl_id       ParamList; 
      city_name VARCHAR2(30) := 'BANGALORE'; // You can assign dyanamically;
      city_date DATE := SYSDATE;
    BEGIN
      ** Try to lookup the 'TEMPDATA' parameter list
      pl_id := Get_Parameter_List('tempdata');
      IF NOT ID_NULL(pl_id) THEN
          Destroy_Parameter_List(pl_id);
      END IF;
      pl_id := CREATE_PARAMETER_LIST('tempdata');
      ADD_PARAMETER(pl_id,'p_city',TEXT_PARAMETER,city);
      ADD_PARAMETER(pl_id,'p_city_date',TEXT_PARAMETER,TO_CHAR(city_date));
      /* Please note that here you can pass only Text i.e., CHAR parameters, that
         means if it is other than CHAR you have to convert into CHAR function */
      CALL_FORM('XYZ_FORM', No_HIDE, NO_REPLACE, NO_QUERY_ONLY,pl_id);
    END IF;
    In the above program I am calling XYZ_FORM by passing parameter list of "TEMPDATA"
    which contains 2 parameters
        1. P_City
        2. P_city_date
    When you are receiving these parameters in the XYZ_FORM.
    You MUST HAVE these PARAMETERS in the XYZ_FORM.
    You can declare like this
    1. In XYZ_FORM, Click on PARAMETERS.
    2. Go to the property sheet of PARAMETER1
        Change the following things
        i) Name = P_CITY   /* It must be the same name that what you are passing */
        ii) Data Type = CHAR
        iii) Maximum Length = 30 //sample
        iv) Close the parameter sheet.
    /* Now you have created for one parameter */
    3. Similarly Create one more parameter for P_City_date by clicking "new".
        i)  Name = P_CITY_DATE   /* It must be the same name that what you are passing */
        ii) Data Type = DATE
        iii) Close the parameter sheet.
    -- Similarly you can have no. of parameters.
    To access the values of the above parameters in the XYZ_FORM
    append with :PARAMETER.
    That is
    You can access P_City in Xyz_form by   :PARAMETER.P_CITY
    Similarly for P_City_Date is :PARAMETER.P_CITY_DATE.
    I hope this is more than sufficient and it is acceptable to yousarah

  • How to pass Parameters between two forms

    im trying to do this but i could not find any way for this.
    can any one help me how can i pass parameters between two forms
    in forms4.5. any help will be appreciated
    thanks.
    null

    Global variables can be used, but you can do what the online help
    says ...
    Parameters are passed to called forms by means of a parameter
    list. A parameter list is a named programmatic construct that is
    simply a list of parameter names (called keys) and their values.
    You can pass parameter values to forms invoked by the built-in
    subprograms CALL_FORM, OPEN_FORM, and NEW_FORM. In addition, you
    can pass parameter values to other Oracle tools with the
    RUN_PRODUCT procedure.
    A parameter you include in a parameter list can be either a text
    parameter or a data parameter. The parameter type determines how
    its value is interpreted.
    Text Parameters The value of a text parameter being passed to a
    called product is a CHAR string that can represent the following:
    n a user-defined form parameter defined in a form invoked
    by the CALL_FORM, OPEN_FORM, or NEW_FORM built-in subprograms
    n a command line or user-defined parameter for a product
    invoked with the RUN_PRODUCT built-in subprogram
    Data Parameters The value of a data parameter being passed to a
    called product is always the name of a record group defined in
    the current form. (A record group is a data structure that
    stores records derived from a query or through programmatic
    assignment.) Data parameters are used to pass data to products
    invoked with the RUN_PRODUCT built-in subprogram. You cannot
    pass data parameters to forms.
    The following table shows the structure of a parameter list that
    contains four parameters:
    Key Paramtype Value
    CITY Text_Parameter 'BOGOTA'
    CATEGORY Text_Parameter 'EXPORTS'
    MULTIPLIER Text_Parameter '.0275'
    NEW_DATA Data_Parameter 'RECORD_GROUP8'
    arun reddy (guest) wrote:
    : im trying to do this but i could not find any way for this.
    : can any one help me how can i pass parameters between two forms
    : in forms4.5. any help will be appreciated
    : thanks.
    null

  • Call_form,how to recognis input by called form

    I am using call_form.
    I am making a parameter list in calling form and passing it to a other form. But how the other form will recognize those parameter? please tell me.

    Hi,
    You need to create the parameter(s) on your target form and some code to make use of it:
    1.- Open the form module and find the Parameters node
    2.- Create the Parameter(s) needed. make sure the parameter name is the same used in the caller form and set the data type and maximum length as required.
    3.- Add a code snippet to trigger when-new-form-instance:
    begin
         if :parameter.YOUR_PARAMETER is not null then
         go_block('YOUR_DATA_BLOCK');
         execute_query;
         end if;
    Exception
    when others then
    message('Error setting form parameters. '||sqlerrm, no_acknowledge);
    end;
    4.- On YOUR_DATA_BLOCK pre-query trigger add:
    begin
    If :Parameter.YOUR_PARAMETER is not null then
    :YOUR_DATA_BLOCK.BLCOK_ID := TRIM(:Parameter.YOUR_PARAMETER);
    End if;     
    Exception
    when others then
    message('Error setting parameters. '||sqlerrm, no_acknowledge);
    end;
    Regards,
    Hugo

  • How to pass parameters to concurrent program report from Forms Personalizn

    Hi All,
    I am trying to run a report from a menu entry in the AP Invoice entry form. For this I have done the necessary steps of creating the menu entry and am assigning the values for the 2 parameters to a global variable and then launching SRS form.
    In SRS form created an action to assign the global variable value to work_order.parameters. I can invoke the SRS OK except that my 2 parameter values appear concatenated in the first parameter itself and are not getting assigned to each of them seperately.
    my global variable assignment is as follows :
    =${item.inv_sum_folder.vendor_name.value}||'.'||${item.inv_sum_folder.vendor_site_code.value}
    and my work_order.parameters value assignment is as follows :
    =select nvl(${global.kmg_invalid_po_gv.value}, ${item.work_order.parameters.value}) from dual
    It passes parameters OK if i replace custom report with standard AP report. I also made my parameters to be free text (17 character value set) to not validate input, but still no joy.
    Any ideas why this is not working ?
    Thanks in advance.
    Shankar

    As Francois said in his answer:
    e.g.:Form A call FORM B
    In form A (Button's or menu's Trigger code)
    DECLARE
    param_list_id  ParamList;     
    BEGIN
    param_list_id := GET_PARAMETER_LIST('EMPNO');
    IF NOT ID_NULL(param_list_id) THEN 
    DESTROY_PARAMETER_LIST(param_list_id);
    END IF;
    param_list_id := CREATE_PARAMETER_LIST('empno');
    ADD_PARAMETER(param_list_id, 'EMPNO', TEXT_PARAMETER, EMPNO);
    CALL_FORM ( 'FORM B.FMX',HIDE,DO_replace,NO_QUERY_ONLY,param_list_id);and in FORM B create a parameter EMPNO (e.g.: varchar2) in node tree(parameter) and at Form level (e.g. WHEN NEW FORM INSTANCE read parameter-
    or you could create a GLOBAL variables
    or, still,Global procedure in LIB
    Regards

  • Passing parameters accross multiple forms

    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.
    ---- Code used by me for creating parameter in formA and calling formB starts here ------
    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;
    ----------------------- Code ends here ---------------------------------
    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:
    -------- Code for retreiving parameter in WHEN-NEW-FORM-INSTANCE of formB starts here ---------
    :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,CURRENT_VALUE);
              :BLOCK4.EMPID := CURRENT_VALUE;
         END IF;
    END;
    ----------------------- Code ends here ---------------------------------
    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

    I suppose you shouldn't try to extract parameter value from parameter list in WHEN-NEW-FORM-INSTANCE as Forms do it for you. Just use :parameter.P_EMPID. Of course, you may also use global variable or some package variable (if sharing library datf), or record group, created with GLOBAL_SCOPE.

  • Passing parameters to FMX via windows CMD

    Hi, all!
    is it possible to run a form from windows command line and pass some specific parameters to that form?
    for example,
    start_form.bat[
    c:\orawin95\bin\ifrun60.exe module=myForm *<pass parameters syntax>* userid=user1/user1_pass@oraInst
    Next command showing info about using ifrun60 and I think that passing parameters to a form is not provided.
    ifrun60 ?
    Thanx

    I can not change the code of the form because it is a part of the banking system, purchased from the developer (mainly this form called from reports menu using CALL_FORM). Parameter, of course, there is, otherwise I would not ask the question.
    Arun, you were right!
    Yesterday's attempt to run the form failed, because perhaps I was mistaken in the name of the parameter form (case sensitive, I was taped in lower case).
    So, result:
    there are parameter named MST_MNEMO, and
    ifrun60 module=MS_REPORTS mst_mnemo=TAX_REPORT
    works as I expected, consequently, in the form you can pass any option that name is different from the parameters of IFUN60. ;)
    Thanks to all.
    Edited by: just me on 20.11.2009 9:58

  • How to pass parameters between two xterm windows?

    Hi,
    I would like to know how to pass parameters between two xterm windows where there are two independence processes running on them respectively ? Would appreciate if any one out there can advise me . Thanks.

    Global variables can be used, but you can do what the online help
    says ...
    Parameters are passed to called forms by means of a parameter
    list. A parameter list is a named programmatic construct that is
    simply a list of parameter names (called keys) and their values.
    You can pass parameter values to forms invoked by the built-in
    subprograms CALL_FORM, OPEN_FORM, and NEW_FORM. In addition, you
    can pass parameter values to other Oracle tools with the
    RUN_PRODUCT procedure.
    A parameter you include in a parameter list can be either a text
    parameter or a data parameter. The parameter type determines how
    its value is interpreted.
    Text Parameters The value of a text parameter being passed to a
    called product is a CHAR string that can represent the following:
    n a user-defined form parameter defined in a form invoked
    by the CALL_FORM, OPEN_FORM, or NEW_FORM built-in subprograms
    n a command line or user-defined parameter for a product
    invoked with the RUN_PRODUCT built-in subprogram
    Data Parameters The value of a data parameter being passed to a
    called product is always the name of a record group defined in
    the current form. (A record group is a data structure that
    stores records derived from a query or through programmatic
    assignment.) Data parameters are used to pass data to products
    invoked with the RUN_PRODUCT built-in subprogram. You cannot
    pass data parameters to forms.
    The following table shows the structure of a parameter list that
    contains four parameters:
    Key Paramtype Value
    CITY Text_Parameter 'BOGOTA'
    CATEGORY Text_Parameter 'EXPORTS'
    MULTIPLIER Text_Parameter '.0275'
    NEW_DATA Data_Parameter 'RECORD_GROUP8'
    arun reddy (guest) wrote:
    : im trying to do this but i could not find any way for this.
    : can any one help me how can i pass parameters between two forms
    : in forms4.5. any help will be appreciated
    : thanks.
    null

  • Retriving only hidden parameters from request.getParameter

    Hi,
    I want to retrive only the hidden parameters from previous JSP page into current JSP page. The problem here is that my hidden parameters in privious page are dynamically generated (parameter names are decided based on values retrived from the database) and I cannot retrive them using "request.getParameter(<parametername>)"
    Can I find the parameter type (i.e. text box, text area, checkbox, radio or hidden) from the request.getParameter() or request.getParameterNames() methods? or is there any other way to find it.
    Thanks in advance for any help

    You can use the getParameterNames() or getParameterMap() methods from javax.servlet.ServletRequest to get all the parameters in the request. Even if they're dynamically generated, and you don't know the names in advance, these methods will ferret them out.
    getParameterMap() returns name String, values String [] pairs, so you'll have to work with String arrays to get the input out. It's got to be that way to accomodate checkboxes and other HTML form elements that can send more than one value for a given name.
    I prefer getParameterMap, because I don't like using Enumerations as much. - MOD

  • [Interface] - Passing variety parameters/input to PL/SQL report

    Hi,
    I've the PL/SQL report which can allow passing in the parameter, i use '&'.
    the report is given to the end user who do not have the IDE for PL/SQL. the machanism of the report is generated into the spool file and import into excel format.
    now i am wondering how to create a tool using SQL or PL/SQL to allow the end user to choose the parameter(s) dynamically and passing into the PL/SQL to generate the report based on the input selected.
    the parameters like below:
    package code :
    week no :
    year :
    department :
    all the above parameters, the data would be selected from the existing lookup table. the user is allow to select more than 1 input for specified parameter for instance i want to spool report for week 1 until week 5.
    pls advise any solution on this topic. thanks

    hi scoot,
    thank for reply.
    yep, i'm using sql*plus and also sql navigator 4.0 .
    the user don't have the software to interact. i'm thinking of build an simple interface using VB and passing in the parameter then initiate the sql*plus to run the program in background mode.
    but if you have any other solution which not need to use other software to wirte such program , pls let me know immediately. thank

  • Report should prompt me for parameters, please help.

    Hi All,
    I am using Crystal version 10, So is there any way I can get the behaviour of my parameters as dynamic parameter? I have this requirement because when I am deploying the Report on BO server, and try to open the report from InfoView, it is not prompting me for parameters, rather it is giving me the copy which we had scheduled earlier. To get the fresh data with different parameters, we again need to schedule the report.
    What I want is simple, Whenever user clicks on the report link in infoview, I should be promted for the parameters my report is using.
    Please help..
    Thanks
    -Azhar

    Hi
    It would prompt whenever it's refreshed.
    You can refer to Business View manager guide from [here|http://help.sap.com/businessobject/product_guides/boexir2/en/xir2_bv_admin_en.pdf ] for detailed information.
    Hope this helps!!
    Regards
    Sourashree

Maybe you are looking for