Select_List_from_Lov

Team,
Here is the SQL
select htmldb_item.hidden(1,pr_id) Prod,
htmldb_item.hidden(2,pr_vsn_id) Vsn,
htmldb_item.text(3,pr_vsn_no,5) VsnNo,
htmldb_item.select_list_from_lov(4,pr_useg_in,'USEG_LOV') Usg,
htmldb_item.text(5,PR_VSN_FTR_TX,25) FTR_TX,
htmldb_item.select_list_from_lov(6,pr_apvl_sta_cd,'PR_APVL_STA',,'YES','_','-Select')
from prod04
where pr_id = :p2_pr_id
Select_List_From_Lov call using USEG_LOV is just fine. However, when trying to show null when using select_list_from_lov using PR_APVL_STA_CD, I get the "Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the
'generic columns'' checkbox below the region source to proceed without parsing. ORA-00936: missing expression'
error
I have taken the quotes off the 'YES' parameter and even tried NO and 'NO' to test(removing the null settings of course) and got the same error message. Please help.
Thanks much.
Howard

Scott..
According to the HTML_DB User Guide (page 13-23), the parameter which I left blank (p_attributes) is of no interest to me. I have no need to apply any additional HTML attributes to the report column. When trying and testing the SELECT_LIST_FROM_LOV api, I also tested with and w/o the comma.
Must the p_attributes be specified if the p_show_null and p_null_value attributes are required? If so, what would you suggest as "default" the p_attributes parameter?
Thanks again,
Howard

Similar Messages

  • CSV output selects all values returned by htmldb_item.select_list_from_lov

    I have a report with several columns using htmldb_item.select_list_from_lov. When I enable CSV Output (export to Excel) All the values in each of the columns get exported to Excel, not only the one selected in the report. For example. A value of ABC is selected in the report (stored in the database and this is a valid value in the LOV). In the drop down I also have values of DEF, GHI and IJK. I would expect only ABC to be exported, but I actually get ABC, DEF, GHI, IJK (all possible values) instead all displayed in the same column.
    Any ideas?

    I was able to work through this problem. Thank You.

  • Issue with CSV export while using HTMLDB_ITEM.SELECT_LIST_FROM_LOV in SQL

    Hi,
    I have created a SQL report with HTMLDB_ITEM package. IN that report, I have generated a report column using SELECT_LIST_FROM_LOV, which can be used by the admin to update the column entry.
    Here is the link:-
    http://apex.oracle.com/pls/apex/f?p=50508:8:
    The update is working fine, The issue is, if you download this report as a CSV, it will export all the values of the select list for that particular column. Is there any way to restrict the export to the single value of that column( or the current value in the database). Please help/ suggest.
    thanks
    VG

    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
    -------------------------------------------------------------------

  • SELECT_LIST_FROM_LOV only updates some records

    I am looking for help trouble shooting an error with my code. I created htmldb_items for a checkbox and a static list of values. When I insert the records to a table, and not all of the records have been selected, the SELECT_LIST_FROM_LOV value is not usually correct. It appears "i", the count variable isn't pairing g_f01 and g_f02 correctly.
    When all the records are updated/selected to be inserted to the table, they insert correctly.
    --APPLY PROCEDURE
    For i in 1..htmldb_application.g_f01.count
    Loop
    INSERT INTO x.tablename(role_id, deactivate_flag, deactivate_reason)
    (Select role_id,
    htmldb_application.g_f01(i),
    htmldb_application.g_f02(i)
    From x.tablename);
    End Loop;
    End;
    --HOW I CREATED ITEMS IN QUERY
    Select role_id,
    htmldb_item.checkbox(1,urol_id, Decode(deactivate_flag,''Y'',''CHECKED'', null)) Deactivate,
    htmldb_item.SELECT_LIST_FROM_LOV(2, deactivate_reason, ''deactivate_reason_lov'',null,''No'') Reason
    From x.tablename
    Thanks for any pointers or clues you can give me!
    Annette

    Scott,
    Thank you! That explains why the index values are different for the g_f01 and g_f02.
    The loop isn't working for me when I change it to loop on g_f02. I don't know how to selectively get the other value. The loop needs the index reference.
    So, if you can point me to an example, great. Otherwise,
    I'm thinking of using a radio button instead of the checkbox since that will have a value for every record. A co-worker is trying to solve it in his app by saving the results to a temporary table and selecting out of that.
    Thank you!
    Annette

  • How to set width of apex_item.select_list_from_lov?

    Hello experts!
    Sorry to bother you but I can't find out how to set the width of a select list generated in my query.
    I already had a look at the Oracle Express Api docu but and tried the following to no avail.
    apex_item.select_list_from_lov(8, a.lng_arbeitsschritt, 'Auftakt_LOV','.style.width = "300px";',
    '%', null,null, null, 'class="combobox"')Do you have a better idea?
    Many thanks,
    Sebastian

    I just did some more testing and discovered that the following works:
    apex_item.select_list_from_lov(8, a.lng_arbeitsschritt, 'Auftakt_LOV','style="width:500px";',
    '%', null,null, null, 'class="combobox"')Maybe this helps others as well!
    Thanks for having a look!
    BR,
    Seb

  • Limit on updates using select_list_from_lov?

    Hello All,
    Wondering if anyone knew if there was a limitation on APEX as far as how many rows one can update using a select_list_from_lov or select_list_from_query? My query can return as little as 2 rows to as many as 450 rows.
    I noticed if I reduce my number of rows allowed per view the update process works just fine reason why I was wondering if there is a limit and is there any way to up that limit?
    I have an update process similar to:
    FOR i IN 1 .. HTMLDB_APPLICATION.g_f02.COUNT
    LOOP
    UPDATE TABLE_1
    SET FIELD_1 =
    REPLACE (HTMLDB_APPLICATION.g_f03(i), '%' || 'null%', NULL),
    FIELD_2 =
    REPLACE (HTMLDB_APPLICATION.g_f05(i), '%' || 'null%', NULL),
    WHERE ID = to_number(HTMLDB_APPLICATION.g_f02 (i));
    END LOOP;
    COMMIT;
    END;
    Thanks.

    Zala - I can't see how your page works. Can you show an example on apex.oracle.com? Also, you didn't describe a problem. Are you experiencing one when you exceed some limit?
    Scott

  • 'SELECT_LIST_FROM_LOV' giving error if LOV fetches 47 rows

    Hi All,
    We are using 'SELECT_LIST_FROM_LOV' function to create dynamic items in a tabular form. It works fine when LOV fetches < = 47 rows but is giving 'buffer overflow error' if it fetches more!
    Any help/suggestions would be appreciated.
    APEX Version : 2.2.1
    Regards,
    Hari

    Did you try it first? I know the issue and ran into the exact same one and this is how to change it. Calling that function just returns a string to Apex and the buffer is only so big for LOV's. If you need more than 47 rows in your case, you need the _XL function.
    You are correct that it returns a CLOB, but its returning that to Apex, not to your process so to speak. It will handle it correctly in its internal API's.
    Try it and if it doesn't work we can figure it out but give it a shot!

  • Use APEX_ITEM.SELECT_LIST_FROM_LOV on report

    Hi All,
    I am trying to create a editable report.
    In this report, I have a few columns that allow users to update information. I have a problem to have my program return the current values of APEX_ITEM.SELECT_LIST_FROM_LOV in the specific ticked rows.
    For example:
    Here is the code for my report:
    1.
    SELECT apex_item.checkbox(1, h.nbt_po_seq, 'UNCHECKED') defaulted,
    --apex_item.hidden(4, h.nbt_po_seq) "PO_SEQ ",
          h.po_num,
           h.po_vendor_name,
           (select d.nbt_dept_desc
              from nbt_dept d
             where h.nbt_dept_seq = d.nbt_dept_seq) "dept_name",
    APEX_ITEM.SELECT_LIST_FROM_LOV
        (p_idx           => 3,
        p_value         =>NBT_LE_INFO_SEQ_holder,
        p_lov  => 'NBT_LE_INFO',
        p_attributes   =>NULL,
        p_show_null    => 'YES',
        p_null_value   =>  NULL,  --'%NULL%',
        p_null_text     => NULL,
        p_item_id       => NULL,
        p_item_label    => NULL,
        p_show_extra    => 'YES') "LE_NUM"     
      FROM nbt_po h------------------------------------------------------
    2. Here is my validation, just to see what values return.
    DECLARE
       l_message  VARCHAR2 (4000);
    BEGIN
    FOR i IN 1 .. apex_application.g_f01.COUNT LOOP
                 l_message := l_message
                || '<br>'|| 'LE_NUM: ' || :P17_LE_NUM || '    '
                || 'Row '
                ||i || '     ' || 'f01- '|| apex_application.g_f01(i)|| '<br>'
                || 'f02- '|| apex_application.g_f02(i)||'<br>'
    ||  'f03- '||apex_application.g_f03(i)
            --   || 'f04- '||apex_application.g_f04(i)  ||'<br>'
               -- || 'f01_' || '#ROWNUM#'
                        || '<br>'
    END LOOP;
    RETURN LTRIM (l_message, '<br>');
    END;-------------------------------
    3. If I ticked row 3 and 5.
    I can get correct ID from <b>h.nbt_po_seq</b>, but, for APEX_ITEM.SELECT_LIST_FROM_LOV value, I am getting row 1 and 2, not 3 and 5.
    Can someone please help me and let me know how I can correctly refer to the correct ticked row values for "APEX_ITEM.SELECT_LIST_FROM_LOV "?
    Thank you,
    Ling
    Edited by: LC on Sep 14, 2012 10:52 PM

    Hi
    I really appreciated your response.
    I have read the document many times before I submitted the question for help. This is the first time that I have done a report like this, and couldn't find a good example.
    Do you know an example that I can take a look and can refer to the "ticked" value of APEX_ITEM.SELECT_LIST_FROM_LOV?
    Here is my test result. I actually ticked row 2,4 and 5. The LOV value of those three rows are 1.
    But, here is giving me LOV values in row 1,2 and 3. So, the values become NULL, 1, NULL.
    LE_NUM:
    Row 1
    f01- 2
    f02-
    f03-
    LE_NUM:
    Row 2
    f01- 56
    f02- 14
    f03- 1
    LE_NUM:
    Row 3
    f01- 55
    f02-
    f03-
    FOR i IN 1 .. apex_application.g_f01.COUNT LOOP
                 l_message := l_message
                || '<br>'|| 'LE_NUM: ' || :P17_LE_NUM || '    '
                || 'Row '
                ||i || '     ' || 'f01- '|| apex_application.g_f01(i)|| '<br>'
               'f03- '||apex_application.g_f03(i)
            --   || 'f04- '||apex_application.g_f04(i)  ||'<br>'
               -- || 'f01_' || '#ROWNUM#'
                        || '<br>'
    END LOOP;I think it is because the i value in apex_application.g_f03(i) is counting from row 1,2,3 while Checkbox apex_application.g_f01(i) is counting ticked row 1,2,3
    Please help!! How I can return values for ticked 1,2,3
    Ling

  • ORA-20001 in APEX_ITEM.SELECT_LIST_FROM_LOV

    Hi everyone,
    I'm getting a ORA-20001 error from within HTMLDB_ITEM when trying to invoke APEX_ITEM.SELECT_LIST_FROM_LOV. I'm running XE and ApEx 3.2.1.00.12. After getting the error in a report query I was doing, I figured I'd try to narrow the issue down. If I either do this:
    SELECT   apex_item.select_list_from_lov(1, '1', 'FUNDLOV') FROM DUAL;or this:
    BEGIN
       DBMS_OUTPUT.put_line(apex_item.select_list_from_lov(1, '1', 'FUNDLOV'));
    END;I get the following error message:
    ORA-20001: Query must begin with SELECT or WITH
    ORA-06512: at "APEX_030200.WWV_FLOW_ASSERT", line 283
    ORA-06512: at "APEX_030200.WWV_FLOW_UTILITIES", line 6368
    ORA-06512: at "APEX_030200.WWV_FLOW_ITEM", line 853
    ORA-06512: at "APEX_030200.HTMLDB_ITEM", line 421
    ORA-06512: at line 2
    I get the same message whether I'm in ApEx's SQL Commands window or running it in Toad. I can invoke other APEX_ITEM functions like checkbox, text, etc. no problem.
    My FUNDLOV query looks like this:
    select DESCRIPTION display_value, RECORD_ID return_value
    from CSBG_FUNDING_LEVEL
    order by 1and it runs without any problem in ApEx or Toad so I don't believe the LOV query is the problem.
    Any idea what the problem may be? Thanks!
    John

    Unless I'm doing something wrong, the ORA-20001 issue appears to be affecting APEX_ITEM.SELECT_LIST_FROM_LOV_XL as well - and I'm also seeing strange behavior in APEX_ITEM.SELECT_LIST_FROM_QUERY.
    Running this query:
    SELECT description, record_id FROM csbg_funding_level;Returns:
    DESCRIPTION.....RECORD_ID
    Operated without CSBG.....1
    1% - 24%.....2
    25% - 49%.....3
    50% - 74%.....4
    75% - 100%.....5
    Yet running this:
    SELECT   apex_item.select_list_from_query(1, 1, 'SELECT description, record_id FROM csbg_funding_level', NULL, 'NO')
      FROM   DUAL;Returns:
    <select name="f01" ><option value="1" selected="selected">1</option></select>Where are all of the option tags that ought to be getting rendered for the rows in the query results?
    I could be wrong, but there appears to be some bugs in SELECT_LIST_FROM_LOV, SELECT_LIST_FROM_LOV_XL and SELECT_LIST_FROM_QUERY.
    Any thoughts? Thanks,
    John

  • Select_list_from_lov is very slow

    I have pretty simple one page all with no special things.... report has 6 columns, maybe 1500 rows (paged by 20). I use PL/SQL function with SQL output (this is because of custom search functionality). Everything works great.
    When I add select_list_from_lov as one column (this is really small LOV and has only 3 options), it takes forever to load the app. I'm talking from less than 1 second without select_list_from_lov to 30 seconds with select_list_from_lov. When I look at source code, whole HTML page has less than 200 rows and thus is should not be IE issue.
    I'm using APEX 2.2
    any idea how to speed it up?
    thank you
    jiri

    Jiri,
    to a SQL Trace of your page rendering to see what APEX executes.
    Add
    &p_trace=YESat the end of your page URL. That will generate a trace file on the database which you can analyze afterwards with TKPROF.
    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/

  • Select_list_from_lov, cant get the returning value

    Hi
    I try to use a apex_item.select_list_from_lov in a wizard. The LOV that I have is a dynamic list.
    everything works fine, only I cant get the return value of the selected items.
    multi select list
    htp.p(apex_item.SELECT_LIST_FROM_LOV
    ( 2,
    'MOS_ROL_OMSCHRIJVING',
    ' MULTIPLE HEIGHT=5',
    'NO',
    null,
    null,
    null,
    null,
    'NO')
    trying to see what the return values are, but got nothing.
    :p12_test := :f02;
    (p12_test is a textfield)
    any assistance would be greatly appreciated.
    Thanks
    using apex 4.0.

    >
    trying to see what the return values are, but got nothing.
    :p12_test := :f02;
    (p12_test is a textfield)
    >
    f02 is an associative array. See Referencing Arrays in the APEX API Reference for information on how to access values of items created using apex_item methods.

  • Exception when using apex_item.select_list_from_lov

    I have a query where I want to use a select list to enable the user to change the value of an attribute. However, when i try using apex_item.select_list_from_lov or apex_item.select_list_from_query I get an exception. My report region shows ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    I tried querying a smaller table, and then it works. Is there a size limit for select_list_from_query and select_list_from_lov? And if so, what is it? The list of values and the query works fine when using them in select list items (in a form). It also works fine when using apex_item.popup_from_lov.
    Camilla

    Camilla,
    Those functions return a varchar2 value so you are limited to 4000 characters for a column of that type selected in SQL. You can use the select_list_from_query_xl or select_list_from_lov_xl, which return a CLOB. In any case the size of the HTML generated for the row must be less than 32K.
    Scott

  • Get value from select list created using htmldb_item.SELECT_LIST_FROM_LOV

    I have created a tabular form using the HTMLDB_ITEM functions and now in the javascript, I need to determine the value in another column created using the SELECT_LIST_FROM_LOV function and then set the value under certain circumstances. Unfortunately, I do not know the correct syntax. My Javascript function is being called properly, I am just unable to get or set the field.
    I am calling my javascript function from another column on the tabular form passing in the current row number and f09 is my column.
    Below is my code. Unfortunately, none of the below are working.
    function f_setCurrency(a_row)
    var l_Currency = html_GetElement('f09_'+a_row);
    html_SetSelectValue(l_Currency, 2);
    alert(html_GetSelectValue(l_Currency ));
    alert($x(l_Currency).value);
    alert($x('f09_'+a_row).value);
    alert($v('f09_'+a_row));
    alert($x('f09_'+a_row).innerHTML);
    }

    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
    -------------------------------------------------------------------

  • Select_list_from_lov in multi row report: Help

    Oracle 10g, apex 3.2
    On windows XP client, Firefox 3.5.2
    I have a multi row editable report region, defined as below: I have a check box item for the row being selected and one of the columns in the row is a select_list_from_lov_xl. Once the user checks a particular row, using the check box, he/she will choose a particular value from that row's select list. How do I capture the value of the select_list returned value specific for that row? As you see from the highlighted code to render select_list,the value for the apex_item that I am assigning is 30. But when I look in the firebug->inspect element, the apex renders the name as 'f01'..??. What am I missing here??
    Also if user checks all rows, my code picks up the correct corresponding values picked for the select list. If user selects a row in the middle or any random row, the value selected is always the first item returned by the first orw's select_list (though this was not checked!!)
    I am confused and need help on capturing select list return values in a multi row reports.
    Thanks for all your time and expertise...
    Here's the simplified version of my query, that includes the culprits:
    SELECT APEX_ITEM.HIDDEN(10,TR.SEQ) || APEX_ITEM.CHECKBOX(20, tr.seq,'onchange="spCheckChange(this);"',:F500_REQUEST_LIST,':') "Is Requested?",
    +APEX_ITEM.SELECT_LIST_FROM_LOV_XL(30,TO_ROOM_SEQ, 'ROOMS_LOV') "To Room"*_+
    FROM TS_ASSETS TA, TS_REQS TR where <some condition>
    Here is part of my code that extracts the values picked
    -- this should pick only checked rows...
    for i in 1..apex_application.g_f20.count
    loop
    some_checked_value(i) := apex_item.g_f20(i);
    -- the below is coded thus, as thats the value that I see being set, when I inspect this element in firebug. Not sure how this came by, as I had set this item to 30 in my query...???
    some_select_list_val(i) := apex_item.g_f01(i);
    end loop;

    Why don't you try this
    SELECT    apex_item.hidden (10, tr.seq)
           || apex_item.checkbox (20,
                                  tr.seq,
                                  'onchange="spCheckChange(this);"',
                                  :f500_request_list,
                                  'f20_' || '#ROWNUM#'
                                 ) "Is Requested?",
           apex_item.select_list_from_lov_xl (30,
                                              to_room_seq,
                                              'ROOMS_LOV',
                                              'NO',
                                              NULL,
                                              NULL,
                                              'f30_' || '#ROWNUM#',
                                              NULL,
                                              'NO'
      FROM ts_assets ta, ts_reqs tr?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    ------------------------------------------------------------------------------

  • Screen takes a long time to render

    APEX 2.2 form with many regions displayed.
    One region is a matrix of about 10 columns and, potentially, hundreds of rows constructed using the HTMLDB_ITEM.HIDDEN, HTMLDB_ITEM.TEXTAREA, HTMLDB_ITEM.SELECT_LIST_FROM_LOV, HTMLDB_ITEM.TEXT and HTMLDB_ITEM.CHECKBOX functions.
    When there are few rows, the region displays very quickly. When there are 200-300 rows, the region can take 20-30 seconds to display.
    Running the same SQL in SQL*Plus for a 300 row region takes less than 0.5 secs.
    To try to isolate the problem I created two SQL regions, one above the below, the region taking the time.
    Running
    select to_char(systimestamp,'HH24:MI:SS:FF') time_mark
    from dual
    I got 16:05:32:007738 and 16:05:57:498557.
    The whole form is just under 1MB in size (when there are 300 rows in the large region). By monitoring the Windows task manager you can see the data getting transferred to IE in one rapid spike. The browser then takes a few seconds to display the form.
    Can anyone help to explain where the 20 -30 seconds is going?
    It seems to me that its either APEX itself or the AS (although the AS seems to be idle mostly)
    Can anyone offer any tuning suggestions?
    Thanks
    Adam

    Hi Adam,
    I've had similar problems before (but not in an Apex app). Whilst it may not be the same for you, the problem related to (A) the select lists and (B) the table widths.
    In both, it was because the browser had to load the data and then determine how to display it. It has to work out the width of each select list and then the width of every cell to work out the width of each column and, thus, the table.
    You can improve the speed by using the "table-layout:fixed" style for the table and by using COL tags with style="width:nnnpx". Together these force the browser to use specific widths for each column and stops it working out the widths for itself. If you don't want to use COL tags, the width would then be set by the width of the first row's cells. Either way, you need to adjust your report template to make these settings.
    Additionally, the longer the select lists, the worse the page-load time. You can see if these are causing the problem by using popup popup LOVs instead.
    Regards
    Andy

Maybe you are looking for

  • Adobe Photoshop Elements 12 erkennt nicht das Internet nach Installierung, was kann ich tun?

    In "My Adobe" habe ich das Produkt registriert, aber die Software erkennt das Internet nicht und die 7 Tage Frist ist abgelaufen und kann nicht mehr aktiviert werden. Wer kann helfen bei diesem Problem?

  • R/3 Backend PO in SRM for Confirmation in Ext. classic scenario

    Hi, We are on SRM 4.0, Extended classic scenario User created STO(Stock transport order) in backedn R/3(Not in SRM) and is visible in "Confirmation /GR services" in SRM. But when user tries to do confirm it the items are not available and confirmatio

  • Nested Subpanels for LVOOP Class Hierarchy

    Hi, I am trying to figure out a way to create a configuration window for a class object using a subpanel. The problem is that I have LVOOP class hierarchy of 3 levels, and thus I want to use nested subpanels, one subpanel for each inheritance. For ex

  • Help in fm lock order

    Hi i look for Fm that lock order ( vbak  ) Thanks Have a nice day

  • Using DLL  with JSP

    I have a dll component writing with C++. I want to use this DLL in a JSP Pages. Is it possible? How could i do? I don't want to use JNI because I don't know JAVA. thanks. Bye.