function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
StardustStardust 

Validation rule on multi-select picklist

Hi there,

 

how can I create a Validation Rule that would ensure that maximum 3 values can be selected out of 6 values available in a multi-select picklist?

Which formula should I use?

 

Or does this require coding?

 

Thanks very much in advance,

Stardust

Best Answer chosen by Admin (Salesforce Developers) 
Satish_SFDCSatish_SFDC
This link exactly answers your questions.

https://success.salesforce.com/answers?id=90630000000h1cIAAQ

Regards,
Satish Kumar
Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.

All Answers

Satish_SFDCSatish_SFDC
This link exactly answers your questions.

https://success.salesforce.com/answers?id=90630000000h1cIAAQ

Regards,
Satish Kumar
Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.
This was selected as the best answer
StardustStardust

Brilliant solution! It works. Thanks Satish_SFDC

Groundwire ConsultingGroundwire Consulting

Hi,

 Try this below code..

 

IF(INCLUDES(Fieldname, "value1"),1,0) + 

IF(INCLUDES(Fieldname, "value2"),1,0) + 

IF(INCLUDES(Fieldname, "value3"),1,0) + 

IF(INCLUDES(Fieldname, " value4"),1,0) + 

IF(INCLUDES(Fieldname, " value5"),1,0) > 3

 

and if you have any more questions please feel to contact me on support@groundwireconsulting.com