You need to sign in to do that
Don't have an account?
CONTAINS () - compare multiple values in the formula
Hi All,
I would like to add more values to a formula that uses "contains()" a few times but I receive an error message because it exceeds the character limitation.
Is there any way to make the formula more efficient when you compare a field to different values?
I.e
IF (
OR (prob=1, prob=2,
CONTAINS(Part_Pumber__c , "SETUP"),
CONTAINS (Part_Number__c , "UNKNOWN"),
CONTAINS (Part_Number__c , "MCC"),
CONTAINS(Part_N__c , "RETAINER"),
CONTAINS( Part_N__c , "REFINEMENT"),
CONTAINS( Part_Number__c , "SCAN"),
CONTAINS( Part_Number__c , "REFINEMENT"),
CONTAINS( Part_N__c , "WARR"),
CONTAINS( Part_Number__c , "WARR"),
CONTAINS( Part_Number__c , "ALIGNER"),
CONTAINS( Part_N__c , "REPLACEMENT"),
CONTAINS( Part_N__c , "TEMPLATE"),
CONTAINS( Part_N__c , "REPL."),
CONTAINS( Part_Number__c , "4645"),
CONTAINS( Part_Number__c , "7876"),
CONTAINS( Part_Number__c , "7877"),
CONTAINS( Part_Number__c , "7878"),
CONTAINS( Part_Number__c , "5369"),
CONTAINS( Order_Type__c , "SR"),
Part_Number__c ="",
CONTAINS( Part_Number__c, "5006" )), 0,1)
I have tried the following but it doesn't work:
IF(OR ( prob =1, prob =2,
CONTAINS ("SETUP:UNKNOWN:MCC:SCAN:REFINEMENT:WARR:ALIGNER:4645:7876:7877:7878:5369:", Part_Number__c ),
CONTAINS ("RETAINER:REFINEMENT: WARR: REPLACEMENT:TEMPLATE:REPL.:",Part_N__c),
CONTAINS( Order_Type__c , "SR"),
Part_Number__c =""),
0,
1)
Any advise would be highly appreciated.
Thank you!
Judith
I would suggest to break your formula and create more than one different , all should have common part and the independent different checks should be seperated. Please ask if you did not get my point.
It will work for sure.
This finds last date of month