Activity Forums Salesforce® Discussions multiselect picklist and formula field

  • multiselect picklist and formula field

    Posted by Prachi on November 22, 2019 at 2:56 pm

    I have a multiselect picklist on my User Record called CountryAccess. User can select multiple countries in this field like: TH, BR. I also have another custom field called Country on my Account object which is a picklist field with all the countries.

    Now what I want is to create another formula field to check if the values from the Country contain the value from the CountryAccessand if yes, return TRUE otherwise FALSE.

    Let's say for example a user X has 2 values TH and BR on CountryAccess field. Now if I go to an account and the country is either TH or BR than display TRUE otherwise false.

    Any ideas please? I manage to create a formula field but based on a picklist, with one value not multiselect.

     

    Piyush replied 4 years, 5 months ago 2 Members · 1 Reply
  • 1 Reply
  • Piyush

    Member
    November 25, 2019 at 6:10 am

    Hi Prachi,

    use these formula:-

    IF(ISPICKVAL(SVMXC__Country__c ,'UK') && INCLUDES( $User.TestMultiSelectCountry__c ,"UK"),true,
    IF(ISPICKVAL(SVMXC__Country__c ,'BR') && INCLUDES( $User.TestMultiSelectCountry__c ,"BR"),true,
    IF(ISPICKVAL(SVMXC__Country__c ,'SA') && INCLUDES( $User.TestMultiSelectCountry__c ,"SA"),true,
    IF(ISPICKVAL(SVMXC__Country__c ,'TH') && INCLUDES( $User.TestMultiSelectCountry__c ,"TH"),true,
    IF(ISPICKVAL(SVMXC__Country__c ,'US') && INCLUDES( $User.TestMultiSelectCountry__c ,"US"),True,False)))))

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos