function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
fabian paul 7fabian paul 7 

Validation Failed

Hello,

I have an object that has Picklistfield  named  'Status' and I want that whenever the Status Picklist field values is 'Closed Filled' or 'Closed Not Approved' the Close Date field which is of Date type cannot be left blank.

My Logic which is not working is:

IF( ISPICKVAL( Status__c , 'Closed-Filled')  ||  ISPICKVAL( Status__c , 'Closed Not Approved') ,   IF( ISBLANK( Close_Date__c ) ,true, false),false)

Thnaks.

itzmukeshy7itzmukeshy7
Is it a typo Closed-Filled vs Closed Filled?
Maharajan CMaharajan C
Hi Fabian,

You can simply write the formula like below:

Anfd please check the typo for Status field values.

    AND(
    OR( 
    ISPICKVAL( Status__c , 'Closed-Filled') , 
    ISPICKVAL( Status__c , 'Closed Not Approved')) ,  
    ISBLANK( Close_Date__c ) )

Thanks,
Maharajan.C
fabian paul 7fabian paul 7
Its not working.Still the record is getting saved in both cases.
Lyrics SumoLyrics Sumo

You can  write the formula like below:

And please check the typo for Status field values.

    AND(
    OR( 
    ISPICKVAL( Status__c , 'Closed-Filled') , 
    ISPICKVAL( Status__c , 'Closed Not Approved')) ,  
    ISBLANK( Close_Date__c ) )

Filhall Lyrics (https://www.lyricssumo.com/2020/01/filhall-lyrics.html) And

Lyricssumo.com