1

Am trying to build a formula field with multiple IF conditions, so decided to go with Case function, below is the return statement based on the picklist value

0  Member
2  Member
3  Member
22 Only a Member if the "Date__c" field is not blank, otherwise Non-Member
23 Non-Member
27 Only a Member if the "Date__c" field is not blank, otherwise Non-Member
70 Only a Member if the "Date__c" field is not blank, otherwise Non-Member
80 Only a Member if the "Date__c" field is not blank, otherwise Non-Member
85 Non-Member
87 Only a Member if the "Date__c" field is not blank, otherwise Non-Member
90 Only a Member if the "Date__c" field is not blank, otherwise Non-Member
99 Member

So I created something like

CASE(TEXT(MDPKG__Status_Code__c),
'00', 'Member',
'02', 'Member',
'03', 'Member',
'99', 'Member',
'23', 'Non-Member',
'85', 'Non-Member',''
)

Couldn't Find a way to check those If conditions inside case function (Is it possible?) Should I use different function ?

4

If function will work inside the case statement in formula

You can do like this:-

CASE( sa_nket__case_text__c , 
'00', 'Member', 
'02', 'Member', 
'03', 'Member', 
'99', 'Member', 
'23', IF( ISBLANK( sa_nket__text_field__c ) , 'Memeber', 'Non-Member'), 
'85', 'Non-Member','' 
)

Note:-

CASE functions cannot contain functions that return true or false. Instead, make true or false expressions return numbers such as:

CASE(1, IF(ISPICKVAL​ (Term__c, "12"),​ 1, 0),
 12 * Monthly_Commit__c,​​
 IF(ISPICKVAL(Term__c, "24"), 1, 0),​​
 24 * Monthly_Commit__c, 0)

Make your changes accordingly. Hope it helps you.

| 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.