Popup Key LOV, NULL and "Invalid numeric value undefined for column"

Hello.
I've created an item based on database column of NUMBER type and set the following properties:
Display As = Popup Key LOV (Displays description, returns key value)
List of values definition=select 'display_value' d, 1 r from dual
Null display value=%
Null return value=
Display Null=Yes
When I select "%" in the LOV and try to apply changes to database I get error:
ORA-20001: Error in DML: p_rowid=1781, p_alt_rowid=N1, p_rowid2=, p_alt_rowid2=. ORA-20001: Invalid numeric value undefined for column N2
Error Unable to process row of table TTT.
If I set Display As = Select List, all works fine. But I need Popup Key LOV.
Could anybody help me?
I use Application Express 2.2.1.00.04

Hi all,
I did my homework and solved this issue. First I would like to thank Patrick Wolf for the invaluable help he gives out on thread Re: Null value handling in LOVs The code presented here is just a minor edit to his code, but an essential one when dealing with Popup Key LOV items.
Here's what I did:
1. Create an Application Process.
Name: RemoveNulls
Sequence: 0
Point: On Submit: After Page Submission - Before Computations and Validations
Process Text:
BEGIN
    FOR rItem IN
      ( SELECT ITEM_NAME
          FROM APEX_APPLICATION_PAGE_ITEMS
         WHERE APPLICATION_ID   = TO_NUMBER(:APP_ID)
           AND PAGE_ID          IN (TO_NUMBER(:APP_PAGE_ID), 0)
           AND LOV_DISPLAY_NULL = 'Yes'
           AND LOV_DEFINITION   IS NOT NULL
           AND LOV_NULL_VALUE   IS NULL
    LOOP
        IF (V(rItem.ITEM_NAME) = '%null' || '%' OR V(rItem.ITEM_NAME) = 'undefined')
        THEN
            Apex_Util.set_session_state(rItem.ITEM_NAME, NULL);
        END IF;
    END LOOP;
END;Error Message: #SQLERRM#Condition: None
2. You should be able to submit a Popup Key LOV with a NULL value now.
Once again, THANKS, Patrick! You rock! I'm seriously thinking of trying ApexLib now :)
Georger

Similar Messages

  • Need to default text string values to null and leave numeric values as are

    Hi,
    This may be a simple question but I have the following query:
    select gis.province, ce.place_id
    from  cla_event ce
    Left join (select * from rbn_gis_area where version = 10) gis
    on ce.place_id  = gis.sp_codeProblem is place_id has text fields since the data is dirty and I receive there error 'ORA-01722: invalid number 01722. 00000 - "invalid number"'. I want to default any text to null. Here is some sample data.
    CREATE TABLE Temp_1 (Place_ID varchar2(50));
    INSERT INTO Temp_1(Place_ID)  VALUES (77415018)     ;
    INSERT INTO Temp_1(Place_ID)  VALUES (77305000)     ;
    INSERT INTO Temp_1(Place_ID)  VALUES (77415000)     ;
    INSERT INTO Temp_1(Place_ID)  VALUES (null)     ;
    INSERT INTO Temp_1(Place_ID)  VALUES (77423034)     ;
    INSERT INTO Temp_1(Place_ID)  VALUES (null)     ;
    INSERT INTO Temp_1(Place_ID)  VALUES (77424011)     ;
    INSERT INTO Temp_1(Place_ID)  VALUES ('Glebwood')     ;
    INSERT INTO Temp_1(Place_ID)  VALUES (77603002)     ;
    INSERT INTO Temp_1(Place_ID)  VALUES (77409012)     ;
    INSERT INTO Temp_1(Place_ID)  VALUES (null)     ;
    INSERT INTO Temp_1(Place_ID)  VALUES (null)     ;
    INSERT INTO Temp_1(Place_ID)  VALUES ('AVONDALE')     ;
    INSERT INTO Temp_1(Place_ID)  VALUES (27516000)     ;
    INSERT INTO Temp_1(Place_ID)  VALUES (10509000)     ;
    Select * from temp_1Thanks in advance!!!
    Banner:
    Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    "CORE 11.2.0.2.0 Production"
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production

    May be this is helpful to you..
    select regexp_replace(Place_ID,'([[:alpha:]])','') from Temp_1;
    select gis.province, ce.place_id
    from  cla_event ce
    Left join (select * from rbn_gis_area where version = 10) gis
    on regexp_replace(ce.Place_ID,'([[:alpha:]])','')  = gis.sp_codeRegards,
    Dipali..

  • Error while selecting NULL value from Popup Key LOV(numeric or value error)

    Hi,
    I have a item P1_DEPTNO with following properties.
    P1_DEPTNO - Popup Key LOV (Displays description, returns key value)
    LOV - P1_DEPT_LOV
    select deptname d, deptno r from deptP1_DEPTNO item properties
    List of Values
      Named LOV - P1_DEPT_LOV
      Display Null - Yes // changed to Yes, so that it can accept NULL values.
      Null display value - NULL
      Null return value -   (blank)PL\SQL Process -
    declare
    v1 number;
    begin
    if :P1_DEPTNO is null OR :P1_DEPTNO = '' then
        v1 := 0;
    else
        v1 := :P1_DEPTNO;
    end if;
    // rest of the PL\SQL process
    end;Now, when I run the page and select NULL value from Popup LOV and submit, I get the following error.
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error.When, I select any other value other than NULL, then it's working perfectly fine.
    Only in case of NULL value, I am getting this error.
    ANY idea, why this error is coming??
    Thanks,
    Deepak

    Hi Varad,
    I did the following change
    Null display value - (blank) // by default it is displaying '%' in the select this
    Null return value - -1
    but when I select % (null value) from the popup list, it displays the return value -1 in the text field.
    My question is why it is displaying the return value -1 in the text field...*It should display the display value in the text field (i.e blank in this case)*
    then, I did the following change
    Null display value - (blank) // by default it is displaying '%' in the select this
    Null return value - // a single space, so that when I select %(null value) from the list, it should display blank in the text field...
    then I did the following change in the PL\SQL process.
    PL\SQL process
    declare
    v1 number;
    begin
    if :P1_DEPTNO = ' ' then // -- checking the value of single space ' ' when we select %(null) in the popup list, BUT even I select %(null), control is not coming here.
        v1 := 0;
    else
        v1 := :P1_DEPTNO;
    end if;
    // rest of the PL\SQL process
    end;Thanks,
    Deepak

  • Checkbox and ORA-20507: Invalid numeric value #:# for column

    Hi All,
    I'm facing problems Checkboxes in a form.
    I created a form and report on a table. one of the fields on the form is a checkbox and when ever I want to create a new record or update with more than one value for the checkkbox I obtain the following error:
    ORA-20507: Invalid numeric value #:# for column COLUMN_NAME Where by #:# is numbers
    I think the error occurs at the processes of get_pk and process_row_of_......
    how should I change the processes to accommodate the checkbox values.
    Kind regards
    Mel

    Hi Roel,
    Colunm = number
    LOV Definition
    select product display, prod_num return from product_category_vw
    where prod_num not in (select p.prod_num from product_user_tb p, user_tb u
    where p.user_num = u.user_number
    and u.user_name = :APP_USER)
    ORDER BY 1column = number
    LOV Definition
    select school d, sch_id r from school_tbRegards
    Mel

  • Why doesn't a Popup Key LOV (named LOV) in a tabular form not display values in the popup?

    I have a tabular form and I'm setting one of the fields to a Popup Key LOV (named LOV). The named LOV is a static LOV. When the popup is displayed there are no values displayed. The same thing happens if I use a Popup LOV (named LOV).
    I created a sample application http://apex.oracle.com/pls/apex/f?p=15762:1that shows what happens. When the job field popup is selected, no items are displayed. If I change the item to a Select List (named LOV) it works fine.
    Is this a bug?

    Hi
    I am also getting the same issue. Hope it could be a bug.
    Can anyone plz confirm this?
    Thanks
    Lakshmi

  • Change the size of and number of rows retrieved in Popup Key LOV

    I have a Page Item of type Popup Key LOV (Displays description, returns key value).
    There are 100+ rows returned but each "page" in the popup window only holds 10, then the user has to click next to see the next 10 rows. Where can I change this setting so that 25 rows are returned per page?
    Also, is there a way to make this popup window wider so that a long string doesn't wrap, but stays on a single row.
    Edited by: mimi_jones on Nov 20, 2009 9:48 AM ADDED: APEX 3.1.1 Oracle 10g

    Go to Shared Components in the Application Builder for your app.
    Go to Templates.
    Go to Popup LOV template.
    The Window section allows you to change the height and width. The Pagination section allows you to change how many entries you see per page.
    Boris

  • PassBack values from custom page to "Popup Key LOV"

    I'm trying to use a popup page to passback a return value and display value to a "Popup Key LOV (Displays description, returns key value)" Item type (using javascript).
    So I have Page 1 with "Popup Key LOV" Item "P1_CONTACT_ID".
    From a popped up page I'm try to use the following javascript function to pass the values back so P1_CONTACT_ID displays the display value and also stores the "key value" hidden away:
    function passBackToBooking(passitem1,passitem2,passVal1,passVal2)
    opener.document.getElementById(passitem1).value = passVal1;
    opener.document.getElementById(passitem2).value = passVal2;
    opener.document.getElementById(passitem1).focus();
    close();
    I'm calling the function as follows from a column link on a report on the popped up page:
    javascript:passBackToBooking('P1_CONTACT_ID','P1_CONTACT_ID_HIDDENVALUE','#FULL_NAME#','#ID#');
    However the function seems to do nothing (does not even close the window).
    I can get the intended result by copying and using the javascript from the "real" popup window (using the standard popped up window) (see following javascript) - but this is hard coded and inflexible. Everytime I change the order of items on P1 the function has to be amended to suit the apex created item names (e.g. p_t13, p_t12) (uses "name" rather than "id")
    function passBack(x,y){
    if (opener.document.forms["wwv_flow"].p_t13.length > 1){
    var l_field = opener.document.forms["wwv_flow"].p_t13[8];
    l_field.value = x;
    opener.document.forms["wwv_flow"].p_t12[8].value = y;
    }else{
    var l_field = opener.document.forms["wwv_flow"].p_t13;
    l_field.value = x;
    opener.document.forms["wwv_flow"].p_t12.value = y;
    if(l_field.getAttribute('onchange') || l_field.onchange){l_field.onchange()}
    window.close();
    if(!(l_field.disabled || l_field.type == 'HIDDEN')){l_field.focus();}
    Apologies if this is longwinded, I've spent alot of time on this and can't resolve.
    Any suggestions much appreciated.
    Thanks
    jacr

    Yes Sumit, It is a formvalue(created using personalization). Since in the existing page these values are not available as formValues, I created 2 formvalues using personalization and set the VO attributes accordingly.
    Thanks!

  • Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API. This is a serious error and contributes to an overall degradation of system stability and reliability. This notice is a courtesy

    Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API. This is a serious error and contributes to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.

    This console log is a note to the developers of whatever application you are using. You can safely ignore it.

  • Apex 3.2, How to use an onchange event with Popup Key LOV - it ignores me.

    Hoping there is a simple solution to this.
    Using Apex 3.2 with a simple form with a few fields. When the user selects a value from a Popup Key LOV, I want to fire a javascript onchange event and alter another field on the form.
    Seems simple enough, except that I can't figure out how to make the PopUp respond to onchange events. The default template seems to ignore javascript entered into the attribute fields that work in other form fields. I know this is simple do to for a select list - it works as expected there. A select list is not a good option because of the huge number of possible returned values.
    Even tried a different approach...to register the onchange event using the "addLoadEvent" with this code (this also does not work):
    function setThisUp() {
    var x = document.getElementById('P105_CTR_ID');
    x.onClick = popupLovChanged;
    function popupLovChanged() {
    alert('OMG IT WORKS!');
    addLoadEvent(setThisUp);
    If any of you have some advice on how to make onchange work, it would be greatly appreciated.
    Thanks in advance
    -Rich

    For those still looking for a solution.
    I found that you can overwrite the default javascript function passback(x) in the popup lov's template, just add your function in the After Field Text field of the template
    e.g.
    <script> function passBack(x) {
    opener.document.getElementById('P2_PROGRAMME').value = x;
    opener.document.getElementById('P2_PROGRAMME').focus();
    close();
    } </script>
    this is going to populate the 'P2_PROGRAMME' field with selected value, and focus on it.
    in your case, just add the codes you want to run into the passback function.
    hope this helps

  • Popup KEY LOV in Interactive Report not work as expected

    Hello,
    in an Interactive Report, i have added in a Region a Popup Key LOV (Displays description, returns key value). This LOV works ok in other Forms. But in the Report item (Session State variable) instead of returning the Return Value of the LOV, it returns the Displayed Value (inspected the Session). How can i make it work as expected ?
    TIA

    At the moment, i am ok with all the functionality of the IR, which is finished. What i want is to use some extra items on the upper part of the page that aid the user to restict in large part the IR query result. Some of these are ideal candidates for LOVs - I want LOV to diplay the Display values and after user selection to return the Return value, either to page item or to other variable. How can i achieve this? Any idea? So far the LOV returns the display value in the Item AND session corresponding variable.

  • Popup key LOV

    I have a group of users who are able to remove or reinstate a field called source.
    Active sources are displayed in a report and inactive sources are displayed in another report both are shown on the same page.
    Active sources have a statusflag of 0 while the inactive sources have a statusflag of 1.
    These sources are used as LOV on a form as a popup key LOV.
    When the general user clicks on the popup to pick a LOV, the popup lists all the active and inactive sources.
    How do I have the popup LOV only display the active (or statusflag =0) sources?
    Thanks.

    >
    Greetings,
    How can I set a column in a tabular form to be a Popup Key LOV?
    Thanks
    Vatsa
    I asked the same question here before, but there seems to be some issues in apex concerning tabular forms. This is what I figured out so far:
    1. If you set the column attribute in a tabular form as a Popup LOV, it works, but it doesn't return the display value, but the key value back to the tabular form. On a regular form, a Popup Key LOV returns the display value. The fact that the display value isn't returned, made this solution useless to me.
    2. I tried to define the popup key lov in the query with this syntax: [http://download.oracle.com/docs/cd/E10513_01/doc/apirefs.310/e12855/apex_item.htm#CHDHJICI|http://download.oracle.com/docs/cd/E10513_01/doc/apirefs.310/e12855/apex_item.htm#CHDHJICI]. Then the Popup LOV did return the display value, but the Popup LOV for some reason references the wrong row! When you click the hour glass of the second row, the first row is affected, when you click the third row, the second row is affected, etc...
    You could start coding the whole popup behaviour, but for now, as far as I know, there is no possibility to use a Popup Key LOV on a tabular form in Apex. At least not without coding all the update logic yourself.

  • Popup Key LOV - Can you make the text black?

    Hi guys,
    If I use Display as "Popup Key LOV (Displays description, returns key Value)" , this LOV selection produces a text field that is read and has perfect functionality for my application .... if only the text were black instead of grey, which is harder to read.
    I've played around but had no luck. Is there any way of specifying this text as black?
    NT

    NT,
    Did you ever figure out how to fix your problem? I have the same issue.
    In Firefox I can change the text color to red with - style="color:red".
    This has no impact in IE though. I just want to make it look the
    same as the other text on the screen.

  • Change font color in the Text Field of a Popup Key LOV

    Hello,
    I have a question concerning Popup Key LOV.
    I want to change the font color in the Text Field of the Popup Key LOV Item.
    I searched the forum but I cannot find an answer about this! Although I searched the CSS and the Popup Key LOV Template, but I do not know where to modify the font color.
    Has anyone an idea how to solve that problem?
    Regards,
    Tim

    Hey,
    thank for your reply!
    I use style="color:#000000;" and it work in Firefox, but not in Internet Explorer 7.0!
    And that is not the first time, that there are differences in displaying those tags in the HTML Form Element Attributes and in css files, etc.
    Does anybody know I to solve that?
    Thank you,
    Tim

  • Form error Invalid numeric value 06-Jun-13 for column FECHA_CAPTURA

    hi,
    i have an APEX form that updates a table. The form items were created autmatically from the table fields. The 3rd field is a date field and therefore the corresponding date field on the form has a calender icon on its right side. i choose a date from this calender and when i hit the update button i receive this message:
    Invalid numeric value 06-Jun-13 for column FECHA_CAPTURA
    any ideas?

    Hi,
    Could we get you to change 1010319 to a meaningful handle -- I'm Howard.
    In order to give helpful answers, we usually need more information including as much relevant information as possible upfront. This should include:
    Full APEX version
    Full DB/version/edition/host OS
    Web server architecture (EPG, OHS or APEX listener/host OS)
    Browser(s) and version(s) used
    Theme used
    Template(s) used / modified -- (Revelant/important for some problems.)
    Region/item type(s)
    and more detail about what you want to do.
    Are you using ARP (Automatic Row Processing)?
    Do you do any validations?
    Could you make a trival 1-page application on apex.oracle.com duplicating the problem there?
    Howard

  • POPUP key lov stopped working in "Imported" application.

    Hi ,
    I have a perfectly running APEX application. For some testing purpose I exported the application and again "Imported" the application in same server.
    But in the new application, POPup KEY LOV stopped working, i.e. if I press popup lov icon nothing appears, only "#" gets added to URL.
    But the strange thing is If I create new page and use some POPup Key lov item then, it works fine.
    APEX Version :  4.2.1.00.08
    Theme : Theme 23 (Uniframe 23)

    Check your browser console for errors

Maybe you are looking for