Difference between CONTAINS and INCLUDES #inSalesforce
CONTAINS(text, compare_text)
Checks if text contains specified characters, and returns TRUE if it does. Otherwise, it returns FALSE
Example - Create field on Contact called Gmail Id - Formula Type (return checkbox):
CONTAINS(Email, 'gmail')
Will return true for Email values such as abc@gmail, stu@gmail.com, or any other substring of @gmail.com
INCLUDES(multiselect_picklist_field, text_literal)
Determines if any value selected in a multi-select picklist field equals a text literal you specify.
Example - Create field on Contact called Contact Name Field - Formula Type (returns text):
IF(INCLUDES(sampleMultiselectPLField__c, "Samsung"),"Samsung Contact",
IF(INCLUDES(sampleMultiselectPLField__c, "LG"),"LG Contact",
IF(INCLUDES(sampleMultiselectPLField__c, "Apple"),"Apple Contact","Other Contact"
)
)
)
IF(INCLUDES(sampleMultiselectPLField__c, "LG"),"LG Contact",
IF(INCLUDES(sampleMultiselectPLField__c, "Apple"),"Apple Contact","Other Contact"
)
)
)
Visual: https://www.youtube.com/watch?v=jpCvfUR8X58
Comments
Post a Comment