Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Javascript: How to test for null

  1. #1
    Join Date
    Jun 2009
    Posts
    7

    Default Javascript: How to test for null

    Hi,

    I'm using nvl to test if a string is null i.e. if(Field8.nvl("0")) then set it to some value.
    I'm getting errors from pdi:
    Javascript error:
    TypeError: Cannot call method "nvl" of null (script#4)

    I tried length(), isNull() and if(Field8 == null) but got the same error messages.
    I'm know for sure Field8 is null. It does not make sense to me that these dont work.
    What am I missing here?

    TIA!

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    example attached

    Regards,
    Sven
    Attached Files Attached Files

  3. #3
    Join Date
    Jun 2009
    Posts
    7

    Default

    Thanks, Sven!
    I made some silly mistakes that prevented it from working.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.