Find your content:

Search form

You are here

Advance formula field

 
Share

I am trying to use the following code snippet in a formula field

case_category__c (multi-select picklist field), email_categoty__c (multi-select picklist field)

if(case_category__c != null/blank && email_categoty__c== null/blank){
   //do something
}
else if(case_category__c == null/blank && email_categoty__c!= null/blank){
   //do something
}
else
   // error

Attribution to: SFDC Geek

Possible Suggestion/Solution #1

IF( Ispickval(case_category__c  ,"") &&  NOT(ISPICKVAL(email_categoty__c  ,"")), "YES", "No")

Attribution to: cartman

Possible Suggestion/Solution #2

IF( Ispickval(case_category__c  ,"") &&  NOT(ISPICKVAL(email_categoty__c  ,"")), "First Condition",
 IF( Ispickval(email_categoty__c  ,"") &&  NOT(ISPICKVAL(case_category__c  ,"")), "Second Condition","Else Condition"))

Just an untested code. Get the idea behind.


Attribution to: highfive

Possible Suggestion/Solution #3

So I found the solution:

IF(
AND(
ISBLANK(Email_Category__c), NOT(ISBLANK(Case_Category__c)) 
) , 'CASE',  IF(
AND(
ISBLANK(Case_Category__c), NOT(ISBLANK(Email_Category__c)) 
) , 'EMAIL', 
'ERROR'
) 
)

Attribution to: SFDC Geek
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/30233

My Block Status

My Block Content