Null values in Numeric fields of Datasets

I am wondering if anyone has run into this problem before and
checking to see if anyone has an elegant solution.
I have a rather large data set. (actually 5 of them on a
single page) I am sorting certain columns in a table as numbers so
i assign the variable " ds1.setColumnType("somenumbercolumn",
"number")" In most cases Spry works great and it sorts by numbers
properly. The problem is some of the fields in the XML file are
null and I am trying to sort them as a number. Spry actually
adjusts for this (as far as i can tell) and treats them like a 0
which isn't exactly ideal considering there are real zero values in
the data. I know spry doesn't currently format numbers:
So here is my question. Does anyone one have a solution to
fixing null values in a table so that it is still sortable but
doesn't display a "0" and instead displays something like "--" or
whatever. I have the option of editing the XML file as well, but I
still need the table to sort by number.
If not null values, how about non numeric fields which can
still be sorted in a numeric column?

Hi,
We have an old post that raised a similar problem with yours.
The post can be found
here
For you situation, you should add an if condition for the
rows that have 0 and to add a custom string instead 0.
for (var i = 0; i < numRows; i++)
if(rows
[ "field_name"] == 0)
rows[ "field_name" ] = '--';
Hope this helps you,
Diana

Similar Messages

  • How does APEX check for null values in Text Fields on the forms?

    Hello all,
    How does APEX check for null values in Text Fields on the forms? This might sound trivial but I have a problem with a PL/SQL Validation that I have written.
    I have one select list (P108_CLUSTER_ID) and one Text field (P108_PRIVATE_IP). I made P108_CLUSTER_ID to return null value when nothing is selected and assumed P108_PRIVATE_IP to return null value too when nothign is entered in the text field.
    All that I need is to validate if P108_PRIVATE_IP is entered when a P108_CLUSTER_ID is selected. i.e it is mandatory to enter Private IP when a cluster is seelcted and following is my Pl/SQL code
    Declare
    v_valid boolean;
    Begin
    IF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := FALSE;
    ELSIF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := FALSE;
    END IF;
    return v_valid;
    END;
    My problem is it is returning FALSE for all the cases.It works fine in SQL Command though..When I tried to Debug and use Firebug, I found that Text fields are not stored a null by default but as empty strings "" . Now I tried modifying my PL/SQL to check Private_IP against an empty string. But doesn't help. Can someone please tell me how I need to proceed.
    Thanks

    See SQL report for LIKE SEARCH I have just explained how Select list return value works..
    Cheers,
    Hari

  • Non numeric value in numeric field giving error

    Hi All
    I am using BAPI for creating sales order. If user is giving non numeric value in Quantity field it is giving error. Because quantity field data type is Double.
    Please Help.
    Thanks
    Raktim

    Hi Banerjee,
                 Create a String/int/long Context variable and point it to UI Input element.Do the validation  for correct input value. once the validation is succesful assign that value to RFC BigDecimal variable by Explicit casting.
    Hope this might solve your problem .
    Thanks
    Madhan

  • Null value in Datetime field

    I have a form that inserts data, but the date fields are getting a default value (1/1/1900 12:00:00 AM) even though I don't insert a value for that field. How would I insert a NULL value in the datatime fields in MSSQL.instead of the default value (1/1/1900 12:00:00 AM) that gets inserted?
    Here is my insert statement.
    <CFLOCK type="exclusive" timeout="10">
        <CFQUERY name="InsertWorkflow"
              datasource="#request.app.DSN#"
              username="#request.app.bsruser#"
              password="#request.app.bsrPassword#">
            INSERT INTO #request.app.DB#.v_NAR_WorkFlowLog
            ([SatApp_ID]
               ,[User_ReqApproval_Logon]
               ,[User_ReqApproval_Date]
               ,[Admin_ReqProcessed_Logon]
               ,[Admin_ReqProcessed]
               ,[Prelim_Approval_Level]
               ,[Prelim_Approval_Date]
               ,[Prelim_Approval_Explain]
               ,[Req_Withdrawn_Date]
               ,[Req_Withdrawn_Explain]
               ,[Req_Denied_Date]
               ,[Req_Denied_Explain]
               ,[User_Req_FinalAppl_Date]
               ,[Admin_FinalAppl_Date]
               ,[DateLastUpdated]
               ,[UpdatedBy])           
            VALUES
               (#SatApp_ID#
               ,'#User_ReqApproval_Logon#'
               ,'#User_ReqApproval_Date#'
               ,'#Admin_ReqProcessed_Logon#'
               ,'#Admin_ReqProcessed#'
               ,'#Prelim_Approval_Level#'
               ,'#Prelim_Approval_Date#'
               ,'#Prelim_Approval_Explain#'
               ,'#Req_Withdrawn_Date#'
               ,'#Req_Withdrawn_Explain#'
               ,'#Req_Denied_Date#'
               ,'#Req_Denied_Explain#'
               ,'#User_Req_FinalAppl_Date#'
               ,'#Admin_FinalAppl_Date#'
               ,'#DateLastUpdated#'
               ,'#UpdatedBy#')                              
        </CFQUERY>
    </CFLOCK>
    Thanks,
    Shearak

    Would CFQueryParam work? For example:
    <cfqueryparam cfsqltype="CF_SQL_DATE" value="#DateLastUpdated#" null = "#YesNoFormat(NOT Len(Trim(DateLastUpdated)))#">
    So, using your given example, your insert would be:
    <CFLOCK type="exclusive" timeout="10">
        <CFQUERY name="InsertWorkflow"
              datasource="#request.app.DSN#"
              username="#request.app.bsruser#"
              password="#request.app.bsrPassword#">
            INSERT INTO #request.app.DB#.v_NAR_WorkFlowLog
            ([SatApp_ID]
               ,[User_ReqApproval_Logon]
               ,[User_ReqApproval_Date]
               ,[Admin_ReqProcessed_Logon]
               ,[Admin_ReqProcessed]
               ,[Prelim_Approval_Level]
               ,[Prelim_Approval_Date]
               ,[Prelim_Approval_Explain]
               ,[Req_Withdrawn_Date]
               ,[Req_Withdrawn_Explain]
               ,[Req_Denied_Date]
               ,[Req_Denied_Explain]
               ,[User_Req_FinalAppl_Date]
               ,[Admin_FinalAppl_Date]
               ,[DateLastUpdated]
               ,[UpdatedBy])           
            VALUES
               (#SatApp_ID#
               ,'#User_ReqApproval_Logon#'
               ,'#User_ReqApproval_Date#'
               ,'#Admin_ReqProcessed_Logon#'
               ,'#Admin_ReqProcessed#'
               ,'#Prelim_Approval_Level#'
               ,'#Prelim_Approval_Date#'
               ,'#Prelim_Approval_Explain#'
               ,'#Req_Withdrawn_Date#'
               ,'#Req_Withdrawn_Explain#'
               ,'#Req_Denied_Date#'
               ,'#Req_Denied_Explain#'
               ,'#User_Req_FinalAppl_Date#'
               ,'#Admin_FinalAppl_Date#'
               ,<cfqueryparam cfsqltype="CF_SQL_DATE" value="#DateLastUpdated#" null = "#YesNoFormat(NOT Len(Trim(DateLastUpdated)))#">           ,'#UpdatedBy#')                              
        </CFQUERY>
    </CFLOCK>

  • How do I add auto text based on value in numeric field?

    Need help... I'm trying to add auto text to a text field based on a value in a numeric field. I want my text field (summary box) to say "Passed" if the value (score box) is equal to 10 and the field to say "Not Passed" if the value is equal to less than 10. My numeric field is being calculated by selecting drop-down lists.
    Thanks in advance for your help.
    Ed Watson
    Here's a link to the document I created...
    https://files.acrobat.com/?trackingid=KGLIT#folder/c3106c32-2e69-4a5f-8ef2-94d25623dbfb

    I think I figured it out.  I used the following script:
    if(NumericField1.rawValue ==1){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==2){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==3){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==4){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==5){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==6){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==7){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==8){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==9){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==10){TextField1.rawValue = "Passed"}
    There's probably a cleaner way to do the same thing but at least this works for now.  Hope this helps someone else.

  • Cannot update table data based on values of numeric fields

    I have a button on a form with two numeric fields: P11_numeric1 and P11_numeric2.
    I want to be able to either run a stored procedure or execute the update logic. We're on apex 4.0.
    I tried the follow syntax in a process run by a button:
    begin
    schema.procname(:P11_numeric1,:P11_numeric2);
    end;
    And nothing happened.
    If I try to run the proc in toad with hard coded parameter values, the proc works.
    I tried this:
    begin
    update schema.tablename
    set value=:P11_numeric1
    where id=:P11_numeric2;
    commit;
    end;
    And this doesn't work.
    I tried:
    begin
    update schema.tablename
    set value=1
    where id=2;
    commit;
    end;
    And that worked, so I assume the issue is with getting the numeric field values. Am I using incorrect syntax?

    I'm on apex 4.0.2 btw. I had two main problems: 1) the process that my procedure was in was in a sequence number lower than the MRU process sequence number. I didn't want to use the MRU so I changed it to being called by ajax calls only (which I don't have on the page, effectively not firing this process on page submit). Changing the sequence number of the process call to the procedure higher then allowed me to run the stored procedure.
    The next problem was that the fields weren't being passed into the proc.
    It looks like the type of the field made a bit of a difference to sending in the parameter for the procedure. The data is either integer or numeric and if the fields were set to a text field, and the proc was changed to accept varchar2 data and convert using to_number in the proc that the data was accepted and was fine. For the integer fields, I was able to (and wanted to) change the field type to display only as this is a read only screen with an button to save the data. For the numeric fields, for some reason the display field type did not allow the field value to be passed to the stored proc.
    I'll take a look at the session values not getting set but has anyone heard of that happening to display only fields with numeric data specifically?

  • Check for null value for Date Field

    Hello everyone,
    I have a database that consist of date field and also a bean that will able to access the db.
    here are my example:-
    private int setDate(int date) {
    this.date = date;
    private void getDate {
    return date;
    later, I entered a date value and wanna check whether the date is on the database or not. SO, do you all have any idea?

    Perhaps before passing your date off to a primitive int, you could pass it to an [Integer] object. Then check to see if that object is null;
    Integer d = new Integer(int value);
    if (d == null) {
    }

  • User Created in OIM 11.1.1.5 with null value for mandatory field.

    Hi,
    We had updated one UDF as mandatory field on OIM user form. We can see the * in front of that field. Now if we create the user using web console (Using UI), we are not able to create the user without giving some value in that UDF as it is mandatory. However if we created the user with UDF value as null using Trusted recon, User sucessfully created in OIM. I had attached the screen shot for that user which create in OIM with UDF value as null.
    Is any thing else also need to do to make UDF as mandatory field.
    Regards,
    Sid

    I am not sure this is a bug. Such mandatory checks will often only apply to administrative changes from the GUI. You may not always be able to enforce the same quality of data in reconciled data as you wish to impose for changes made through OIM, and it may prove an issue in some cases if such users could not be reconciled. In this case the use will go into OIM, but you will be forced to populate a value in the mandatory field if you later try to update them in OIM.

  • How to check decimal value in numeric field

    Is there any way to find number of decimal digit is being used.
    999.444
    444.45
    344.23
    33.666666666666
    Query provide rusult after the decimal value.
    thanks.

    user-Keen wrote:
    Query provide rusult after the decimal value.
    thanks.
    your_col - trunc(your_col)Do you have negative numbers?
    For negative values what do you want to display?
    If just the decimal part, you could use ABS(col) - trunc(ABS(col))
    Edited by: jeneesh on Apr 4, 2013 3:29 PM

  • Removing Null values from character string

    Hi All,
    Can i remove NULL values (hexadecimal - 0000) from character string. I am uploading a file from presentation layer (shared server) and getting NULL values in many fields which i want to remove.
    please assist.
    Thanks for you help..
    Regards,
    Mohaiyuddin

    Hi,
    Most likely, nobody needed it, but if anybody in future will need the solution for related problem  - here's solution:
    data: lv_nullchar type xstring value '0'.
    shift lv_xstring right deleting trailing lv_nullchar in byte mode.
    shift lv_xstring left deleting leading lv_nullchar in byte mode.
    This hack deleting null chars in lv_xstring at end file and at begining of file. Works perfect for me, where i also worked with files.

  • JDBC Receiver Adapter with Null Value

    HI,
    I have configured ID for JDBC Receiver. In my communication channel, I already check Integration of Empty String Values = Null Value. However, when I check the result from audit log, it still shows that SAP XI sends the null value to database. In my understanding, it should not send the field which has null value (It shouldn't be included in sql statement).
    I check this with other scenario. With the same check at Integration of Empty String Values = Null Value, it doesn't send null value to database. It happens only with my first scenario.
    Have anyone ever been through this before? Any suggestion please?
    Thanks,
    Pavin

    Hi,
    1. The occurrence is 0...1
    2. This is the first result with null value (Please see field Error)
    UPDATE EXPCRM_T_CustomerProfile SET RequestID=455, RecordNo=1, SAPCustomerCode=0001000344, Error=NULL, Status=2, UpdateDateTime=12/03/2008 13:45:03 WHERE (RequestID=455 AND RecordNo=1)
    Then, I change the option from Null Value to Empty string. This is the result.
    UPDATE EXPCRM_T_CustomerProfile SET RequestID=455, RecordNo=1, SAPCustomerCode=0001000344, Error=', Status=2, UpdateDateTime=12/03/2008 13:46:12 WHERE (RequestID=455 AND RecordNo=1)
    Field Error Change from NULL to '
    The expected result from me is that field Error should not exist at all. Please help.
    Thanks,
    Pavin

  • Error in when null values are passed to datefield

    Hi all,
    We are facing some issue with null values in date fields while calling a stored procedure using JDBC Adapter in one of the interfaces.
    When the value is null, XI gives errors in the communication channel.
    Case 1 , When the value is mapped to blank. : The adapter gives an error related to date format. Unsparseable date “”.
    Case 2 , When the value is not mapped at all : The adapter gives an error related to wrong number of arguments for the stored procedure.
    One option for fixing this issue is to hardcode the value to all zeros in a appropriate date format. However this is not acceptable in our case.
    Did anybody face this issue before. If yes what was the approach taken. Can you please let me know if anybody has any inputs on this.
    Thanks in advance,
    Younus

    you can clear the field key tags mandatory in the XML Schema interpreter parameter and make the Empty string value to Empty string from null value.
    For mapping : you can pass a value that is of the same format of date; but you can take your own value in the database since you are parsing the date format from one to other
    thanks
    nikhil

  • BUG in handling of null-value="exception" with optimistic locking

    When commit failed due to value of a field with null-value="exception" being
    null JDO_LOCK get incremented and subsequent commits (after supplying valid
    not null value for the field) will fail with concurrent modification
    exception. This JDO_LOCK increment does not happen to the instance itself
    (or at least my test does not show it) but to an instance to who's
    collection the instance in question belongs. For example
    We have Position, which have a collection of Addresses (inversion based
    collection)
    I am create a new Address, add it to Position collection commit it fails
    because one of the required fields of an Address is null. Every time I
    attempt commit and fail it will increment Position's JDO_LOCK

    I need to add that if I put throw JDOUserException in jdoPrestore() in case
    if the field in question is null (to avoid null-value="exception" check)
    everything works as expected no problems with JDO_LOCK is present
    "Alex Roytman" <[email protected]> wrote in message
    news:agklrf$brk$[email protected]..
    When commit failed due to value of a field with null-value="exception"being
    null JDO_LOCK get incremented and subsequent commits (after supplyingvalid
    not null value for the field) will fail with concurrent modification
    exception. This JDO_LOCK increment does not happen to the instance itself
    (or at least my test does not show it) but to an instance to who's
    collection the instance in question belongs. For example
    We have Position, which have a collection of Addresses (inversion based
    collection)
    I am create a new Address, add it to Position collection commit it fails
    because one of the required fields of an Address is null. Every time I
    attempt commit and fail it will increment Position's JDO_LOCK

  • Selection of Null Value in Transformation file

    Hi Guru's,
    I've been trying to select NULL values of a field in transformation file but unfortunately system always gets both null and filled values of the field ALTHOUGH i had maintained the Selection Option.
    Data management package is: Load Transaction Data from BW InfoProvider UI
    The technical name of field: 0FLAG
    I've tried each possibilities as in below
    SELECTION: 0FLAG, *STR()
    SELECTION: 0FLAG, *STR();
    SELECTION: 0FLAG, ""
    SELECTION: 0FLAG, " "
    SELECTION: 0FLAG, NULL
    SELECTION: 0FLAG, *STR(#)
    SELECTION: 0FLAG, #
    SELECTION: 0FLAG, "#"
    Doesn't work.
    thanks in adv. for your precious supports

    Hi Sadi,
    I understand your question that, you want to load tr. data from infocube and you have a trouble with one field which name is "0flag" in this cube, right? If your case is above, you need conversion file for flag, and convert like that # = "DUMMY" or sth.
    Or, you can solve in BW with transformation file routine.
    I hope, it will help you.
    Thanks.

  • QAAWS- Null Value Bunching Issue

    Post Author: joseph_atkinson
    CA Forum: Xcelsius and Live Office
    I  have created a very simple QAAWS xml that I am using in a Xcelcius report. I have a problem when I pull the data from the database. When the Xcelcius report pulls data, if there is a missing row, instead of leaving it blank, the rest of the data bunches up. i.e QAAWS table null 1 10 12 null 1 Xcelcius report 1 10 12 1 Is there a resolution to this?

    Post Author: amr_foci
    CA Forum: Xcelsius and Live Office
    you can use NVL to replace the null values of this field to Zero or any other values you want, you can make this at the universe level at this object select statement
    good luck

Maybe you are looking for

  • Photoshop CS2 suddenly not working

    I'm suddenly having troubles with my Photoshop CS2. I had uploaded the software onto my new laptop, Dell with Vista, and it has always worked fine. Suddenly, this message is popping up and I have no more use of Photoshop CS2: http://i19.photobucket.c

  • I can't remove Firefox 8 from control panel?

    I update Firefox8 to 9.1, but upon looking in control panel still said I had Firefox 8. Also, I had automatic update enabled and it never updated, so I therefore put it to manual. I was having Java issues that weren't resolved with Firefox and have d

  • Camera problems with iOS 7.1.1 upgrade

    Dear Apple, I had reservations about upgrading to iOS 7.1.1 and I held off for soooo long but when apps and videos were no longer supported on my previous platform I felt like I was being pushed to upgrade which I did 2 weeks ago. I have been since f

  • HP Scanjet g4050 software does not install under Windows 7 ultimate

    Hello During installation of the full software the file scan.msi is "not found", although it is present in the directory. What is wrong with this file?  Tried the installation several times Installation file: setup_full_G4050_14-5.exe, downloaded fro

  • Epson Stylus Pro and system resources. PowerMac G4 and iMac iSight

    Originally in Mac Pro discussions Hi Ned, If I may, I would like to extend the discussion regarding Macs and large format printers. At work we have a Stylus Pro 9000. On a G4 Power Mac 533Mhz/Panther/640MB RAM, the processing of jobs takes a very lon