Solved

Oracle Forms Passing Parameters

Posted on 1998-05-24
2
11,304 Views
Last Modified: 2008-08-31
Hello Developer 2K Users,
I am trying to pass a few parameters from one form to the next form using built-in call_form function
by creating run time parameters in the calling form. How do I capture these parameters in the called form.
Please help me understand the process.
Thanks,
  Venkat.
0
Comment
Question by:Venkat052498
2 Comments
 
LVL 4

Accepted Solution

by:
sganta earned 50 total points
ID: 1081565
Hai Venkat !

I have the solution for your problem.

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', 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 you
Thanks and Regards - SGANTA
0
 

Author Comment

by:Venkat052498
ID: 1081566
 Thanks for your answer ,which has worked for me.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JDeveloper 12c for 32 bit 4 71
How do I get sql developer to give me valuable exception information? 2 46
Queries 15 34
selective queries 7 22
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now