How to go from LOV where clause Page CO params

Dear members,

I have an OFA Page for which I have defined a CO.

I also have a LOV for which I have two parameters in where clause.

Now my requirement is to pass the two values in the where clause of LOV to the co of the corresponding page parameters.

Anyone can guide me please in implementing this requirement.

Best regards
Arun Reddy

Hi Arun

as gyan, suggested trying attching a new controller of lov or extend its existing controller.

In the CO page
store the parameter which must be transmitted to lov in pageContext.putSessionValue (paramName, paramValue)

In the Lov CO page, processrequest
retrieve the stored values using pageContext.getSessionValue (paramName)

Concerning
Ravi

Tags: Oracle Applications

Similar Questions

  • How to create a LOV where he is forced by another field

    I'm trying to figure out how to get a LOV to be limited by the value of a column

    A hypothetical example (the real app is quite different):

    I have 2 tables
    clientInfo, with fields fname lname, age, city, postal code
    In another table called cityZip I zip & city

    So I create a report on a table shape
    Select fname lname clientInfo, age, city, postal code

    This generates a form of beautiful table, an entry for each client... but I want the user to go to the bottom of the selectList representing the city column and select the city for each record in the table.

    So I created a Select list (query based LOV),
    I tried
    SELECT DISTINCT (code |) ' ' || d of the city), zip_KEY r
    from cityZip where cityZip.zip =: zip code

    The problem is that the use of the postcode in the LOV query does not contain the zip code of the current record value, so it does not work! Does anyone have an idea how this could be done?

    Hello

    The problem is that the data in your report are not contained in APEX elements in your page. Try to look at the combination of the form & report and put your selection list in the form. When you click 'Edit' on a line, that data fills out the form. You will have then the information limit the query for your LOV.

    Good luck
    Don.

    You can reward this answer by marking as being useful or correct :)

  • How to prevent from loading alongside the page I actually laoded apges announcement?

    How to stop additional (or generally unwanted) pages loading alongside the page I actually asked.

    These additional pages can be advertisements or some sell a program that is supposed to improve the performance of my system.

    I'm using Firefox under Microsoft 8.1 34.0.5.

    Never, the problem appeared when using XP that I converted from a month ago!

    Adblock more {web link}
    Blocks annoying video ads on YouTube, Facebook ads, banners
    and much more. Adblock Plus blocks all the annoying ads, and
    supports Web sites by blocking is not discrete (configurable) default ads.

  • SQL how to choose random values where clause?

    Hello guys,.

    for example, I want to choose 25 numbers in the answer column which is end 6?



    Select the number of numbers where regexp_like (number, $ 6 '); Like that, but I don't want every number that ends with 6 I want to only 25 of them?


    Thank you very much.

    953116 wrote:
    How can I choose at random?

    SELECT *
      FROM (  SELECT number
                FROM numbers
               WHERE REGEXP_LIKE (number, '6$')
            ORDER BY DBMS_RANDOM.VALUE)
     WHERE ROWNUM < 26
    
  • How to use DATE in where clause

    I need to select the list of records in a table where the available date is greater than or equal to the current date. This is the structure of the table and
    Select the query that is used to get the list of records
    CREATE TABLE TEMP (ITEM_ID NUMBER(20),ITEM_NAME VARCHAR2(100),CREATION_DATE DATE,AVAILABLE_DATE DATE);
    
    INSERT INTO TEMP (ITEM_ID,ITEM_NAME,CREATION_DATE,AVAILABLE_DATE) VALUES(1,'ITEM1',SYSDATE,SYSDATE);
    INSERT INTO TEMP (ITEM_ID,ITEM_NAME,CREATION_DATE,AVAILABLE_DATE) VALUES(2,'ITEM2',SYSDATE,SYSDATE+10);
    INSERT INTO TEMP (ITEM_ID,ITEM_NAME,CREATION_DATE,AVAILABLE_DATE) VALUES(3,'ITEM3',SYSDATE,SYSDATE-10);
    INSERT INTO TEMP (ITEM_ID,ITEM_NAME,CREATION_DATE,AVAILABLE_DATE) VALUES(4,'ITEM4',SYSDATE,SYSDATE);
    INSERT INTO TEMP (ITEM_ID,ITEM_NAME,CREATION_DATE,AVAILABLE_DATE) VALUES(5,'ITEM5',SYSDATE,SYSDATE+5);
    
    SELECT ITEM_NAME, available_date FROM TEMP WHERE available_date > SYSDATE OR available_date LIKE SYSDATE;
    I get the documents expected but I'm not able to find a condition where I can use * > = * a query as the below a date data type, is
    do not return only documents not expected
    SELECT ITEM_NAME, available_date FROM TEMP WHERE available_date >= SYSDATE ;
    Published by: Barro on March 19, 2012 21:13

    Hello

    Barros says:
    I need to select the list of records in a table where the available date is greater than or equal to the current date. This is the structure of the table and
    Select the query that is used to get the list of records

    CREATE TABLE TEMP (ITEM_ID NUMBER(20),ITEM_NAME VARCHAR2(100),CREATION_DATE DATE,AVAILABLE_DATE DATE);
    
    INSERT INTO TEMP (ITEM_ID,ITEM_NAME,CREATION_DATE,AVAILABLE_DATE) VALUES(1,'ITEM1',SYSDATE,SYSDATE);
    INSERT INTO TEMP (ITEM_ID,ITEM_NAME,CREATION_DATE,AVAILABLE_DATE) VALUES(2,'ITEM2',SYSDATE,SYSDATE+10);
    INSERT INTO TEMP (ITEM_ID,ITEM_NAME,CREATION_DATE,AVAILABLE_DATE) VALUES(3,'ITEM3',SYSDATE,SYSDATE-10);
    INSERT INTO TEMP (ITEM_ID,ITEM_NAME,CREATION_DATE,AVAILABLE_DATE) VALUES(4,'ITEM4',SYSDATE,SYSDATE);
    INSERT INTO TEMP (ITEM_ID,ITEM_NAME,CREATION_DATE,AVAILABLE_DATE) VALUES(5,'ITEM5',SYSDATE,SYSDATE+5);
    
    SELECT ITEM_NAME, available_date FROM TEMP WHERE available_date > SYSDATE OR available_date LIKE SYSDATE;
    

    Both operands for AS are supposed to be strings. Do not try to use a DATE, such as SYSDATE, with AS.

    I get the documents expected but I'm not able to find a condition where I can use * > = * a query as the below a date data type, is
    do not return only documents not expected

    SELECT ITEM_NAME, available_date FROM TEMP WHERE available_date >= SYSDATE ;
    

    It returns the results I expect.
    If you'd say what results you expected, could someone help you wite a query to get.

    Assuming that 1 second elapses between the time "ITEM4" is inserted and that 2nd query execution, then, running, available_date will be 1 second less than SYSDATE, so it shouldn't be included.
    If you want to find lines that are on the same calendar day as SYSDATE or later, then use

    WHERE    available_date >= TRUNC (SYSDATE)
    
  • How stop firefox from opening a startup page each time that I open it

    Hello
    at the beginning when I installed firefox, when I open the home page was something called firefox support.
    as I prefer google as my home page, I simply changed to google, but now whenever I open firefox, even if google opens on my active tab, a second tab opens each time with the support of firefox even topic.

    I find it very irritating and can not see how to solve this problem in the tab options.
    Please notify

    This site shows "Firefox support?

    Make sure only google.com is viewing on your Options.

    Reach

    > Options > general > Home Page

    Make sure it is said when Firefox starts (see my homepage) is selected

    Home page, make sure only https://www.google.com entered and not another page.

  • How to pass a value LOV to where clause of another LOV

    Hello

    I have the two LOV project and activity. When I select a value of project LOV this value project to switch to the 2nd activity LOV where clause. How can I achieve this.

    I tried to use the code in the process CO request by getting the value of project with the command below.

    int v_project = Integer.parseInt ((String) passiveCriteria.get ('Project')); grab the critirea project

    and set this value in the setwhereclauseparams of the VO LOV. But the above command is throwing an exception with the exception of null pointer.

    This approach is correct, or should I use any other method.

    Thank you
    HC

    Below you will find the article interesting

    http://oracleanil.blogspot.com/2010/12/dependent-lov-in-OAF.html

    Thank you
    AJ

  • How to define a WHERE clause of the subquery in a bean managed?

    Hi people,

    is it possible to define the place where clause of a subquery in a bean managed?
    For example, it is more SQL charly:

    SELECT * FROM
    (SELECT Person.Name
    OF the person)

    To change or add a WHERE clause, I use following code for the 'viewObject: view

    String whereClause = "ROWNUM < =: numberOfRows;
    viewObject.setWhereClause (whereClause);

    viewObject.defineNamedWhereClauseParam ("numberOfRows", null, null);
    viewObject.setNamedWhereClauseParam ("numberOfRows", new Number (100));

    AttributeList myattr = this.getNamedWhereClauseParams ();
    viewObject.setNamedWhereClauseParams (myattr);

    For example, this code works well for the first SELECT statement limit the output to the first 100 results. But how do I add a WHERE clause of the subquery in a managed bean? For example, when I want to limit the names of people that begin with the letter "A"?
    The query should look like this:

    SELECT * FROM
    (SELECT Person.Name
    OF the person
    WHERE Person.Name LIKE 'A %')

    Anyone know more?

    Thank you!

    Put a variable binding in your query, something like:

    where (: bv is null) or (xxx love: bv)

    John

  • Creation of a where clause clause in the LOV query box

    Hi guys is any able to help me with this one

    I have a page in my application where there down LOV down now values this menu drop-down comes from a table that looks like this

    users_for _form_TBL

    E_MAIL Name of the vendor
    [email protected]Oracle
    [email protected]SAP
    [email protected]IBM
    [email protected]Oracle
    [email protected]Intergraph

    So my syntax for the LOV I mentioned looks like this

    Select PROVIDER as display_value, SELLER as return_value

    of form_user_tab where email =: APP_USER

    order by 1;


    so if [email protected] connects to the application and to make a selection on the LOV it would only show suppliers compared to his E_MAIL like oracle, sap, IBM , and then he clicks the submit button on the page then the seller that he chose is inserted into another table. What I did on the table of insertion has been to create a trigger that after inserting a seller the trigger inserts a 1 in a column called assessed.

    What I did after that is add a select statement in the where clause of the LOV so that she would check in the table insert if this seller had been chosen before and not show them again to be selected my syntax, the second time around in the SQL query box has been

    Select PROVIDER as display_value, SELLER as return_value

    to users_for _form_TBL where email =: APP_USER

    and (select "seller", "ASSESSD' of _tbl inserted is null);

    order by 1;

    But im getting an error of ideas guys. Thank you

    rhisingh wrote:

    hay man thanks for your response really using the syntax is

    Select PROVIDER as display_value, SELLER as return_value

    to users_for _form_TBL where email =: APP_USER

    and (select provider, ESTIMATED from _tbl of nserted where there is no "seller", "RATED")

    order by 1;

    im still get and error is the where the clause allowed in the second select statement

    He still has basic syntax errors. You posted 4 different "table names" whose only in the first query is valid so far. That can not see your database, I don't know what really is the name of these tables, and to what extent these is wrong helps your problem.

    I can tell that you are looking for:

    select
        u.vendor display_value
      , u.vendor return_value
    from
        users_for_form_tbl u
    where
        u.e_mail = :app_user
    and not exists (select null from inserted_tbl_imp i where u.vendor = i.vendor)
    order by
        u.vendor
    

    but the table names could be something else...

  • [ADF, JDev12.1.3] How to set a variable to bind a VO (where clause) in a managed bean?

    Hallo,

    I have a request based on VO.

    The query contains a where clause clause and a bindi variable.

    In a managed bean I would like to access the iterator of VO setting the value of the bind variable and read the result.

    I found this code it is good start, but I do not know how to set the variable binding.

    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    DCIteratorBinding iter = (DCIteratorBinding ) bindings.get("MyVO1Iterator");
    iter.execute();
    
    
    

    You kindly help me?

    Also, I would like to know if it is generally advisable to use VO directly in controlled beans or whether it would be best to create in the AppModuleImpl methods that do this and return the result.

    In my case for example of the VO will return max 1 plug so I'm in doubt, if the creation of a method in the AM that returns a custom class, which attributes contain values of the line of VO.

    Sorry if these questions may seem artificial, but I am a beginner, I have many doubts and so I would be happy to receive some tips regarding best practices.

    Thank you

    Federico

    You can use:

    iter.getViewObject().setNamedWhereClauseParam("yourBindVar", value);
    

    Note that this approach is used if you have bind variable in the where clause.

    To set variables bind to ViewCriteria, you must use VarableValueManager.

    This post may be useful for you: binary: how to set the Bind variable values at run time?

    Also, I would like to know if it is generally advisable to use VO directly in controlled beans or whether it would be best to create in the AppModuleImpl methods that do this and return the result.

    You must set "use VO directly.

    For example, from the point of architecture, is probably best to use the method in the model project which will set the bind variable and execute the query.

    Or you can use the ExecuteWithParams operation in your the view layer.

    In my case for example of the VO will return max 1 plug so I'm in doubt, if the creation of a method in the AM that returns a custom class, which attributes contain values of the line of VO.

    Not to complicate your life

    All VO lines are represented as ViewRowImpl class if you already have "custom class".

    Finally, you can generate your own ViewRowImpl class if it is necessary for this.

    Dario

  • [JDev ADF] How is made the ' where clause ' default display criteria "all searchable attributes?

    Hallo,


    on a view object, I create my view of the criteria customized; I'm going to use it to create a "query with the table panel.

    I wish that his beahviour, when I use it to create a "query with the table panel", corresponds to that of "attributes searchable all.

    Unfortunately I'm having some trouble in his creation and I would like to see how is made the "object view where Clause" CV "all searchable attributes.

    My VO motion is:

    Select the username, name, RegisteringDate

    I would like to create my VC in a way that is the result "query with table Panel:

    UserId | ___ |

    Name | ___ |

    RegisteringDate of | ___ | to |_________|

    For each search field, I set a variable binding (PName, PUserId, PRegisteringDateTo, PRegisteringDateFrom).

    Each field must be used in the "query with table Panel" only if it is filled with a value.

    You kindly help me?

    Thank you very much

    F.

    The criteria to view all searchable attributes is implied all the attributes of a vo. Each attribute is used unless you specify a value for it. The problem with this IS, is that you can not change it.

    However, you can build your own RESUME that works in the same way, but allows you to change certain attributes. To do this, you create a new business card and add each attribute, select the operation you want to test the attribute against (equals, start by,...). You do not bind variables for attributes specify. The framework will add them for you automatically.

    The only thing that can not this vc is check varies as you want to do when you check "RegisteringDate." To do this you must use bind variables.

    Once you have create this EGG and it makes you drag onto the page you can use it as the "all attributes searchable.

    Timo

  • Passing the value of the where clause with the page

    Dear friends,

    I have a requirement like when I select a selection list value I should pass this value to sql query where clause without submitting the page

    ex I have a select like: P1_Dept guess I selects the value 10 in this

    then I have a query select * from emp where deptno =: P1_Dept.

    DB. ORACLE 11G

    APEX 4.1.1.00.23

    is this possible? can someone help me please in this topic

    Thanks and greetings

    Vballeda

    Suppose we have the selection list with the name P1_DEPT and query for report

    select * from emp where deptno = :P1_DEPT
    

    We create dynamic Action on the evolution of the P1_DEPT point. We will need two real actions:

    1-> set value action

    Set the Type - > body of the PL/SQL function

    The function of body - > return 1;

    Page item to submit-> P1_DEPT

    Change to delete-> Yes event

    Selecttion Type-> trigger element

    2. action-> Refresh

    Selecttion Type-> region

    Region-> your region of report

  • How to dynamically generate where clause in Linq

    Hi all


    Oracle DB: 11 gR 2
    Oracle Client: 11.2.0.3.0 (ODP.NET)
    Oracle Developer Tools for Visual Studio
    VS 2010 (C#)

    In a Windows Form, it must query the data based on the values in list dropdown listboxes, which the user selects.
    Let's say two combox, one Department and one for salary
    Department:
    -1 all the
    10 Department 1
    20 Department 2
    30 Department 3

    Salary:
    -1 all the
    1 < 20000
    2 20000 to 50000
    3 50000 to 100000
    4 > 100000


    Here is the c# code to query data:
    using (var myEDMctx = new HREntities())
    {
    var LINQrslt = from emp in myEDMctx.EMPLOYEES
    Select emp;

    }


    The default values for the two combox should be everything.
    How to write dynamic where clause for this LINQ?

    Thanks in advance!

    That's what I do.

    var query = from c in customers
    Select c;

    If (where1 > - 1).
    Query = query. Where(c.Where1 > where1);

    If (where2 > - 1).
    Query = query. Where(c.where2 == where2);

    to return the query;

    Published by: Invincible on July 4, 2012 09:25

    Published by: Invincible on July 4, 2012 09:27

  • How to use the instruction box in where clause

    Hi all


    I need to use cases where clause guide me please how I can do it.


    AND WHEN BOX: KAPCO = "KAPCO" THEN cla. CLASS_NAME LIKE '% KAPCO % '.
    WHEN: KAPCO = "NON_KAPCO" THEN SUPERIOR (cla. CLASS_NAME) NOT LIKE '% KAPCO % '.
    WHEN: KAPCO = 'ALL' GOLD: KAPCO IS NULL SO SUPERIOR (cla. CLASS_NAME) LIKE '% '.
    END



    Concerning

    Published by: user10941925 on March 4, 2012 22:31

    Hello

    CASE expressions return a single value, for example a VARCHAR2. They do refer to code fragments.

    You usually don't need (or want) an expression BOX in a WHERE clause, or any other condition. I think that you were trying to do the equivalent of:

    AND     (     (:KAPCO = 'KAPCO'          AND cla.CLASS_NAME       LIKE '%KAPCO%')     -- Don't you want UPPER on this line?
         OR     (:KAPCO = 'NON_KAPCO'           AND UPPER(cla.CLASS_NAME) NOT LIKE '%KAPCO%')
         OR     (NVL (:KAPCO, 'ALL') = 'ALL'       AND cla.CLASS_NAME IS NOT NULL)
         )
    

    If you would care to post some sample data (CREATE TABLE and INSERT statements) and the results desired from this data, I was able to test this.

  • How to create a procedure for REF CURSOR output with any WHERE clause?

    I have a requirement like this: I have a huge question that need to reuse in my code over 10 times. This SQL has about 50 lines. Here for these 10 odd times sometimes changes in WHERE clause (columns are the same). So I can't create a view as SQL is not static.

    I thought to write a procedure with a para of WHERE_CLAUSE entry. I pulled out a refcursor sys by adding where clause. But I can't do it because you cannot add a clause like this where clause.

    i.e.
    PROCEDURE dynamyic_query (p_where_clause IN VARCHAR2, p_out_query OUT SYS_REFCURSOR ) IS
    BEGIN
    
      OPEN p_out_query FOR SELECT ......... FROM table WHERE || ' ' || p_where_clause;
    
    END;
    The foregoing gives an error.

    How to handle such a situation? Any help would be greatly appreciated.

    Hello

    Channa wrote:
    ... However, when I change the procedure like this:

    PROCEDURE FORMS_TEXT_DYN_SQL_TEST(p_where_cluase IN VARCHAR2, p_out_cursor OUT SYS_REFCURSOR) IS
    v_stmt VARCHAR2(1000);
    BEGIN
    v_stmt := 'SELECT tname FROM tab_test WHERE tname LIKE ''%ABS_V4%'' AND :y';
    
    OPEN p_out_cursor FOR v_stmt using p_where_cluase;
    
    END;
    

    And run this block of code:

    declare
    v_tname varchar2(200);
    out_cursor sys_refcursor;
    begin
    forms_text_dyn_sql_test(' 1 = 1 ', out_cursor );
    LOOP
    fetch out_cursor INTO v_tname;
    exit when out_cursor%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(v_tname);
    END LOOP;
    end;
    /
    

    I get the error:

    [1]: (Error): ORA-00920: invalid relational operator ORA-06512: at "ABS.FORMS_TEXT_DYN_SQL_TEST", line 6 ORA-06512: at line 5
    

    Looks like you can only set column_name =: z, column_name =: values of type y. You can not it seems to replace it with no WHERE CLAUSE?

    A bind variable, such as: it, represents a single value.
    If: is the VARCHAR2 '1 = 1', then

    SELECT tname FROM tab_test WHERE tname LIKE '%ABS_V4%' AND :y
    

    takes the value

    SELECT tname FROM tab_test WHERE tname LIKE '%ABS_V4%' AND '1 = 1'
    

    I think you want something like this:

    CREATE OR REPLACE PROCEDURE FORMS_TEXT_DYN_SQL_TEST
    (     p_where_clause      IN      VARCHAR2
    ,      p_out_cursor      OUT      SYS_REFCURSOR
    ) IS
      v_stmt VARCHAR2(1000);
    BEGIN
      v_stmt := 'SELECT ename FROM scott.emp WHERE ename LIKE ''%A%'' AND '
              || p_where_clause;
    
      OPEN p_out_cursor FOR v_stmt;
    
    END;
    /
    show errors
    
    SET  SERVEROUTPUT  ON
    
    declare
      v_tname varchar2(200);
      out_cursor sys_refcursor;
    begin
      forms_text_dyn_sql_test(' 1 = 1 ', out_cursor );
      LOOP
        fetch out_cursor INTO v_tname;
        exit when out_cursor%NOTFOUND;
        DBMS_OUTPUT.PUT_LINE(v_tname);
      END LOOP;
    end;
    / 
    

    Output:

    ALLEN
    WARD
    MARTIN
    BLAKE
    CLARK
    ADAMS
    JAMES
    

Maybe you are looking for

  • Playlists and albums only shuffle?

    I am in the first week of my trial period of Apple's music, and I love it.  The only problem I had so far, is that when I try to play one of the playlists - or an album not in my library - she only mix the songs.   I'm not able to play the songs in t

  • Not enough memory for the DB free music please 80 MB

    Hello try to start push-button starting Sansa e280 the only thing I get is not "enough memory to free DB music up to 80 MB. When I try to connect to the Windows 7 computer, download message "unrecognized", also get a if you asking panel wants to refo

  • From my pc and or enter a program, this is what appears ~ Installation of Tray / App.msi

    I have a hard time with this question, I need help to understand what is the error and what it can be attached? The error appears when starting upwards and then when stepping into any program. the fratures you are trying to use is on a cd-rom or remo

  • Problems with the update of drivers for graphics cards

    Hello HP I love your work and all, like your design, but the support for this laptop when it comes to drivers? Last updated on the site of HP support for drivers and all is April of 2011! Version 8 - something... Latest AMD/ATI drivers is 13.4 or mor

  • HP deskjet 1000 j110a

    To save on the cost of printing, I intend to print some documents colored in black only. Is there a way to do it without going through the basket color that is installed? I have Win xp sp3 os.