How to use INCLUDES function in Salesforce??

     Salesforce having lot of functions one among them is INCLUDES, it is a Text Function. I observed saleforce Help document also not providing detailed usage of this function. INCLUDES returns Boolean value if the provided single selected value is correct.

Exp: i.e if multipicklist Favorite_Animal__c selected value are (Dog,Cow,Horse)

then a valid INCLUDE function looks like this INCLUDES(Favorite__Animal__c,'Dog');

it will not accept INCLUDES(Favorite__Animal__c,'Dog; Cow; Horse') kind of functions. even it will not accept

INCLUDES(Favorite__Animal__c,'Dog' and 'Cow' and 'Horse') kind of functions.

So INCLUDES is not for check multiple selected values, it is only for to check whether given value is exist or not.

Then what is the use of multypicklist INCLUDE function?

To ensure multiple selected items we should use AND Logical function as follows. AND(INCLUDES(Favorite__Animal__c,'Dog'),INCLUDES(Favorite__Animal__c,'Cow'),INCLUDES(Favorite__Animal__c,'Horse'))

Leave a Reply