Update select list with dynamic LOV

How exactly do you do this?
Currently I have a text field which the user may enter a product type and a button when click. It would populate the select list with the product names that associate with that product type...
My lov would retrieve the product type value text field(:P1_t_prod_type) and get products names by type
select t_prod_name A , t_prod_name B
from t_prod_items
where t_prod_type = :P1_t_prod_type
order by 1Im kind of stump on is setting up my dynamic action to "set value" to the select list. As nothing seems to be appearing.

product type is a numeric value that can be a wide numeric range. (I don't know why the column is named like that. Sorry for forgetting to mention that)
Well I don't think i should submit the page? because after the list box is filled with product names. the user can then select one of those names from the list box and continue completing the rest of the form. After all that the page would then be submited. (Well that's how i imagine it to work...)
Wouldn't i run into problems if i were to submit the page twice... like lost entry in other text fields if the user were to skip that part at the start.

Similar Messages

  • Chart based on Select list with submit Lov problem

    Hi,
    I have one page with interactive report showing username with links, date and
    database actions.
    Another page contains one region having flash chart based on select list with submit Lov.
    The lov is created by dynamic query.
    Every time when i click the 1st page report link, the 2nd page lov is populating the value automatically. But the problem is chart displays NO DATA FOUND message though the LOV has many values.
    I don't want to display any null values so set to NO for LOV
    I tried to write Before header computation (PL/SQL Function Body) to set the lov value, but the query is displayed as such.
    I don't want to assign any static default value also as the values are dynamic for every link.
    The following is my Before header computation of Select list with submit (Item name is p11_schema). (PLSQL Function Body)
    begin
    if :p11_schema is null then
    return 'select distinct owner schema1, owner schema2 from auditing
    where access_date=' || :p11_access_date
    || ' and username=' || :p11_username
    || ' order by owner';
    end if;
    end;
    This is my chart query.
    select null link, obj_name label, sum(sel_count) "Select", sum(ins_count) "Insert", sum(upd_count) "Update", sum(del_count) "Delete" from auditing
    where username=:p11_username
    and access_date=:p11_access_date
    and owner=NVL(:p11_schema, OWNER)
    group by owner, obj_name
    Example: If there more than one records in the lov, the graph should display the 1st record. When i select another record, the chart accordingly display the selected values. But inially it should not display "NO DATA FOUND" message.
    I tried using all the combinations of computation type for the lov, SQL query ( I could not use if conditon then), PLSQL expression, PLSQL function body. But it does not work out.
    Can anyone please help me out.
    Thanks.

    Hi Scott,
    Thanks for your reply.
    I found out the solution for this problem as below.
    But i did it in different way to tackle the dynamic query wich returns more than one record using rownum always the 1st record when it is empty instead of assigning constant (static) value like '1'. And i am returning LOV itself for both null or not null condition as below.
    Declare
    q varchar2(4000);
    begin
    if :p11_schema is null then
    q:='select distinct owner schema from auditing';
    q:=q || ' where username=:p11_username ';
    q:=q || ' and access_date=:p11_access_date ';
    q:=q || ' and rownum<2 order by owner';
    Execute immediate q into :p11_schema USING :p11_username, :p11_access_date;
    end if;
    return :P11_SCHEMA;
    end;
    Thanks.

  • One select list with multiple LOV's (LOV based on how page was called)

    APEX 4.0.2
    I've a DML form page from a report on which I need a single select list item to have a differing LOV based on how the form page was called.
    The calling page (report), contains an edit link column and a create button. Depending on which is selected, I wish the LOV for my select list item to change. The idea behind this is that if someone creates a new entry, I want to constrain the select list to a subset of rows of a table query populating the LOV. On the other hand, if an existing item is edited, I want the select list LOV containing all rows of a table query populating the LOV.
    What I've tried...
    - Duplicates of select list item each triggered to render based on an arbitrary value set when either "create" or "edit" are selected. This did not work because the item was part of DML and would not allow replication on the same page.
    - Logic in the LOV sql statement controlling which sql was to be run based on an arbitrary value set when either "create" or "edit" are selected. This did not work as logic is not allowed in LOV sql statements.
    Any thoughts? Many Thanks!
    Paul

    Hello Patrick!
    Thanks for responding - Love your captcha plugin!
    Anyway, these are the two dynamic LOV's. The first I have in play right now (when creating new records). I need to have the other for existing record modifications.
    LOV #1
    select stock_no d, stock_no r
    from   [email protected]
    where  status like '%Awaiting Transfer%'
    or     status like '%On Hold%'
    order by 1LOV #2
    select stock_no d, stock_no r
    from   [email protected]
    order by 1As I mentioned, I attempted to use plsql logic in the query to trigger one or the other based on a value set when the user either clicked an edit link or a create button but couldn't get the dynamic LOV to commit with that extra code in it.
    Thanks!
    Paul

  • Dynamically changing the select list in an LOV based on the login user

    We have a field in a form which is a combobox.The form is to be linked to different profiles of users.Based on the logged in user we would like to restrict the select list in the LOV.ie user1 should see a LOV which is different from that seen by user2.Is this possible.If so how can this be done?Kindly reply.
    Thanks & Regds,
    Jayanthi

    Thanks for ur reply.But my problem is that i have a table having details of some products which includes spareparts also(Name,id,price etc).In my form i have the combobox field which should have a list of these products which the user can select.Now depending on the user's profile he should see only his related products(One profile of users should view only the products but not the spares while the other should view only spares.)The details of both the products and spares are in the same table.we have a criteria to differentiate between the products and the spares.The LOV should display at run time, either products or spares depending on his profile as he logs in. Hope u understood my problem.
    Regds,
    Jayanthi
    Hello Jayanthi,
    I had a similar situation in my last project.
    While you can solve this by modifying your query, this will always come around as may be later some other criteria to restrict based on User/His Role/Something else. Hence I fixed it at design level itself. Though I can't give my situation I can tell you the solution applying my logic.
    Altering your Product Table and adding one more database Column say Product_Category and updating the table with Product Category =1 for Products and 2 for Spares. You can extend this further for other types.
    Create a new Table say User_Groups that will have
    Group_id
    Group_Name
    User_Id columns and will contain all the User ids inserted groupwise.
    Create one last Table Group_Product_Map
    That will have
    Group_id
    Category_id
    This will store each Group_Id followed by Category_id of Products to which these group members will have access to.
    Now write a database function getCategory( p_User) which will query User_Groups table to get Group_Id
    and further query Group_Product_Map Table based on group_id to get Category_Id.
    This function will return category_id.
    Huh!
    So your LOV will have a query as select *(or whatever) from Product where category_id = getCategory(portal30.wwctx_api.get_user)
    Hope this helps
    Madhav

  • Dynamic select list with display,return val & join condition issue.

    hello,
    I am having a dynamic select list with display, return value
    say for example my select statement is
    select distinct dname d, deptno r
    from dept dt
    right join emp e on (e.deptno=dt.deptno)
    where (condition)
    when i tried this query for my select list, it is not working. It saying that
    " 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. "
    I am not able to understand the problem. Can anyone help me out with this issue?
    thanks.

    Shouldn't your join have dept as the driving table?
    select distinct dname d, deptno r
    from dept dt
    right join emp e on (dt.deptno = e.deptno)
    where (condition)
    Or using older Oracle standard join
    select distinct dname d, deptno r
    from dept dt, emp e
    where (dt.deptno (+) = e.deptno) AND (OTHER WHERE condition)
    OR
    (Since a right join is just getting the values from the driving table that are NOT in the associated table)
    select distinct dname d, deptno r
    from dept dt
    WHERE dt deptno NOT IN (SELECT deptno FROM emp) AND (OTHER where condition)
    Thank you,
    Tony Miller
    Webster, TX

  • Dynamic select list with displaying a description

    Hi,
    I want to have a select List, my list refer to a lov, and the lov refer to a table contaning 2 columns : code and description,
    The list must display only the code, but I want having an item beside the list dispaling the description....
    I have used a select list with the query :
    select code d, code r from prog_theme order by 1 desc
    and Now : what is the way for displaying the description
    Thanks!!
    Lila

    Ok, here goes the top down approach...
    In the HTML header of my page, i have this reference to a js file containing the javascript - <script src="#WORKSPACE_IMAGES#108.js" type="text/javascript"></script>
    Then in an HTML Region I have the following code to create the divs that will be shown and hidden - <div id="divREGION" class="divs">Select region to get list of countries.</div>
    <div id="divCOUNTRY" class="divs">Select country to get list of cities.</div>
    <div id="divCITY" class="divs">Select city and then press "Get Employees". </div>
    Note that these divs contain static content. You may be able to create dynamic content for these divs by creating dynamic query regions and putting div tags around the region (i havent tried this, it may require template modification).
    The select boxes have this code in the "HTML form elements attributes" - onFocus="javascript:showHideDiv(this,true)" onBlur="javascript:showHideDiv(this,false)"
    This onFocus and onBlur call the showHideDiv() function, passing in the object reference of the select box and a true/false to show/hide the related div.
    The actual javascript function that is contained in the 108.js file is:
    function showHideDiv(objThis, inBool){
         var divid = "div" + objThis.id.substring(3);
         if (inBool) {
         ShowDiv(divid);
         else {
    HideDiv(divid);
    That function in turn calls either the ShowDiv() or HideDiv() functions, depending on the true or false, passing in the ID of the div to be changed...
    function ShowDiv(divid){
         eval('document.all'+ '["' + divid + '"]' + '.style' +'.display = "inline"');
    function HideDiv(divid){
         eval('document.all'+ '["' + divid + '"]' + '.style' +'.display = "none"');
    Hope this helps.

  • Dynamic list... select list with submit

    Hi,
    I am trying to create a dynamic list and based on the selection I want to pass the parameters… Here is what I’ve done so far
    Step 1… created a list of values (through shared components) using a query
    Step 2… created an item… used option to select list with submit…
    Here is the challenge: How to update my P1_Value based on the value from Select list…
    Thanks in advance

    I've created a page process by following these steps
    Create Page Process:
    Category of the process: Session State
    Session State process type: Set Preference to value of Item (PreferenceName:ITEM)
    Point: On Submit after computation and validation
    Preference Item: P1_Value
    Getting an error message:
    Invalid PL/SQL expression condition: ORA-06550: line 1, column 29: PLS-00306: wrong number or types of arguments in call to 'NVL' ORA-06550: line 1, column 7: PL/SQL: Statement ignored

  • Problems with customizing select lists and popup LOVs

    Hi
    I have 2 problems about select lists and popup LOVs.
    The first one is about a select list in a tabular form.
    It should be created with APEX_ITEM.SELECT_LIST_FROM_LOV or similar and take its values from a named LOV.
    This worked fine but now it should also have the possibility to enter a free value.
    I tried to accomplish that by creating a APEX_ITEM.POPUP_FROM_LOV, but there is a problem with the function that is called by the arrow icon right to the input field (for eg. genList_f11_5()).
    If the row is added by addRow, then it works fine, but if the row is is not empty
    then the function call is like genList_f11_$_row() and the input field gets no value, when a LOV option is selected.
    The other problem is about a select list which should have the possibility to enter a custom value and
    also there should be the possibility to select several values. I tried to implement this by a text area containing the selected values and a multiple select list, with an event handler in each option. The user could click options and they would be copied to the text area. The problem is that I couldn't make the event handler work in IE.
    I would appreciate any ideas about either of these problems.
    Tiina

    Hi,
    If you download application you can see source.
    I have not write any instructions, sorry.
    If you are on Apex 4 you can just load jQuery UI autocomplete library and take ideas from my app.
    If you download my sample in zip there is uncompressed htmldbQuery library.
    You can see that and take only function htmldbAutocomplete.
    Then check jQuery UI document
    http://jqueryui.com/demos/autocomplete/#method-search
    There is method search that you can use open list just by click of input.
    I hope this helps at start.
    Regards,
    Jari

  • OnChanger="get_ajax_select_xml(this);" with  select list (query named LOV)

    Hello,
    i used Vikas'example Re: cascading lov for tabular form
    i have a problem with Select list (query based LOV)
    when run tabular form i have the following error:
    report error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    the number of rows of the Lov are 900
    the display variable is 70 char
    is there any limit?
    Thank in advance
    Costanti

    Leo,
    Thanks for the response, but I don't think you quite understand my problem. If I go to the Column Attributes screen for the group_id field, I have the "Display As" drop down set to "Select List (query based LOV)", not "Select List (named LOV)". This requires that the sql query be written in the "List of values definition" text area below. Within that text area I have the following query:
    SELECT DISPLAY_NAME, GROUP_ID
    FROM APPLICATION_GROUPS
    WHERE APP_ID = ?????
    ORDER BY 1
    The APP_ID that I need to reference is for the current row of data that is being processed. Therefore, I can't use a :PNNN_APP_ID variable, because that field does not exist on the page.
    Hopefully this explains it a little better.
    Thanks,
    Kris

  • Item(select list) with LOV and Report with link = changed value item

    Hello,
    On one page I have:
    - Item 'P_name' (select list) with LOV to select name of a person;
    - Items 'factory' and Report 'factory'(standard created with 'Form with Report' on the same page).
    Situation:
    All works fine. I selected first a LOV Item 'P_name' (say 'Jane'). But....
    Only when I select a record (to change the values) from the report 'factory' then LOV Item 'P_name' become empty. Report used a link to the same page to fill the report items 'factory' and make also the LOV item empty.
    Question:
    I have made a process that write the name 'Jane' to table.
    I see two possibilities:
    - LOV Item value => fill the LOV item with 'Jane' from the table before region. Is this possible?
    - Report => What is the buttonname of reportlink? I can use this name in the processes.
    Thanks Walter!

    1) what i meant was for you to test this ridiculously huge LOV outside of htmldb, but it occurred to me last night that you could, in fact, be hitting a limit of ours. after some poking around, i have confirmed that. select list items in htmldb are currently limited to 10,000 rows. this was initially done for performance reasons, but they're now opening up the restriction. if you really need to work with that many rows where the user is allowed to pick from a set of values, consider using a popup item type instead. it'd help your app performance as well (in my test cases, it stank to have to wait for my 10k select list rows to come down to my browser).
    2) sorry to not have been more clear about this, but when you set your item's "Source Type" back to "Database Column", you'd have to specify that column in the "Source or value expression" field. also, you can't put a sql query into that "Post Calculation Computation" field. as i said before, "you can take a look at the attribute-level help for that field to see implementation examples."
    3) stick with "Always..." for now if you're using our auto-dml process(es)
    regards,
    raj

  • Dynamic select list with one static 'not_listed" option

    Hi guys,
    I want to create a dynamic select list with one static 'not_listed' option.
    One possible alternative is to add the 'not_listed' record into database, but I really dont want to go that way unless there is no other way around.
    Can anyone shed some lights on this?
    Many thanks,
    William

    As usual : "It depends"...
    If you have a foreign key defined on that field, Scott's reply won't work - unless you define '0 - Not listed' in the database. You can use selec 'not listed' d, to_number(null) r from dual though...
    Another - more declarative way - is in the on 'Edit Page Item' page, in the 'List of Values' region set 'Display Null' to 'Yes' and 'Null Display Value' to ' - Not listed - '.
    Roel

  • Select list with submit using on a dynamic report

    Hi! I'd like to know how can I create a Select list with Submit using the HTMLDB_ITEM API.
    I know there's an API named HTMLDB_ITEM.SELECT_LIST_FROM_LOV(), but I'd like to know how can I reproduce in there the submit everytime the user changes a value.
    Thanks!

    Hi! I've discovered there's a parameter on this function that allows me to include a javascript like the example below:
    select HTMLDB_ITEM.SELECT_LIST_FROM_LOV(3, ctr_id,'LOV_COUNTRIES','onChange=javascript:doSubmit()','NO)
    from XXXX;
    The thing is I don't know how exactly this javascript:doSubmit() works, because it works different than creating a select list with submit item.
    If I create on a page a simple "select list with submit" item, and if I run the page, after changing the value of the select list it refreshes the page but it doesn't erase the values inserted on the other items. But if I have this HTMLDB_ITEM.SELECT_LIST_FROM_LOV function, after changing the value of the select list it refreshes the page but it erase the values inserted on the other items and recovers the old values..
    I really need your help on this.
    Thanks in advance :-)

  • How create LOV(select List) with all LDAP users

    Hello,
    I am trying to create a selected list with all the users in my LDAP, note my LDAP is synchronized with my OID.
    Any suggestions, I'm searching the the pl/sql statment?
    Thanks
    Hussam

    Hi Hussam,
    Take a look at my comments in the following two threads -
    Re: LDAP
    Re: Cookie And LDAP
    The two different threads discuss the methods I use to do what you want to do (so you really need to 'combine' the two different threads).
    Hope this helps

  • Select List (query based LOV) in a wizard created report form

    I have created an updatable report form with 3 columns:
    app_id
    user_id
    group_id
    Each app_id has multiple group_id's associated with it, and I want to show the group_id field as a Select List (query based LOV) that contains the groups associated with the app_id.
    My query for the select list needs to be similar to the following:
    SELECT DISPLAY_NAME, GROUP_ID
    FROM APPLICATION_GROUPS
    WHERE APP_ID = ?????
    ORDER BY 1
    The problem is, I don't know how to reference the app_id from the main report to replace the ?????.
    In other words, if my report returns 2 rows of data like this:
    app_id----------user_id----------group_id
    1-----------------24------------------3
    2-----------------24------------------15
    Then how do I get the group_id column to be a select list of possible groups for each application? If app_id 1 has 3 groups associated with it, 3, 4, & 5 and app_id 2 has 2 groups associated with it, 15 & 16, then those each of the select lists should be based on the app_id.
    Hopefully I explained this clearly.
    Thanks,
    Kris

    Leo,
    Thanks for the response, but I don't think you quite understand my problem. If I go to the Column Attributes screen for the group_id field, I have the "Display As" drop down set to "Select List (query based LOV)", not "Select List (named LOV)". This requires that the sql query be written in the "List of values definition" text area below. Within that text area I have the following query:
    SELECT DISPLAY_NAME, GROUP_ID
    FROM APPLICATION_GROUPS
    WHERE APP_ID = ?????
    ORDER BY 1
    The APP_ID that I need to reference is for the current row of data that is being processed. Therefore, I can't use a :PNNN_APP_ID variable, because that field does not exist on the page.
    Hopefully this explains it a little better.
    Thanks,
    Kris

  • Select List (Parent/Child) LOV

    I have the Easy Oracle HTML-DB book, they give an example of a
    Parent Child Select List using a query.
    Does anyone know how to apply the Parent/Child relationship with
    a List of Value generated from a table.
    Example
    Parent Child
    Car Pontiac
    Car Buick
    Car Cadillac
    Car Nissan
    Truck Tahoe
    Truck Silverado
    Truck F150
    Truck Titan
    The parent(s) in the above example are Car/Truck, the children are in the adjacent column.
    Objective: When the parent "Car" is chosen, only the "Pontiac/Buick/Cadillac/Nissan" will be available, once the child is selected,
    wish to submit to a empty table that can grow dynamically.
    OS: Windows: XP
    Oracle ver.: 10g
    Apex ver.: Release 2

    Hi,
    are you just having one table storing all the values?
    1) Create a "Select list with Submit"
    2) Lov query would be something like
    SELECT DISTINCT
           CAR_TYPE AS D
         , CAR_TYPE AS R
      FROM WHATEVER_TABLEThe distinct is only because you have mixed your parent and child values in one table instead of having two separate tables with a FK from the child to the parent.
    3) Create another "Select List"
    4) Lov query would be something like
    SELECT CAR AS D
         , CAR AS R
      FROM WHATEVER_TABLE
    WHERE CAR_TYPE = :P2_CAR_TYPE-> in the where clause you restricting the second lov with the value the user has selected in the first select list.
    The first "Select List with Submit" will trigger a full page refresh when you select a car type. If you want to avoid that you can use the AJAX based "Cascading Lov" feature of my ApexLib Framework (see http://apex.oracle.com/pls/otn/f?p=33231:4 ) or search on the forum for "cascading lov ajax" for other similar solutions.
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/

Maybe you are looking for

  • How to create a PDF with Only Read Property

    Hello Gurus, I have a big question: How can I create an Smartform which can be exported in an Only Read PDF ? I need to do that for creating a PDF file which information can not be copied. Is that Possible? Thanks!!! rgds. Miguel Angel.

  • I just wanted to say...

    Can I connect my iPhone 4S to the  Internet via computer. I mean if I have a network connection and my iPhone 4S it's plugged in,  can I download games from App Store with my phone ? ( without 3G )

  • How to read DefaultTrace files, What are other useful trace files

    Hi, I was trying to debug some issue using Default Trace file and it is painful. Can anyone point out some tips and tricks to do debugging. And how to read Default Trace file. Also what are the other useful trace files available? Please point out. Th

  • Getting the Description of the Physical Column

    Hi, I am trying to populate the description attribute of each of the table columns in the Physical layer of my RPD. I have these descriptions stored in an Excel file. Is it possible to import these descriptions into my .rpd? Thanks

  • Dynamic ribbon using MFC C++

    Hi, So I am trying to program ribbon dynamically with MFC. My requirements said I need 3-levels of HUD with the ribbon though. I know right now you guys only have 2, not counting the quick access toolbar. First level = Categories, Second level = Pane