Dynamic LOV displays empty list

Hi,
I use the following sql in my dyncamic LOV, but it always gives an empty list. However, the sql does return values when run in sqlplus. Any ideas?
select p.description, p.id
from person p,
customer c
where p.customer_id = c.id
and c.description = :p2_customer_description
Thanks

I think one solution wold be to create two different named querys, one containing query 1 and the second query 2. Than u must create an Application Item(like a session variable) in wich u will store you condition. If you want to use the app_user variable u allready have it so you don't need to create it any more. On your page where u want to display the different select list u create two items, one with the query 1 as source and a second item(select list) having the source query 2. Then you must add a condition display on both of them like. Item one is displayed when Value of Item in expression 1 equals expression 2. And you pust :APP_USER in expression 1 and BACK_OFFICE in expression 2. And for the other item, that contains query 2, you put the opposite condition Value of item in expression 1 is not equal to expression 2, and expression 1 is :APP_USER and in expression 2 is BACK_OFFICE.
Hope this helps.
Florin

Similar Messages

  • DYNAMIC LOV FOR SELECT LIST

    hi to all,
    i've a question regarding lov query based select list:
    For a certain user i need that the lov display a list
    if app_user = BACK_OFFICE I NEED THAT ther query on wich is populated the
    select list is qry 1.
    if app_user is another (consultant) i need query 2 for populating the select list
    1) select name|| ' ' || fname D, id K from partner
    2) select name|| ' ' || fname D, id K from partner WHERE UNAME=(:APP_USER)
    Any solutions would be greatly appreciated.
    Another solution would be to have 2 different apps (one for back-office, one for external consultant), but there i should always duplicate all changes to the second one, loosing a lot of time.
    Now thinking as well to use hidden fields.
    If not clear enough please ask me.
    Thanx a lot.
    Message was edited by:
    Marcello Nocito

    I think one solution wold be to create two different named querys, one containing query 1 and the second query 2. Than u must create an Application Item(like a session variable) in wich u will store you condition. If you want to use the app_user variable u allready have it so you don't need to create it any more. On your page where u want to display the different select list u create two items, one with the query 1 as source and a second item(select list) having the source query 2. Then you must add a condition display on both of them like. Item one is displayed when Value of Item in expression 1 equals expression 2. And you pust :APP_USER in expression 1 and BACK_OFFICE in expression 2. And for the other item, that contains query 2, you put the opposite condition Value of item in expression 1 is not equal to expression 2, and expression 1 is :APP_USER and in expression 2 is BACK_OFFICE.
    Hope this helps.
    Florin

  • LOV display & return

    Hi Everyone:
    I created a dynamic LOV multi-select list.
    Here is the query:
    select NAME d, ID r
    from LIST
    order by 1When I summit this page I go to a report to check for the all the IDs selected in the previous page. When I go back to the page to make another selection the multi-select list doesn't have the names selected highlighted anymore. I know this is because I have the ID returned.
    Is there a way that I can use the above query and when I go back to that page the names are still selected? I don't want to be selecting the name all over again.
    Thanks,
    Bino

    Bino:
    Does the branch specify that any items of the LOV page have their cache values reset ?
    What is the session state value of the LOV item when on the report page ?
    Varad

  • Problem with a Display Only field based on a dynamic LOV

    I have a field/item which is based on a dynamic LOV:
    select DESCRIPTION display_value, STATUSID return_value
    from CTCXFRREQS_STATUS_LOV
    order by 1
    ...and I need it to be display-only on the page. However, if I make it a display-only field, the return value is displayed, not the display value. If I change it to be a select list field, the display value is shown, as I expect and need.
    The field was based on a static LOV before, and it worked perfectly then.
    Has anyone seen this before, and have any suggestions on how to work around it?

    Hi,
    In edit item
    Display As: Display Only
    Save Session State: Yes
    Based On: Display Value of List of Values
    Named LOV: YOUR_LOV
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • Dynamic lov, Select List in Report

    Hi all,
    I have searched the APEX forum for dynamic lov but somehow no topic could really solve my problem.
    I have a report and 2 columns in this report are displayed as a select list. I want one of the select list show some values depending on the other select list in this report. If the value of the first select list is equal to some data the second select list should show a lov and otherwise nothing.
    All examples i have found so far seem to explain a solution for a select list item on the page and not for a select list in a report like in my case.
    Are there any advices or some links you can give?
    Thanks in advance
    Markus

    See http://htmldb.oracle.com/pls/otn/f?p=18326:54:1415328128204513::::P54_ID:1282
    and http://forums.oracle.com/forums/thread.jspa?messageID=1222153&#1222153

  • Popup list manager and dynamic LOV

    I'm stumped, stuck and thought I was doing something simple. Here's what I have:
    1) Checkbox dynamically built (P3_CHECKBOX)
    2) A hidden field to store the checkbox values (P3_CHECKED)
    3) A popup list manager based on the hidden field.
    I am using JavaScript to populate the P3_CHECKED whenever P3_CHECKBOX is changed. However, my dynamic LOV based on the hidden field always returns no rows. The SQL for the LOV is:
    select application_role, role
    from roles_view
    where '%'||application||'%' LIKE to_char(:P3_CHECKED) order by 1
    Am I missing something simple? I know the hidden field is getting populated because if I change to field to text, I see the data change. There is also data in the table because executing the query using the data in P3_CHECKED returns the expected rows.
    Any help would be appreciated.
    Mike

    Mike,
    The lov query accesses the value of P3_CHECKED from session state. That isn't stored in session state until the page is submitted.
    Scott

  • How to display Call list Large view as the initial view dynamically.

    My requiremet is that 
    1) User chooses a call list -> then clicks display calls -> then clicks Calls Full view
    Now ClmCallListDetailsLarge View is displayed
    2) Now the user chooses a call and then prceeds to Account confirmation, Interaction Record and then ends the call.
    3) Now when the Call list is choosen from navigation bar Available 'ClmAvailbleCallLists' View is displayed, but the requirement is to display 'ClmCallListDetailsLarge' view.
    4) There is some standard code related to this in 'DO_REPLACE_INITIAL_VIEW' method of the window controller. but this method is not getting triggered at all.
    Please let me know how this can be achieved

    Thanks for idea.
    Assume I stored my data in a List of HashMap.
    Could you provide an example of JSTL for displaying this list?

  • DYNAMIC LOV (list of value)

    Hi all,
    I have created a dynamic LOV using the sql statement:
    Select product_name A, product_code B from product.
    Can I make this LOV more dynamic by putting where conditions?
    For example:
    Select product_name A, product_code B from product where status = &STATUS
    &STATUS is a value from a given field as entered in a current form page.
    Is this possible? or are there other ways to to this?
    Thanks

    wow thats great sunil : )
    Can I also reference the value of P7_ITEM_NAME in anotheR item name like P7_COMMISSION?
    For example: I have two (2) item names: P7_SALARY and P7_COMMISSION
    P7_COMMISSION is computed as :P7_SALARY * 0.10
    So I do not have to enter value in the item name P7_COMMISSION as it is derived from P7_SALARY.
    Is this possible? if not why does LOV able to access it ; )
    Thanks a lot

  • Dependent Dynamic LOV lists in a table format

    I have a screen where the user can enter multiple rows into a tabular layout.
    Three columns have LOV's where the selection in the first LOV should restrict the list in the Second LOV which will restrict the list in the third LOV. I think I could manage it if it were a single row of data being captured, but how does one reference the previous fields selection in the next field when using multiple table rows.
    I have a db table which I think can drive the process, but I'm not familiar with the method in which to handle it.
    Table: id, LOV-1 -value, LOV-2 value, LOV-3 value
    So when user selects from LOV-1, only those LOV-2 values associated with LOV-1 that the user selected should be listed. And then LOV-3 values associated with LOV-2 selection should only be listed.
    Can someone offer some insight or point me to an example?
    Thanks
    Tony

    Has anyone been able to implement a series of dependent LOV's in a tabular report which is updateable?
    I have a collection which I update 'onchange' if an LOV column is updated to retain the new value. I still have the issue of referencing the 'correct rows' previous LOV value to limit the next LOV's selection list.
    Any suggestions on how to reference the previous column's value for the current row?
    Desired process flow:
    1 .user selects value 2 from LOV 1 [row 1]
    -onchange, trigger submit of form back to itself updating the collection.
    2. provide LOV 2 [row 1] with limited list of values based on selection in LOV 1 [row 1]
    -onchange, trigger submit of form back to itself updating the collection with values of
    row 1's LOV 1 and LOV 2
    3. provide LOV 3 [row 1] with limited list of values based on selection in row 1's LOV 1 and LOV 2
    Is there away to change the dependent list of values using a javascript function? Such as repopulate the LOV?
    Help?
    Tony
    Message was edited by:
    amalloy

  • Problem with dynamic LOV and function

    Hello all!
    I'm having a problem with a dynamic lov in APEX 3.0.1.00.08. Hope you can help me!
    I have Report and Form application. On the Form page i have a Page Item (Popup Key LOV (Displays description, returns key value)).
    When i submit the sql code in the 'List of vaules defention' box. I get the following message;
    1 error has occurred
    LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
    When i excecute the code below in TOAD or in the SQL Workshop it returns the values i want to see. But somehow APEX doesn't like the sql....
    SELECT REC_OMSCHRIJVING d, REC_DNS_ID r FROM
    TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) order by 1
    returns_dns_lov_fn is a function, code is below;
    CREATE OR REPLACE FUNCTION DRSSYS.return_dns_lov_fn (p2_dns_id number)
    RETURN dns_table_type
    AS
    v_data dns_table_type := dns_table_type ();
    BEGIN
    IF p2_dns_id = 2
    THEN
    FOR c IN (SELECT dns_id dns, omschrijving oms
    FROM d_status dst
    WHERE dst.dns_id IN (8, 10))
    LOOP
    v_data.EXTEND;
    v_data (v_data.COUNT) := dns_rectype (c.dns, c.oms);
    END LOOP;
    RETURN v_data;
    END IF;
    END;
    and the types;
    CREATE OR REPLACE TYPE DRSSYS.dns_rectype AS OBJECT (rec_dns_id NUMBER, rec_omschrijving VARCHAR2(255));
    CREATE OR REPLACE TYPE DRSSYS.dns_table_type AS TABLE OF dns_rectype;
    I tried some things i found on this forum, but they didn't work as well;
    SELECT REC_OMSCHRIJVING display_value, REC_DNS_ID result_display FROM
    TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) order by 1
    SELECT REC_OMSCHRIJVING display_value d, REC_DNS_ID result_display r FROM
    TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) order by 1
    SELECT a.REC_OMSCHRIJVING display_value, a.REC_DNS_ID result_display FROM
    TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) a order by 1
    Edited by: rajan.arkenbout on 8-mei-2009 14:41
    Edited by: rajan.arkenbout on 8-mei-2009 14:51

    I just had the same problem when I used a function in a where clause.
    I have a function that checks if the current user has acces or not (returning varchar 'Y' or 'N').
    In where clause I have this:
    where myFunction(:user, somePK) = 'Y'
    It seems that when APEX checked if my query was valid, my function triggered and exception.
    As Varad pointed out, check for exception that could be triggered by a null 'p2_dns_id'
    Hope that helped you out.
    Max

  • Return multiple values from dynamic lov in apex 3.2.1

    Hi
    I need to create a dynamic lov that displays multiple values from a table and RETURNS multiple values into display only fields in a form page to be saved to the database
    For example
    dynamic list of value name SERVER
    select name || ',' || life_cycle d, name r
    from sserver
    order by 1
    This SERVER LOV is attached to the P4_SSERVER_NAME field in the form.
    However this only returns sserver. name into the P4_SSERVER_NAME field in the form. I would need to capture the life_cycle field as well and populate the P4_LIFE_CYCLE field in the form as well. How does one do this?
    I have searched this forum however could not find a thread that fit my situation. i saw that in 4.2 there is dynamic action however unable to upgrade at this moment.
    any suggestions are greatly appreciated.
    thank you

    Hi CRL,
    One method is to set the value of your P4_LIFE_CYCLE item via APEX_UTIL.set_session_state
    To do this you need to create a Page Process
    Type PL/SQL anonymous block
    Process Point On Load - Before Header
    The source for the Process might look like this: DECLARE
       l_life_cycle   VARCHAR2 (50);
    BEGIN
       SELECT life_cycle
         INTO l_life_cycle
         FROM sserver
        WHERE :p4_sserver_name = sserver.name;
       APEX_UTIL.set_session_state ('P4_LIFE_CYCLE', l_life_cycle);
    END;Jeff

  • Dynamic lovs in parameter forms ... Is this possible?

    Hi
    I am using report developer 10g on windows xp.
    I need a cascading prompt style dynamic LOVs in my report parameter form.
    The first LOV displays a set of values (say for eg. dept list). The second LOV will display another list, based on the value chosen by the user in the first LOV (Eg. List of employee names in that dept).
    My first LOV select statement may look like below for the user parameter say P_DEPT
    select deptno from dept;
    My sencod LOV select stmnt may look like below for the user parameter P_EMP
    select ename from emp where deptno = :P_DEPT
    Each time I try to set the second LOV, report developer complains "Bind variables not allowed in select statement"
    Same error msg comes if I reference the first user parameter(P_DEPT) as a lexical parmaeter.
    How do I acheive the above in report parameter form? Any help is appreciated greatly...
    Thanks
    Suma
    Message was edited by: suma
    user519129

    Hi Brad,
    Thanks for the reply. I had almost given up hope on receiving replies to this message.
    I do agree that it is simpler (and a lot striaght forward) to just use forms to develop dynamic LOVs of cascading prompt style, that is required in my app. But in our shop, we have integrated forms and reports in such a way, that all the report parameters are handled by report developer's own parameter form, rather than coding a separate logic on the forms side to handle the report parameters(as this has to be done on the forms side for every report that we generate, We thought it would be better to use the reports developer to handle the parameter input and then pass the .rdf to forms app). Currently in all our app, the parameter form generated by the report developer is rendered as HTML form on the browser (when the concerned rdf file is called within the forms app) and by submitting this we get the report output)
    Hence I am very keen to get this done somehow on the report developer side.
    I do hope I get some input on this. Also, its a little surprising that such a simple feature is not readily avalibale in the report parameter form. I hope oracle report developer team is reading this message...:)
    Thanks
    Suma

  • Item Selection on a dynamic LOV (SQL Query)

    Hi,
    I've a dynamic LOV with an SQL query who return a list of data (one column). When i select a data in this LOV to be use as an item (sql query) in the same page the data is always null. In debug mode substitution string is null.
    FYI : when the data is selected, a button is clik to perform an sql query for a report in another page.
    Thanks. Sorry Abasolute beginner
    Message was edited by:
    user581765

    Thanks for Your help.
    The date is in fact a CHAR display (not really a date) so that is not the error.
    For your information when i select a row in the list (format char YYYYMMDD_HHMM) it seems that Apex do not catch my select in the Session state.
    I've change the item name with P2_DATE_FLOW but the problem remain.
    This is the debug log if can help
    0.03: Application 114, Authentication: CUSTOM2, Page Template: 3644802034190382
    0.06: ...Session ID 1868105032215374 can be used
    0.06: ...Application session: 1868105032215374, user=Neop
    0.06: ...Determine if user "Neop" workspace "2859608277950243" can develop application "114" in workspace "2859608277950243"
    0.06: Session: Fetch session header information
    0.06: ...Metadata: Fetch page attributes for application 114, page 3
    0.06: Fetch session state from database
    0.06: Branch point: BEFORE_HEADER
    0.06: Fetch application meta data
    0.08: Computation point: BEFORE_HEADER
    0.08: Processing point: BEFORE_HEADER
    0.08: Show page template header
    0.08: Computation point: AFTER_HEADER
    0.08: Processing point: AFTER_HEADER
    0.08: Computation point: BEFORE_BOX_BODY
    0.08: Processing point: BEFORE_BOX_BODY
    0.08: Region: Report 1
    Report 1
    0.08: show report
    0.09: determine column headings
    0.09: parse query as: CFM_MDRE
    0.12: binding: ":P2_DATE_FLOW"="P2_DATE_FLOW" value="0"
    0.14: print column headings
    0.14: rows loop: 15 row(s)
    No data found.

  • Don't display empty database fields

    Hi
    I'm putting together a Stockist database-driven site using PHP & MySQL however some of the fields in the database are blank for some records, i.e. not all will have two lines in the address and not all will have a post code depending on the country etc.  I want to display the details as an address block but wonder if there is a way to not display empty fields?  Currently if a line is blank then it displays as a blank line but I want to suppress these blank lines to avoid gaps in the address block.
    Is this possible?
    Paul

    Use if/else for your dynamic elements with a condition if field = null show nothing else show the field on the page. Your code will look something like this:
    <?php
    // show if no City
    if (@$row_profile['city'] == "") {
    ?><?php
    // else show City
    } else { ?><?php echo $row_profile['city']; ?><br /><?php }
    // end if no City
    ?>
    I use something like this on the profile page. The sample code is for the users listed city from the profile recordset. If a city is saved in the database table it will show the city with line break on the page. If there's no city in the database it will not show anything. In the sample code change 'profile' and 'city' to your recordset and your table field, respectively.

  • Conditional display of list box in form (depends on other report column)

    Hello,
    i have one question regarding conditional display in forms.
    I have a tabular form where only one column ("flag") is updateable, all other columns are visible only.
    I changed the column "flag" from "standard report column" to "Select list (static lov)", which has the values "yes" and "no".
    This works fine. But in the running form i want to display the list box only if the column "status" = 'ERROR'.
    The column "status" can have the values 'ERROR' and 'OK'.
    When one record has "status" = 'OK', the column "flag" should not display the list box (only empty column row),
    when one record has "status" = 'ERROR" the column "flag" should display the list box.
    The idea behind is that if a record has "status" = 'ERROR' i have the possibility to confirm that "error" and update the column "flag" with "YES". This should only be possible for errors.
    This is my main problem.
    I tried with conditional display, but this hides or shows the column for the whole report/form, not on record level...
    The second problem then is, that if the column "flag" is changed to "YES" in case of column "status" = 'ERROR', then it should not be possible to change it again to 'NO". At the beginning it is 'NO', but once changed to 'YES' it should not be changeable any more.
    Is this possible?
    Thank you in advance,
    Matthias

    Hello Mike
    your solution sounds good, but unfortunately it is not working.
    None of my 2 columns are displayed, although i tried it as you wrote and the conditions should match...
    But i am no sure if this can work. If so, the 2 columns must fuse to 1 column:
    ID STATUS FLAG
    1 ERROR yes/no => comes from column1
    2 OK (null => comes from column2
    so "FLAG" must display column1 and column2 in one column. is that possible?
    regards,
    Matthias

Maybe you are looking for