0

Why does this formula yield a blank value? I want it to bring back the date formula (Month Day, Year) if the EffectiveDate1 field is not blank.

if (EffectiveDate1__c <> null,
    CASE(
        MONTH( EffectiveDate1__c ), 
        1, "January", 
        2, "February", 
        3, "March", 
        4, "April", 
        5, "May", 
        6, "June", 
        7, "July", 
        8, "August", 
        9, "September", 
        10, "October", 
        11, "November", 
        "December"
    ) + ' ' + text(DAY( EffectiveDate1__c )) +', '+ Text(YEAR(EffectiveDate1__c)
), "")
  • 1
    IF(NOT(ISBLANK(EffectiveDate1__c)), YOURCASECODE, "") – Boris Bachovski Jun 5 '17 at 0:32
0

Rather than using Null, better to use ISBLANK() function for Null and Blank checking.

ISBLANK

Determines if an expression has a value and returns TRUE if it does not. If it contains a value, this function returns FALSE.

  • Use ISBLANK instead of ISNULL in new formulas. ISBLANK has the same functionality as ISNULL, but also supports text fields. Salesforce will continue to support ISNULL, so you do not need to change any existing formulas.

  • A field is not empty if it contains a character, blank space, or zero. For example, a field that contains a space inserted with the spacebar is not empty.

IF(NOT(ISBLANK(EffectiveDate1__c)),
    CASE( MONTH( EffectiveDate1__c ), 
    1, "January", 
    2, "February", 
    3, "March", 
    4, "April", 
    5, "May", 
    6, "June", 
    7, "July", 
    8, "August", 
    9, "September", 
    10, "October", 
    11, "November", 
    "December") +' '+ text(DAY( EffectiveDate1__c )) +', '+ Text(YEAR( 
    EffectiveDate1__c))
    ,""
)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.