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

Similar Messages

  • 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 (query based LOV) in V. 4.1.1.00.23

    Hi guys,
    I am having some problems with an APEX application that I have exported from V. 4.1.0.00.32 and imported on V. 4.1.1.00.23.
    I have a Tabular Form region where I have a column which is Display As "Select List (Query based LOV)".
    If I add a new row - choose a new value (not the same as any of the above rows) and "Apply Changes"/"Submit" the value in the new row changes to the value of the 1. row of the tabular form :-( I can update this new row and then it saves the right value... It looks like it is only when inserting a new row.
    Is this a bug or is it a feature ;-)
    Hope you can help...
    /Rene

    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

  • Character string buffer too small (select list query based LOV)

    Hi,
    Using the select list query based LOV with a select witch is too big, you get this error.
    report error:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    When using the Popup LOV query based LOV) then it works nice.
    Can that be solved somehow?
    With the Popup LOV the return value is displayed in stead of the description.

    Hi Andy,
    How do I incorporate your suggestion on a report ?
    Example : I have
    select apex_item.display_and_save(1,column1,5) col1,
    apex_item.display_and_save(2,column2,5) col2 ,
    apex_item.popup_from_query(3, emp_name, 'select user_name, name  empname from table2) col3
    Table 2 is a long list , and I'm getting string buffer too small due to this.
    Your suggestion with HTP is good but I'm not sure how to implement it for reports as I'll like the user to change the values with the select_list.
    I'm not using forms as they want mulit-record on the same page.
    Hope to hear back from you soon.
    Thanks very much.

  • Tabular form (select list Query based LOV)

    Hi all,
    I have this situation:
    a tabular form with two "select list (query based LOV)" fields.
    The first one must affect elements in the second one. And so the second query based LOV field should has a "where attr1 = first_list_selected_value" in the query.
    Is this possible ? Could you show me some advices ?
    thanks in advance.

    OK, thank you.
    But maybe I wasn't too clear.
    I need cascading LOV for each row of my tabular form.
    I have a EMP tabular form
    select
    "ROWID",
    "EMPNO",
    "ENAME",
    "JOB",
    "MGR",
    "HIREDATE",
    "SAL",
    "COMM",
    "DEPTNO"
    from "#OWNER#"."EMP" I need a Select List for DEPTNO for each record of table. After set a value, the second "Select List" for ENAME should be affected automatically.

  • HTMLDB 2.0 bug - tabular forms - select list from named LOV

    Hi!
    Changing a column in a tabular form to 'select list (named lov)' gets the following error in HTMLDB 2.0 when you try to add a row (to an empty table in my case):
    PL/SQL error at column 133.
    Create a table and then create a tabular form on it. Then change a report column to be a 'select list (named lov)'. Save and run the form and the error occurs.
    Thanks!
    Dave Venus

    Brian,
    This example:
    http://htmldb.oracle.com/pls/otn/f?p=31517:176
    and this example:
    http://htmldb.oracle.com/pls/otn/f?p=31517:160
    may help you.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Report with Select Lists problem

    Hi all,
    I have a sql report with this query:
    select
    'Hello World' Col1,
    apex_item.select_list_from_lov_xl(1,'Data 1','TEST_LOV') lov1,
    apex_item.select_list_from_lov_xl(1,'Data 2','TEST_LOV') lov2,
    apex_item.select_list_from_lov_xl(1,'Data 3','TEST_LOV') lov3,
    apex_item.select_list_from_lov_xl(1,'Data 4','TEST_LOV') lov4
    from dual
    Where TEST_LOV is a LOV that return 400 rows. The problem is that this report gives me an error:
    report error:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    I am able to create a workarround using ajax, but I don't think this is the best way.
    Does anyone knows why this happens or any solution??
    Thanks,
    Alejandro.

    Hi,
    OK - My page is defined as:
    The report is based on the following SQL:
    select
    "EMPNO",
    "EMPNO" EMPNO_DISPLAY,
    "ENAME",
    "DEPTNO"
    from "#OWNER#"."EMP"The DEPTNO column is the one that I need a select list for. I have not used the APEX_ITEM package to handle this, but I expect it could be done that way as well.
    On the DEPTNO column, I have the following settings:
    Display As: Select List (query based LOV)
    Named LOV: -Select Named LOV-
    Display Extra Values: Yes
    Display Null: Yes
    List of values definition: SELECT NULL d, NULL r FROM DUAL
    Note that it is important that you use these exact settings.
    I have then created a new PL/SQL region on the page below the tabular form. The region should use the "No Template" template to keep it hidden from view. The Region Source is:
    DECLARE
    vSEP VARCHAR2(1);
    BEGIN
    vSEP := '';
    htp.p('<script type="text/javascript">');
    htp.p('var sMaster = new Array(');
    FOR c IN (SELECT DNAME d, DEPTNO r FROM DEPT ORDER BY UPPER(DNAME))
    LOOP
      htp.p(vSEP || 'new Array (' || c.r|| ',"' || c.d|| '")');
      vSEP := ',';
    END LOOP;
    htp.p(')');
    htp.p('</script>');
    END;This defines a hidden select list as a javascript array using the actual values from the DEPT table.
    I then have an HTML region underneath that, again using "No Template", that has the following as the Region Source:
    <script type="text/javascript">
    function updateList(sChild)
    var o;
    var sChildValue = sChild.value;
    sChild.options.length = 0;
    o = new Option('-Select-', '');
    sChild.options.add(o);
    var k;
    for (k = 0; k < sMaster.length; k++)
      o = new Option(sMaster[k][1], sMaster[k][0]);
      sChild.options.add(o);
    sChild.value = sChildValue;
    if (sChild.selectedIndex == -1)
      sChild.selectedIndex = 0;
    function updateLists()
    var lists = document.getElementsByName("f03");
    var k;
    var x;
    if (lists)
      for (k = 0; k < lists.length; k++)
       updateList(lists[k]);
    updateLists();
    </script>For this example, you will note that I am refering to "f03" (in the updateLists() function) - my DEPTNO column's SELECT tags have "f03" as their NAME attributes. This may need to be changed for your page.
    And that's it!
    When the page is loaded, the tabular form is constructed. Due to the settings I've applied to the DEPTNO column, each list will actually consist of a NULL entry and the value on the record (that's due to setting Null/Extra Values to Yes).
    Then, a hidden select list is constructed as a javascript array. And, finally, we loop through each of the "f03" items on the page, take a note of the value already there, replace the contents of the dummy select list with the contents of the array and then select the original value again.
    Andy

  • APEX 4.01 Tabular form with select list error

    When i create a tabular form and i add a select list(query based LOV) the form is not displayed but gives me the next error
    report error:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    somebody have an idea what is happening here
    is this still a bug in APEX 4.01?
    hope to have an answer soon.
    Hugo Perfors

    Hi Jari,
    It returns about 1100 records which i think is not much.
    But even when i narrow the amount of records the problem is not solved.
    it this a bug?
    Best
    Hugo

  • 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

  • Help with Select Lists

    Hello, Oracle community. I'm a new developer fresh out of school and I'm working on an issue tracker project on Apex 2.1. I have a page where we create cases that involve various issues called in by our clients through our support center. This app is supposed to replace what the support center currently has.
    My main problem is functionality. I have several select lists that redirect to the case creation page. I have conditions that allow several hidden fields to appear when certain values are chosen. We also have a couple of text areas for details and resolutions. The problem is that when we enter data into the text areas (CASE_DETAIL and CASE_RES) and escalate the case to a higher tier of support via redirecting select list, all text that was typed is cleared away when it redirects back to the page. All other select list values remain because they've already been redirected. How do I keep my text fields populated while preserving my select lists? The text areas are set to "Only when current..."
    If there's any links that you guys can provide with detailed info on how to handle these types or problems (the documentation is a bit general) I'd greatly appreciate it. I'm still learning this stuff. :)
    Dennis

    Wow, thanks.
    We had tried this before, but since we had email shooting off to our clients whenever the page was submitted, we went with the redirect. My brother (we're both working on this project) found the following topic while looking for this one:
    Select list with Redirect => other page items are reseted
    We had used the process to only send email when the CREATE button was pressed but completely missed the fact that we could do the same with the process row. The solution now is to switch all select lists to submit and make the process row conditional to only fire when the CREATE button is pressed. Now the page submits as much as it wants to, the text fields stay populated, and we don't get redundant emails and entries into the CASE table.
    Thanks for the help. I hope to return the favor some day. :)

  • Select List (based on LOV) query problem

    Hello experts! I have a small problem here, which I can't seem to overcome.
    I have a page item (select list based on LOV), which is based on a query. The query returns all potential employees of a department that are responsible for a certain duty. So far so good!
    The problem is that there are two departments, which should not only see there own employees but also the name of the employee that has carried out a certain task. However, due to my query, the name of that person is not displayed - only the pk is returned.
    Do you have a recommendation how I display all employees of a specific department and have additional values translated as well?
    My query is as follows: select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter where cnt_bearbeiter in (SELECT
    CNT_REGIERUNGSBEZIRK FROM TBL_REGIERUNGSBEZIRK) union select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter where int_behoerde in (SELECT
    CNT_REGIERUNGSBEZIRK FROM TBL_REGIERUNGSBEZIRK where STR_REGIERUNGSBEZIRK = lower (:app_user)) whereas :app_user holds the information of the department.
    Any hint is appreciated!
    Many thanks,
    Seb

    Okay, I just had the right idea and it's working well! Sorry for posting!
    I return the name of the employee that has edited a dataset and simply add all others of the logged on department! Really easy! Should have thought of that before posting! ;-(
    The correct code is select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter a, vt_tbl_punktdaten b where a.cnt_bearbeiter = b.int_bearbeiter and
    inv_pt_id_sub = :P4_PTIDS
    union select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter where int_behoerde in (SELECT
    CNT_REGIERUNGSBEZIRK FROM TBL_REGIERUNGSBEZIRK where STR_REGIERUNGSBEZIRK = lower (:app_user))Bye,
    Seb

  • 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

  • How to get a list of named LOV's

    How can I get a list of named LOV's that i created in my App? (A query) just similar to the select list that appears when we try to create a LOV. I hope I am clear
    Edited by: vmk on Jul 24, 2012 3:54 PM

    vmk,
    Try the APEX View APEX_APPLICATION_LOVS
    select * from APEX_APPLICATION_LOVS
    where application_id = &APP_ID.Jeff

  • Select List Query Restriction

    Hello,
    Hopefully this is a quick one.
    I'm trying to restrict the results of a query in a report by using a select list with a named dynamic LOV. Basically the report will only display rows that are the same as the value currently in the select list. My problem is that I'm trying to have an 'All' value in the select list that will result in all rows being displayed.
    I have tried using a LIKE in the query and setting the LOV to display null, then setting the null return value to %%%. This works exactly how i want it to if I hard code it into the query. However, when I try to use it as a value in the select list no rows are returned. The variable in the URL looks fine however it's not translating properly.
    Has anyone got any suggestions or alternate ways of doing the same thing?
    Cheers.

    Yes that has fixed the problem, either way % or %%% wasn't working.
    However adding the ||'%' to the end of the select list variable in the query appears to have fixed the problem. I don't understand why though, it should have worked with the null return value of %...
    Thanks a lot.

  • Help with Select Lists in Classic Report

    Hello,
    I working with APEX 4.1. Oracle 11.
    I have a simple classic report with 4 columns (Username, Role, Read, Update). The Read and Update columns are Select Lists with values of "Yes", "No".
    Report looks like this:
    Username Role Read Update
    JSmith Admin Yes Yes
    LJones Dev Yes No
    My requirement, is that when a user selects Yes from the Update select list, the value of the associated Read column needs to change to Yes as well for that particular Username. The change has to occur upon selection of Yes from the Update select list.
    Im not very strong with javascript, but for testing purposes I applied: onchange="alert('hi');" on the Update column. When I make a change to the Update select list, the alert does pop up.
    Can anyone suggest how I can implement the change to the associated Read value of Yes if the Update value chosen is Yes, for that particular row.
    Thank you,
    Laura

    LauraK wrote:
    I working with APEX 4.1. Oracle 11.
    I have a simple classic report with 4 columns (Username, Role, Read, Update). The Read and Update columns are Select Lists with values of "Yes", "No".
    Report looks like this:
    Username Role Read Update
    JSmith Admin Yes Yes
    LJones Dev Yes No
    My requirement, is that when a user selects Yes from the Update select list, the value of the associated Read column needs to change to Yes as well for that particular Username. The change has to occur upon selection of Yes from the Update select list.
    Im not very strong with javascript, but for testing purposes I applied: onchange="alert('hi');" on the Update column. When I make a change to the Update select list, the alert does pop up.
    Can anyone suggest how I can implement the change to the associated Read value of Yes if the Update value chosen is Yes, for that particular row.Should be possible to do this using a Dynamic Action without writing any (or much) JavaScript. The complexity in this case is that you're using items in a report rather than standard page items.

Maybe you are looking for