Access bind variables in forms

Hi,
I have declared a bind variable called :cal_group in sql query of a calendar and i added the calendar as a portlet to a page. And i set the value of the bind variable in the Page parameters section in which this appears as a portlet parameter. Now, I have a form which is called from this page. And i want one of the fields in the form to be prepopulated with this bind variable value. How can i do this. Any ideas greatly appreciated ! Thank you.
--LG                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Hello sharmila,
Thank you for the response. Can you please give me an example. It would be very helpful to me. I was wondering how the form recognizes the variables declared in the calendar. Regards,
--LG                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • How to access Workflow variables in Form Designer?

    Hello,
    I am wanting to set certain subforms to readonly depending on which part of the workflow the form is currently on. I already have the JavaScript code working to set the subform fields to readonly, but now I cannot figure out how to trigger this and where do I keep a variable to keep track of which part of the workflow I am currently in.
    I assume I will have a variable in the workflow itself and then I can use the Set Value QPAC to change the variable for each workflow step before it goes to the User QPAC, but what about within the form? I don't understand how the form javascript will know to execute, so how does my workflow "talk" to the form to set these fields to readonly?
    Right now the JavaScript code is sitting in the root::initialize part of the form. I was assuming I could have something like "if my workflow variable is equal to XX then set this subform to read only". But, how do I access my workflow variable in the form designer?
    Also, since I have digital signatures, I am having to pass all the form data in document variables, will this affect how I need to do this? I was also thinking of possibly accessing/setting a hidden field in the form, but thought the above way may be better.
    I hope that made sense!
    Thank you,
    Jennifer

    To follow-up, I spoke with Adobe support this morning and they said that I cannot access Workflow variables within Designer (besides those Workflow variables that are already provided).
    He mentioned that if I use the hidden fields, that I would need to Render the form each time before going to the User to trigger this to happen. So, I am not sure what I will do just yet. I probably not worry about making the fields readonly for the time being; it was a little extra thought I had and isn't required for our process.
    Thank you,
    Jennifer

  • Need help on af:query, accessing bind variable.

    Hi All,
    Im working on Jdev 11.3. I need some help on af:Query UI component. I have a View Criteria defined on my VO and I am using this as <af:Query> in my .jsff. My View Criteria has 2 Bind Variables (Emp. Id, Emp Division). Emp Division is an LOV on the jsff.
    My requirement is to refresh the Results table when user changes the division LOV(and not when he clicks on Search button in the Query component).
    Is there a way to do this in backing bean? Something like a valuechangelistener on a LOV? How can I get from af:query component?
    Thanks.

    Hi,
    You can find some related info here..
    Can I achive valueChangeListener in af:query?
    and
    http://jobinesh.blogspot.com/2011/03/retrieving-viewcriteria-from-custom.html
    Thanks,
    TK

  • Bind variable inside a package

    Can we declare a bind variable inside a package specification?
    CREATE OR REPLACE PACKAGE GET_EMPLOYEEDETAILS
    IS
    PROCEDURE GET_FIRSTNAME(E_ID IN EMPLOYEES.EMPLOYEE_ID%TYPE, F_NAME OUT EMPLOYEES.FIRST_NAME%TYPE);
    VARIABLE O VARCHAR2(20);
    END GET_EMPLOYEEDETAILS ;
    CREATE OR REPLACE PACKAGE BODY GET_EMPLOYEEDETAILS
    IS
    PROCEDURE GET_FIRSTNAME(E_ID IN EMPLOYEES.EMPLOYEE_ID%TYPE, F_NAME OUT EMPLOYEES.FIRST_NAME%TYPE)
    IS
    BEGIN
    SELECT FIRST_NAME INTO F_NAME FROM EMPLOYEES WHERE EMPLOYEE_ID = E_ID;
    DBMS_OUTPUT.PUT_LINE(F_NAME);
    END;
    END GET_EMPLOYEEDETAILS;
    Output:
    ERROR at line 4: PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the following:
      := . ( @ % ; not null range default character
    The symbol ":=" was substituted for "VARCHAR2" to continue.
    2. IS
    3. PROCEDURE GET_FIRSTNAME(E_ID IN EMPLOYEES.EMPLOYEE_ID%TYPE, F_NAME OUT EMPLOYEES.FIRST_NAME%TYPE);
    4. VARIABLE O VARCHAR2(20);
    5. END GET_EMPLOYEEDETAILS ;
    6. /
    or is there any alternative for bind variables inside an package
    Thanks in advance
    Message was edited by: 1009739

    The "VARIABLE O VARCHAR2(20);" syntax is the way SQLPlus declared bind variables - it is specific to the client. Because PL/SQL packages and procedures are server code that continue past sessions, its only access to the client environment is what the client gives it - it can't go and create a bind variable in the client.
    PL/SQL procedures, functions and packages run from lots of environments, so they cannot access bind variables inside their body - you have to pass any external variables as parameters.
    Anonymous PL/SQL blocks can access bind variables.
    You can declare package public global variables - just leave out that "VARIABLE". E.g.
    CREATE OR REPLACE PACKAGE GET_EMPLOYEEDETAILS
    IS
    PROCEDURE GET_FIRSTNAME(E_ID IN EMP.EMPNO%TYPE, F_NAME OUT EMP.ENAME%TYPE);
    O VARCHAR2(20);
    END GET_EMPLOYEEDETAILS ;
    For local variables in your procedure, just put them between the IS and BEGIN. Using them in SQL inside the PL/SQL automatically uses them as a bind variable.
    create or replace PROCEDURE GET_FIRSTNAME(E_ID IN EMP.EMPNO%TYPE, F_NAME OUT EMP.ENAME%TYPE)
    IS
      O VARCHAR2(20);
      O2 VARCHAR2(21);
    BEGIN
      O := 'FR%';
    SELECT ENAME INTO F_NAME FROM EMP WHERE EMPNO = E_ID and ENAME like O;
    O2 := F_NAME || '2';
    DBMS_OUTPUT.PUT_LINE(F_NAME);
    END;
    O is bound in the query.
    To access bind variables from anonymous PL/SQL, first declare them in the calling environment. In SQL Plus that's
    VARIABLE O VARCHAR2(20);
    In Pro*C it's
    EXEC SQL BEGIN DECLARE SECTION;
      char[21] O
    EXEC SQL END DECLARE SECTION;
    Then reference it in anonymous PL/SQL with a colon as prefix:
    BEGIN
    SELECT FIRST_NAME INTO :O FROM EMPLOYEES WHERE EMPLOYEE_ID = E_ID;
    END;
    This only works for anonymous blocks (starting with BEGIN or DECLARE). As I said, PL/SQL procedures, functions and packages cannot see bind variables from the calling environment

  • Setting bind variables for VO in JUnit test case

    Hi,
    I am using Jdeveloper 11.1.2.2
    I have a problem while writing the test case for VO in JUnit.
    For the Remove method in the Test case , I have passed variables into the VO by using a setWhereClause() .
    Like this :
            view.setWhereClause(null);
            String whereClause = "location_id = '" + newUpdatedLocationId  + "' AND organization_id = '" +newOrganizationId + "'" ;
            view.setWhereClause(whereClause);
            view.executeQuery();
            while (view.hasNext()) {
                view.next();
                view.removeCurrentRow();
            fixture1.getApplicationModule().getTransaction().commit();But it is showing a an error like the bind variables are not set.
    So how will I access Bind variables programmatically and set the values ?
    Thanks
    Nigel.

    setNamedWhereClauseParam() is used for setting bind variables

  • Default form value using sql with bind variable

    I wish to create a form based upon a table with a foreign key. I wish to add a field to the form that is an uneditable text field with a default value using sql of 'select name from other_table where other_table_id = ?' where ? is a bind variable defined by a hidden field which is the value of the foreign key identified at runtime. How can this be done?
    null

    I don't think that will work. I have multiple people accessing the Portal at the same time with the same login (or lack of as public will be the most common user). I could set it easily enough as the value is passed to the form by a link object, so I could add it to the before page plsql block and set the value. But I am uncertain how it will behave in a multi-user mutlitasking environment.
    Maybe I should describe what I am looking to accomplish. I want to create a display above a form that will list static details from other tables (i.e. when editing a user's phone number, which is in one table, you want the user to see the person's name, which is in another table, and the form is based upon the phone table) ...
    Just as I am thinking about it, I thought of an idea. I could put some specific code in the before displaying page plsql section to query the database and use htp to output the information for data not in the table the form is based upon. I will try this and see how it works. It would have been nice to have just created a field that is not editable and had a default value, but this should work as well.
    Let me know if you see any problem with this or if you have any better suggestions.
    Thanks for the fast response.

  • How to use a bind variable in XE for accessing data from different sources

    Hi,
    I am new to XE and trying to create an application like this:
    (region source)
    Select * from v$session@:P1_DATABASE ;
    My intention is to give the name of the database at runtime to fetch the relevant data.
    But I am getting error like this
    1 error has occurred
    Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-01729: database link name expected
    Doesn't work even when I check the "Generic Columns" and run the query at the run time (same error).
    Can some one please help!
    Regards,
    Santosh Loke

    Hi,
    There are rules using names in SQL. I think you could use dynamic SQL to achieve the goal in your case. It is not clear for me what are you going to do. Moreover bind variable are difficult to use some times.
    You could start with something simple as a report and a form.
    Konstantin

  • Access a variable in the Adobe form for Java Scripting

    Hi,
    I am unable to know how to access the variable in a Adobe form.
    The variable is field of an internal table. My adobe form structure is as follows
    MAIN_PAGE->FORMSET->FirstFORM->EXT.
    in the EXT subform the variable(cust)  exists.
    The cust is in turn an internal table.

    Hello Sreelatha,
    I think we cannot hide a page.  as in, page is the main container.  In a container, we can hide any field using some scripting.  Even though if we hide the field, it is present on page but not visible. 
    but if some logic is there, please let me know.
    Thanks,
    Rakesh.
    Edited by: rakhi966 on Sep 8, 2011 8:54 PM

  • Getting a bad bind variable error while compiling a custom form in R12

    Hi,
    I am getting a bad bind variable error while compiling a custom form.
    I tried setting the forms_path variable and I am still getting the error. Can anyone please suggest what can be done?
    DECLARE
    BEGIN
    IF :parameter.p_line_ship_to = 'T'
    THEN
    IF :SYSTEM.cursor_item = 'LINE.SHIP_TO'
    THEN
    :parameter.lov_num_param1 := :line.ship_to_customer_id;
    oe_lines.ship_to ('WHEN-VALIDATE-ITEM');
    :parameter.lov_num_param1 := :line.ship_to_customer_id;
    END IF;
    :parameter.p_line_ship_to := 'F';
    END IF;
    END;
    I am getting this error:
    Bad bind variable 'parameter.p_line_ship_to'

    The Parameter is not defined in the form.. But, this form is already been compiled and deployed.. I have to make some changes to the form and tried to compile it, when i am getting this error. Is it possible that the parameter would be defined in some other form or can this error be due to some other reasons?
    Thanks in Advance.

  • Bind variable in Master Detail form

    Is there any way to go to a specific master record (bind variable) and it's associated detail information in a master detail form using a link from another report?
    Louis

    I suspect that he may have the same question I do. Namely, if I have four tables (employees, projects, tasks, and project_assignments) how do I create a master detail form where I can specify the project and the employee via LOVs? The project_assignments table contains foreign keys for employee, project, and task, as well as additional fields relating to the task status.
    Currently, I have it set up so that the employee name can be selected and the project is hard coded to the current project.
    Is there an easy way to populate the detail records based on two LOVs in the master form?
    Thanks in advance,
    Fritz

  • Oracle ODBC Driver adds bind variable when browsing whole table in Access

    Hi, we are looking for some reasons why we may see this behavior in the Oracle ODBC driver (10gR2 and 11g) when using Microsoft Access (2003 or 2007)...
    1) Link a table from the Oracle database.
    2) Double-click the newly linked table to "browse" it.
    Oracle sends the following statement to the server:
    {color:#0000ff}select * from linked_table where primary_key = :b1{color}
    It then proceeds to read the entire table.
    If I tell Microsoft Access that there is no primary key, the query gets sent as:
    {color:#0000ff}select * from linked_table{color}
    And the query comes back as soon as the first 100 or so rows are fetched which is quite quickly.
    ADDITIONAL NOTES:
    1) If the table has a primary key or unique constraint, Microsoft Access automatically assigns that as the primary key.
    2) We can stop the behavior in #1 if we wrap a view around it which prevents Access from discovering that information and then it prompts for a primary key definition.
    3) If we use the Microsoft ODBC driver, the bind variable is not added no matter what the primary key defintiion is.
    We're stumped and are looking for solutions and/or workarounds without having to wrap all of our tables in views to hide the fact that there is a primary key.
    Thanks,
    Steve

    Thanks for the response, Greg.
    The specific question I am seeking an answer for (sorry it was not clear on my first message) is this:
    Why does the Oracle driver add the bind variable to the query only when the primary key is defined?
    The Microsoft ODBC driver does not add the bind variable with or without a primary key defined.
    You asked how I traced this statement and what I am doing is launching the query in Access and then using TOAD to view the V$SESSION and V$SQL_TEXT_WITH_NEWLINES views. All I do is change the driver. This is just for a simple browse table (double-click on the table) which should send
    select * from table
    However, whenever I use the Oracle ODBC driver (with a primary key defined) it sends
    select * from table where primary_key = :1
    If I remove the primary key on the table definition, the Oracle driver sends
    select * from table
    What is it about the primary key that could cause that behavior?
    I don't think it is the MDAC/Jet level because this is the conversion to the native SQL statement not the Jet version. I know the Oracle driver has to do that part because you have those workaround options like don't add the RULE hint, etc. That's not part of the Jet engine.
    Hope that helps. I'm just baffled over this one and wish I knew where to go next.

  • Passing value from MD form to bind variable in report

    I have an MD form, after I insert I want to redirect to a form and pass a value out of the detail section to the form to use as the value of it's bind variable. This works well on normal forms, but I cant seem to get it to work on the MD form. Below is an easy example and this doesnt work for me.
    MD form master dept/detail emp, code under the save button:
    doSave;
    declare
    l_empno integer;
    l_url varchar2(2000);
    begin
    l_empno := p_session.get_value_as_NUMBER(
    p_block_name => 'DETAIL_BLOCK',
    p_attribute_name => 'A_EMPNO',
    p_index => 1);
    l_url := 'SCOTT.EMP_RPT.show?'&#0124; &#0124;
    'p_arg_names=empno&p_arg_values='
    &#0124; &#0124;l_empno;
    portal30.wwa_app_module.set_target(l_url,'CALL');
    end;
    The form displays the empolyee information based on the value of empno from the MD form. The url looks like this http://hostname/pls/portal30/scott.emp_rpt.show?l_arg_names=empno&l_arg_values=
    so no rows get returned because there is no value, if i fill it in with a empno it works, so i know the report works, it just isnt the get_value isnt grabbing the empno from the MD form.
    null

    I figured it out, the save button on a MD form, the doSave; clears out the form fields so do a get_value_as will not work b/c there is nothing there, you need to get the value before the doSave; the below code will work.
    declare
    l_empno number;
    l_url varchar(2000);
    begin
    l_empno := p_session.get_value_as_NUMBER(
    p_block_name => 'DETAIL_BLOCK',
    p_attribute_name => 'A_EMPNO',
    p_index => 1);
    doSave;
    l_url := 'scott.EMP_RPT.show?'&#0124; &#0124;
    'p_arg_names=empno&p_arg_values='
    &#0124; &#0124; l_empno;
    portal30.wwa_app_module.set_target(l_url, 'CALL');
    end;

  • Bind Variable Brain Teaser - Accessing a filtered Parent from a Child

    Hi Guys and Gals,
    Using JDev 11.1.2.4.0.
    I have two tables, the parent(Scenarios) and the child (Orders).  They are setup as such:
    SELECT Scenarios.SCENARIO_ID,
                   Scenarios.NAME,
                   Scenarios.COMPANY_ID
    FROM SCENARIOS Scenarios
    WHERE Scenarios.SCENARIO_ID = :pScenarioId
    ORDER BY Scenarios.SCENARIO_ID
    SELECT Orders.ORDER_ID,
                   Orders.COMPANY_ID
    FROM ORDERS Orders
    Scenarios (The Parent) has a required bind variable which filters on the primary key, SCENARIO_ID.  The primary key for the Orders table is Order_ID.  The two tables are joined by an association & view link on COMPANY_ID, setup as a 1-to-* relationship.  However, it is in fact a *-to-* relationship since an Order row can appear in several scenarios.
    In the Orders View Object, I also have a transient attribute, ScenarioInfo, which attempts to access Scenarios's current row to retrieve the name.  The getter is as such:
    public BigDecimal getScenarioInfo() {
         Row row = this.getScenariosView();
         DBSequence db = ((ScenariosViewRowImpl)row).getScenarioId();
         return new BigDecimal(db.getValue());
    The sequence of events:
    1) Open the application module and click on the view link between Scenarios and Orders.  A window pops open asking for the bind variable (pScenarioId) value.  I enter a valid value (2) and hit enter.  This should (in theory) return only one row for the Scenarios view object, the one with the ScenarioId of 2.  Clicking only on the Scenarios view object in the application module verifies this.  The Orders view object then renders, but an error message is displayed attempting getScenarioInfo()
    (oracle.jbo.AttrValException) JBO-27019: The get method for attribute "ScenarioInfo" in Orders cannot be resolved.
    I'm not sure I understand why.  ScenarioId with a value of 2 is a valid number.  With the bind variable / filter in place there should be one row as the parent, turning the relationship into a 1-to-*.  Without the filter in place, I may access the parent without error, but the record that is pulled back is the first possible row due to the 1-to-* relationship.
    Instead of having a bind variable, I have also tried implementing a View Criteria in the app module for the Scenarios view object.  However, the criteria doesn't seem to "stick" when the this.getScenariosView() is called from the Orders view.  It also pulls back the first row.
    Does anyone have any ideas?  The only thing I can think of would be to change the relationship to a *-to-* through a translation table, but that's a complication I do not wish to add if possible.
    Thanks in advance,
    Will

    Here is an alternate approach.  This one removes the bind variable from the Scenarios query and instead implements the following code in the app module impl.
        public void refreshScenario() {
            ViewObjectImpl allScenarios = this.getAllScenarios();
            VariableValueManager manager = allScenarios.getVariableManager();
            manager.setVariableValue("pScenarioId", new BigDecimal(2));
            ViewCriteriaManager criteriaManager = allScenarios.getViewCriteriaManager();
            ViewCriteria vc = criteriaManager.getViewCriteria("ScenariosViewCriteria");
            criteriaManager.applyViewCriteria(vc);
            allScenarios.executeQuery();
    The getter is the same as my second getter example:
        public String getScenarioInfo() {
            // remove the default getter for the transient string variable ScenarioInfo
            // return (String) getAttributeInternal(SCENARIOINFO);
            // get the view link accessor for the parent row, Scenarios
            ScenariosViewRowImpl row = (ScenariosViewRowImpl)this.getScenariosView();
            // This should return 1 row, which would be the row remaining after filtering by the bind variable with a value of 2
            // Get that rows Name attribute
            String s = row.getName();
            return s;
    I run the app module tester and then run the refreshScenarios() method.  I then double-click the view link which pops up a dialog box.  The bind variable pScenarioId is pre-filled with 2.  I click enter a receive the following unexpected output as seen here: http://www.williverstravels.com/JDev/Forums/Threads/11077337/ViewCriteriaAttempt.jpg
    As you can see, the ScenarioInfo column returns "#1" when it should return the parent's Name, which would be "#2".  I am a little confused as to why this is functioning this way.

  • Using Bind Variables in Parameter Form's Query

    I want to use bind variables in the query of Parameter form. But
    it does not allows. What is the other way out. The structure of
    my Parameter form is as under:
    State:
    Customer:
    Now I want that I want to list only those customer in the
    Customer LOV which belongs to the selected state.
    Thanks.
    Muhammad Nadeem

    Can we just link to an oracle form using a url still as we can with reports? I've built a report that requires the user to select from a dynamic list as well, and I know how to do this through forms, but can I simply call the form from a webpage?

  • Is there a problem using popup LOVs in a portal form with a bind variable?

    I have a portal form with 2 LOVs. The second LOV is a dependent LOV whose bind variable can be NULL. I have read Note 263923.1, "How To Create Dependent Lovs In Forms", and my form works as long as I use combo boxes to display the LOVs. I need to use popups so the user can search the LOVs as they are quite lengthy. Plus I want to be able to pick a value from my second LOV without selecting a value from the first LOV -- hence, my bind variable can be null and that is where my problem lies. As long as I select a value from the first LOV, the second LOV popup will work. If I click on the icon to display the second LOV without pre-selected a value from the first LOV, I get the following error:
    POPUP LOV ERROR:
    LOV: "9A17692880B6B8509F514F5B9CA9EC808DD403218B3CF19A33C04CD1FAB0ADE17ADC33E6B67998A933357CE5264D204E"
    Parse Message: Parse as pre-set global: "TORE".
    Find Message: LOV is of type DYNAMIC (LOV based on SQL query).
    Query: "SELECT ...."
    wwv_bind.prepare_bind: ORA-01403: no data found
    My form is based on a table with a custom layout. The sql for the second LOV is similar to: SELECT ENAME, EMPNO FROM SCOTT.EMP WHERE (DEPTNO = :DEPT AND :DEPT IS NOT NULL) OR :DEPT IS NULL.
    Thanks in advance for any help,
    Carol

    Don't use EPS any more! It does not support transparency nor color management.
    If you save vector files from Illustrator, use AI with PDF compatiblity.
    If you save image files from Photoshop, use PSD.
    If you save image files combined with vector forms and/or text from Photoshop, use PDP which is a Photoshop PDF.
    For vectors from Illustrator use CMYK files.
    For images use RGB, conversion to CMYK should never done before PDF export, better, if the printer allows it, is to export a PDF with live transparency as it is PDF/X-4
    If the printer requires a PDF with CMYK only export a PDF/X-1a.

Maybe you are looking for

  • How to send to multiple people using same port?

    I am trying to have one person send TWO audio sources to 10 others using same port- lets say 12345. I get "Can't open local data port:" error. The first audio is fine since I just use .addTarget(). Is there a way i can do the same for the 2nd audio s

  • ISE Alarm : Critical : Profiler SNMP Request Failure : Server

    Ok, so this alarm is coming in repeatedly and is now on my projects list.  I get email alerts from the server that list thr NAD IP as the endpoint device and the Endpoint IP address is correct.  I've checked the settings and the endpoint is not liste

  • List of values to PL/SQL procedure

    I want to execute a query of the form UPDATE myTable SET myField = someValue WHERE myTablePK IN (1, 3, 5, 7, 9) Through HTML, I have a form field that is a comma-delimited list of values. I want to be able to pass this to a stored proc. What I'm not

  • Facetime & Mail not working(in India).

    When i start Facetime & enter my apple id & password after sometime it says"Could not sign in.Please check your network connection and try again".what is the problem.In case of Mail,I followed the instruction given online by Apple.End result is i get

  • Clear Page cache

    Hello, I have a small question In my application, i have a Quick Search page, where the user can search throug all the data. On this page I have a 'Clear Cache For Current Application' process, and I call it on Once per session, or when reset pressed