Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Checking NULL and assigning constant

  1. #1

    Default Checking NULL and assigning constant

    Hi,

    I would like to check an input field for NULL and assign a constant number if true; else set to null.

    I am using Formula to do this:

    IF(ISBLANK([CREATED_BY]);"3";"")

    It is setting to 3 if CREATED_BY is null. But its not setting to NULL if CREATED_BY has a value.

    Help pls!

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Your mistake might be a forgotten "Replace value"


    Name:  230309.png
Views: 94
Size:  4.9 KB
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Nov 2013
    Posts
    382

    Default

    Your formula returns an empty string, not a null, when CREATED_BY has a value.

    Try

    IF(ISBLANK([CREATED_BY]);"3";na())

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.