Display Error If the Multi-select Picklist has more than 3 values selected using Flow #inSalesforce

Display Error If the Multi-select Picklist has more than 3 values selected using Flow #inSalesforce

Create a formula field like the following:

MPVCount formula field: (you can create field level or flow level as needed)

IF(INCLUDES(sampleMultiselectPLField__c, "samsungTV"), 1, 0) +
IF(INCLUDES(sampleMultiselectPLField__c, "samsungWM"), 1, 0) +
IF(INCLUDES(sampleMultiselectPLField__c, "LGTV"), 1, 0) +
IF(INCLUDES(sampleMultiselectPLField__c, "LGWM"), 1, 0) +
IF(INCLUDES(sampleMultiselectPLField__c, "APPLETV"), 1, 0)+
IF(INCLUDES(sampleMultiselectPLField__c, "APPLEW"), 1, 0)+
IF(INCLUDES(sampleMultiselectPLField__c, "SONYTV"), 1, 0)

If using in flow formula, make it:

IF(IF(INCLUDES(sampleMultiselectPLField__c, "samsungTV"), 1, 0) +
IF(INCLUDES(sampleMultiselectPLField__c, "samsungWM"), 1, 0) +
IF(INCLUDES(sampleMultiselectPLField__c, "LGTV"), 1, 0) +
IF(INCLUDES(sampleMultiselectPLField__c, "LGWM"), 1, 0) +
IF(INCLUDES(sampleMultiselectPLField__c, "APPLETV"), 1, 0)+
IF(INCLUDES(sampleMultiselectPLField__c, "APPLEW"), 1, 0)+
IF(INCLUDES(sampleMultiselectPLField__c, "SONYTV"), 1, 0))>3,true,false)

Create a record-triggered flow, criteria if the above > 3 then add a custom error element to display the error





                                        Visual: https://www.youtube.com/watch?v=G3BsIHClDB4

Comments