Need To Check For Nulls And Force A Date

I'm trying to check to see if a field is blank (null or blank), if so, force a date into it.  My formula is giving me zeros.  What is wrong with the below formula ?
If {Sales_Primary.Type_Of_Sale} = 1  And
   Isnull()  Then 1999-01-01

My bad. I don't think Date Time fields have "empty strings" but rather 0's instead.
Try replacing the ="" with =0
If {Sales_Primary.Type_Of_Sale} = 1 And
(Isnull({TableName.Sales_Date}) OR {TableName.Sales_Date} = 0) Then #1/1/1999#
Or you could simply try it without the "OR {TableName.Sales_Date} = 0" and see what you get.
If {Sales_Primary.Type_Of_Sale} = 1 And
Isnull({TableName.Sales_Date}) Then #1/1/1999#
Jason

Similar Messages

  • Check for null and empty - Arraylist

    Hello all,
    Can anyone tell me the best procedure to check for null and empty for an arraylist in a jsp using JSTL. I'm trying something like this;
    <c:if test="${!empty sampleList}">
    </c:if>
    Help is greatly appreciated.
    Thanks,
    Greeshma...

    A null check might not be you best option.  If your requirement is you must have both the date and time component supplied in order to populate EventDate, then I would use a Script Functoid that takes data and time as parameters.
    In the C# method, first check if either is an empty string, if so return an empty string.
    If not, TryParse the data, if successful, return a valid data string for EventDate.  If not, error or return empty string, whichever satsifies the requirement.

  • Checking for nulls

    I have a string variable and I need to check for null.
    What is the best way to do this?
    Thanks.

    You can also do it like this:
    } catch (NullPointerException e) {or like this:
    s==null ? <...> : <...>

  • Check for null or empty in the functoid

    I want to check for null and empty values on input source node. If there exists a null or empty in the input source node, I should not pass that to output destination node. Does the
    following attachment work? I want to check for null or empty in the date and time and then concatenate them to send to output. If any of them is null or empty, the other should not fail. In the Not Equal Functoid I am checking for blank, but how to check for
    null?

    A null check might not be you best option.  If your requirement is you must have both the date and time component supplied in order to populate EventDate, then I would use a Script Functoid that takes data and time as parameters.
    In the C# method, first check if either is an empty string, if so return an empty string.
    If not, TryParse the data, if successful, return a valid data string for EventDate.  If not, error or return empty string, whichever satsifies the requirement.

  • I have installed itunes 10.7 several times.  All goes well.  After reboot, I go into itunes and check for updates and it says I need to download the update 10.7! (And so cant sync with my Iphone)

    I have installed itunes 10.7 several times, all goes well. After reeboot, I go to check for updates and it still wants to update to version 10.7! I cant sync to my iphone4 because I get an error message saying I need version 10.6.3 or later. Help

    Thank you for getting me started on the track by mentioning "Revo" Uninstaller.  The results of "Revo" spoke volumns on why a successful install of ITunes is so difficult to achieve.  It is the evil "BONJOUR".
    I then tripped upon the following site by Apple and the detailed directions (I read, printed, re-read and followed the instructions.  It was intense) brought a successful ITunes, Quick Time and the lovely Bonjour home.  Thank you for the start JD42.
    http://support.apple.com/kb/HT1923

  • I don't know why whenever i choose " check for updates " and download itunes 11.1 , it never shows any downloads , and i need itunes 11.1 so i can restore my iphone again .. help please

    I don't know why whenever i choose " check for updates " and download itunes 11.1 on my desktop , it never shows any downloads .. even when i tried downloading it from the website, and i need itunes 11.1 so i can restore my iphone again .. help please

    When you see a beachball cursor or the slowness is especially bad, note the exact time: hour, minute, second.  
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    Each message in the log begins with the date and time when it was entered. Scroll back to the time you noted above.
    Select the messages entered from then until the end of the episode, or until they start to repeat, whichever comes first.
    Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • ViewCriteriaRow attribute to check for null or not null

    I Want to apply a view criteria to check for null or not null on a column , i see examples on how to set for value like
    vcRow.setAttribute("Sal", "> 2500")but i need to check for Sal is null or not null ,
    tried vcRow.setAttribute("Sal", null) and it is not working
    and vcRow.setAttribute("Sal", "is null") gives me error .
    can somebody help with correct syntax for this
    Thanks for your time

    looks like vcRow.setAttribute("Sal", "null") works

  • 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

  • How to check for null values in bpel?? Please Help! very urgent!!!

    Hello Guys,
    I have a problem. I have an external webservice to which I have to post my request. My task is to create an Webservice and Service Assembly to which others would post request and get response. I have to create SA to deploy onto the bus.
    The problem is that there are optional elements in the request and response xsd's. In the Response sometimes certain feilds may come or they may not. for Example:- my response could contain a tag like this <firstName></firstName>
    I have to copy these feilds in my bpel process from one variable to another.(like in the mapper).
    My Question is , Is there any way in BPEL process or BPEL mapper where I could Check for null values in the request or response???
    Your inputs would be very helpful.
    Thanks
    Rajesh

    Thanks for replying man :)
    Ok I will be more clear.
    Here is a snippet of one of the xsd's that I am using.
    <xs:element name="returnUrl" nillable="false" minOccurs="0">
                        <xs:annotation>
                             <xs:documentation>Partner specifies the return URL to which responses need to be sent to, in case of
    Async message model.
    </xs:documentation>
                        </xs:annotation>
                        <xs:simpleType>
                             <xs:restriction base="xs:anyURI">
                                  <xs:maxLength value="300"/>
                                  <xs:whiteSpace value="collapse"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
    This means that the return URL field can be there or it may not be there. But if it is there it cant be null because nillable=false. But the whole <returnURL> </returnURL> can be there or it may not be there because minOccurs=0.
    My requirement is , if returnURL is there in the response with a value, then in my BPEL mapper I should map it else I should not map it.
    Thats the issue.
    and Yes kiran, the node be non-existant.
    So can you please help me with this.
    Thanks
    Rajesh

  • Page Validation - Function Returning Boolean - Check for NULL

    I have 3 Page Validations which all fire on "When Button Pressed" = "Submit".
    <br><br>
    Number 1 is of type "Item specified is NOT NULL" for "P199_BUSINESS_UNIT1".
    <br>
    Number 2 is of type "Item specified is NOT NULL" for "P199_BUSINESS_UNIT2".
    <br>
    Number 3 is of type "Function Returning Boolean" and has the following code:
    <br><br>
    IF :P199_BUSINESS_UNIT1 IS NULL   AND
       :P199_BUSINESS_UNIT2 IS NULL  THEN
        RETURN FALSE ;
    ELSE
        RETURN TRUE  ;
    END IF ;<br>
    When P199_BUSINESS_UNIT1 is NULL and P199_BUSINESS_UNIT2 is NOT NULL, I get the Error from Validation 1. Perfect.
    <br>
    When P199_BUSINESS_UNIT1 is NOT NULL and P199_BUSINESS_UNIT2 is NULL, I get the Error from Validation 2. Perfect.
    <br>
    When P199_BUSINESS_UNIT1 is NOT NULL and P199_BUSINESS_UNIT2 is NOT NULL, I don't get an Error Message. Perfect.
    <br><br>
    When P199_BUSINESS_UNIT1 is NULL and P199_BUSINESS_UNIT2 is NULL, I get Error Message 1 & 2, <strong>but nothing from 3.</strong>
    <br><br>
    If I change the code to:
    <br><br>
    IF :P199_BUSINESS_UNIT1 = '01'   AND
       :P199_BUSINESS_UNIT2 = '01'  THEN
        RETURN FALSE ;
    ELSE
        RETURN TRUE  ;
    END IF ;<br>
    and change both values to '01', I get the appropriate Error Message.
    <br><br>
    What is going on? Is there some reason I can't check for NULL in a Function Returning Boolean?

    Scott,
    <br><br>
    Instead of adding the Validations, I changed my code from:
    <br><br>
    IF :P199_BUSINESS_UNIT1 IS NULL   AND
       :P199_BUSINESS_UNIT2 IS NULL  THEN
        RETURN FALSE ;
    ELSE
        RETURN TRUE  ;
    END IF ;
    <br>to the following and got the desired results:
    <br><br>
    IF  REPLACE(:P199_BUSINESS_UNIT1,<strong>'%null'</strong> || '%',NULL) IS NULL   AND
        REPLACE(:P199_BUSINESS_UNIT2,<strong>'%null'</strong> || '%',NULL) IS NULL  THEN
        RETURN FALSE ;
    ELSE
        RETURN TRUE  ;
    END IF ;<br>
    Note that I changed the word REPLACE to upper case and the second occurrence of the word NULL to upper case to accentuate the fact that the '%null' is case sensitive, using "%NULL' does not work, it has to be "%null' in lower case.
    <br><br>
    <strong>Thanks for your help.</strong>

  • How do I check for null date entires using custom JScript on a SharePoint NewForm.aspx?

    Hi,
    I have the below JScript:
    /*Function to convert the US Date format to UK date format */
    function parseDate(input) {
    var parts = input.split('/');
    // new Date(year, month [, date [, hours[, minutes[, seconds[, ms]]]]])
    return new Date(parts[2], parts[1]-1, parts[0]); // months are 0-based
    /*Function to check if end date is before the start date */
    function checkDates(){
    var sd = parseDate($("input[title='From']").val());
    var ed = parseDate($("input[title='Until']").val());
    if(sd > ed) {
    alert("Please check From and Until Date");
    $("input[value$='Save']").attr('disabled', true); //hide save button
    else
    $("input[value$='Save']").attr('disabled', false); //show save button
    The above works fine for checking sd > ed but I can't seem to check for null's, I have attempted the below which doesn't work:
    /*Function to convert the US Date format to UK date format */
    function parseDate(input) {
    var parts = input.split('/');
    // new Date(year, month [, date [, hours[, minutes[, seconds[, ms]]]]])
    return new Date(parts[2], parts[1]-1, parts[0]); // months are 0-based
    /*Function to check if end date is before the start date */
    function checkDates(){
    var sd = parseDate($("input[title='From']").val());
    var ed = parseDate($("input[title='Until']").val());
    if( (sd > ed) || (sd == null) || (ed == Null) ) {
    alert("Please check From and Until Date");
    $("input[value$='Save']").attr('disabled', true); //hide save button
    else
    $("input[value$='Save']").attr('disabled', false); //show save button
    Any help appreciated.

    Hi aspnet-scotland,
    Please post ASP.NET related questions in
    ASP.NET forums where you could receive better responses.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Checking for null value in arraylist

    Hi
    i have an excel file which i i am reading into an arraylist row by row but not necesarrily that all columns in the row mite be filled. So how do i check for null values in the array list.
    try
                        int cellCount = 0;
                        int emptyRow = 0;
                        HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(file));
                        HSSFSheet sheet = workbook.getSheetAt(0);
                        Iterator rows = sheet.rowIterator(); 
                        myRow = new ArrayList();
                        int r = 1;
                             while (rows.hasNext())
                                  System.out.println("Row # " + r);
                                  HSSFRow row = (HSSFRow) rows.next();
                                  Iterator cells = row.cellIterator();          
                                  cellCount = 0;
                                  boolean isValid = false;
                                  while (cells.hasNext())
                                       HSSFCell cell = (HSSFCell) cells.next();
                                       switch (cell.getCellType())
                                            case HSSFCell.CELL_TYPE_NUMERIC:
                                                 double num = cell.getNumericCellValue();     
                                                 DecimalFormat pattern = new DecimalFormat("###,###,###,###");     
                                                 NumberFormat testNumberFormat = NumberFormat.getNumberInstance();
                                                 String mob = testNumberFormat.format(num);               
                                                 Number n = null;
                                                 try
                                                      n = pattern.parse(mob);
                                                 catch ( ParseException e )
                                                      e.printStackTrace();
                                                 System.out.println(n);
                                                 myRow.add(n);                                             
                                                 //myRow.add(String.valueOf(cell.getNumericCellValue()).trim());
                                                 //System.out.println("numeric: " +cell.getNumericCellValue());
                                                 break;
                                            case HSSFCell.CELL_TYPE_STRING:
                                                 myRow.add(cell.getStringCellValue().trim());
                                                 System.out.println("string: " + cell.getStringCellValue().trim());
                                                 break;
                                            case HSSFCell.CELL_TYPE_BLANK:
                                                 myRow.add(" ");
                                                 System.out.println("add empty:");
                                                 break;
                                       } // end switch
                                       cellCount++;
                                  } // end while                    
                                  r++;
                             }// end while
                   } myRow is the arrayList i am adding the cells of the excel file to. I have checked for blank spaces in my coding so please help with how to check for the black spaces that has been added to my arraylist.
    I have tried checking by looping through the ArrayList and then checking for null values like this
    if(myRow.get(i)!=null)
      // do something
    // i have tried this also
    if(myRow.get(i)!="")
    //do something
    }Edited by: nb123 on Feb 3, 2008 11:23 PM

    From your post I see you are using a 3rd party package to access the Excel SpreadSheets, you will have to look in your API for you 3rd party package and see if there is a method that will identify a blank row, if there is and it does not work, then you have to take that problem up with them. I know this is a pain, but it is the price we pay for 3rd party object use.
    In the mean time, you can make a workaround by checking every column in your row and seeing if it is null, or perhaps even better: check and see if the trimmed value of each cell has a lenth of 0.

  • My MacBook Pro is running VERY slow. I am constantly getting pop-ups and now I got one that says my computer may be infected. What do I do to check for viruses and or remove them if there is one?

    What do I do to check for viruses and or remove them if there is one? I have never had a problem with my mac until now. It is running VERY slow

    This is what it came up with.... any ideas?
    EtreCheck version: 1.9.11 (43) - report generated May 27, 2014 at 11:07:36 PM CDT
    Hardware Information:
              MacBook Pro (15-inch, 2.53GHz, Mid 2009)
              MacBook Pro - model: MacBookPro5,4
              1 2.53 GHz Intel Core 2 Duo CPU: 2 cores
              4 GB RAM
    Video Information:
              NVIDIA GeForce 9400M - VRAM: 256 MB
    System Software:
              OS X 10.9.3 (13D65) - Uptime: 1 day 23:26:50
    Disk Information:
              Hitachi HTS545025B9SA02 disk0 : (250.06 GB)
                        EFI (disk0s1) <not mounted>: 209.7 MB
                        Macintosh HD (disk0s2) / [Startup]: 249.2 GB (20.75 GB free)
                        Recovery HD (disk0s3) <not mounted>: 650 MB
              MATSHITADVD-R   UJ-868 
    USB Information:
              Apple Inc. Built-in iSight
              Apple Internal Memory Card Reader
              Apple Inc. Apple Internal Keyboard / Trackpad
              Apple Computer, Inc. IR Receiver
              Apple Inc. BRCM2046 Hub
                        Apple Inc. Bluetooth USB Host Controller
    Gatekeeper:
              Anywhere
    Kernel Extensions:
              [not loaded] com.rim.driver.BlackBerryUSBDriverInt (0.0.39) Support
              [not loaded] com.rim.driver.BlackBerryUSBDriverVSP (0.0.39) Support
    Problem System Launch Daemons:
              [failed] com.apple.wdhelper.plist
    Launch Daemons:
              [loaded] com.adobe.fpsaud.plist Support
    User Launch Agents:
              [loaded] com.adobe.ARM.[...].plist Support
              [loaded] com.macpaw.CleanMyMac.helperTool.plist Support
              [loaded] com.macpaw.CleanMyMac.trashSizeWatcher.plist Support
              [loaded] com.macpaw.CleanMyMac.volumeWatcher.plist Support
              [running] com.whitesmoke.uploader.plist Support
    User Login Items:
              iTunesHelper
              AdobeResourceSynchronizer
    Internet Plug-ins:
              JavaAppletPlugin: Version: 14.9.0 - SDK 10.7 Check version
              FlashPlayer-10.6: Version: 13.0.0.214 - SDK 10.6 Support
              Default Browser: Version: 537 - SDK 10.9
              AdobePDFViewerNPAPI: Version: 11.0.06 - SDK 10.6 Support
              AdobePDFViewer: Version: 11.0.06 - SDK 10.6 Support
              Flash Player: Version: 13.0.0.214 - SDK 10.6 Support
              QuickTime Plugin: Version: 7.7.3
              Silverlight: Version: 5.1.10411.0 - SDK 10.6 Support
              iPhotoPhotocast: Version: 7.0
    Safari Extensions:
              WhiteSmoke: Version: 1.0.0.1
              Vidx: Version: 2.0
              DivX Plus Web Player HTML5 <video>: Version: 2.1.2.145
    Audio Plug-ins:
              BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
              AirPlay: Version: 2.0 - SDK 10.9
              AppleAVBAudio: Version: 203.2 - SDK 10.9
              iSightAudio: Version: 7.7.3 - SDK 10.9
    iTunes Plug-ins:
              Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
    User Internet Plug-ins:
              Move-Media-Player: Version: npmnqmp 071801000001 Support
              fbplugin_1_0_1: Version: (null) Support
    3rd Party Preference Panes:
              Flash Player  Support
    Time Machine:
              Time Machine not configured!
    Top Processes by CPU:
                  12%          DashboardClient
                   6%          coreaudiod
                   6%          WindowServer
                   5%          repair_packages
                   3%          VLC
    Top Processes by Memory:
              549 MB          repair_packages
              143 MB          com.apple.WebKit.WebContent
              131 MB          Safari
              119 MB          installd
              94 MB          mds_stores
    Virtual Memory Information:
              809 MB          Free RAM
              1.82 GB          Active RAM
              224 MB          Inactive RAM
              630 MB          Wired RAM
              3.66 GB          Page-ins
              207 MB          Page-outs

  • Can't check for nulls in a conditional?

    Hey everyone. Trying my hand at a text based game but I'm encountering many problems:
    I have this method in one class that (as you can see) has a conditional that checks to see if 'check' is null, this throws a null pointer exception whenever it is called.
    private void placeChars()
            String check = currentItem.getItemString();
            if(check.equals(null) && currentRoom.getShortDescription().equals("in the cafeteria"))
                josh.getSentence(0);
        }Here is the method that it is calling from:
    public String getItemString()
            String returnString = null;
            if(haveItems != 0 ){
            returnString = "Items:";
            Set<String> keys = items.keySet();
            for(String item : keys) {
                returnString += " " + item;
        return returnString;
        }I'm not sure what I am doing wrong here :/ and yes I know the code is extremely ugly :)

    if check is null, you can't invoke any methods on it, including equals.
    To check for null:
    if (check == null)

  • Check for null in IF statement

    Hi,
    I have a variable of type char(8).
    I want to check if this field is empty. This is the logic I use right now:
    condense lv_date no-gaps.
    if lv_date eq ''.
    *then some default value
    endif.
    Is this the correct approach or there is a way to directly check for null values in a variable.
    Thanks,
    CD

    Hello,
    You have to check IS INITIAL.
    condense lv_date no-gaps.
    if lv_date IS INITIAL.
    *then some default value
    endif.
    BR,
    Suhas

Maybe you are looking for

  • Main Screen shortcuts, Is there a way to change?

    Hello, just got my BB Cruve and i love it! I was wondering one thing, i selected then L theam but was wondering if there is a way to change the main screen links that run down there left side and bottom to point to something else, 1 defaul like is th

  • Measuring Line Width Of Composed Text

    Hi, In the solutions.pdf of the CS4 SDK, there is a piece of code listed in example 9 that will estimate the width of the text. I tried implementing it as a snippet but upon compiling the code in xcode, I get an invalid static_cast from type IFontIns

  • CAT2 Transaction & Save button

    Hello, When I'm entering data into the CAT2 transaction and I click over Save button, the screen "jumps" to initial SAP screen (SESSION_MANAGER). Can I avoid this? Thanks! Miguel Angel.

  • Relation between rebate recipient & cust on which cond record maintained

    Hi, Please may i know the relation between rebate recipient and customer on which condition record is maintained. Because I have maintained rebate recipient and customer on which record is maintained as different from each other. and when i create sa

  • Version Cue with Dreamweaver

    How am I supposed to use Version Cue CS3 with Dreamweaver CS3. Am I supposed to install VC on the production server? I imported a web site as a project but what am I supposed to do now. Also I have the Mac version of CS3, can I still install windows