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
Aman BishtAman Bisht 

I am having doubt in not contains condition in workflow formula evaluation

HI
I am getting an error in this condition..
Pls help me out..
AND(OR(ISPICKVAL( school_institution_type__c ,'Elementary School'),
ISPICKVAL( school_institution_type__c ,'Middle/Jr. High School'),
ISPICKVAL( school_institution_type__c ,'High School'),ISPICKVAL
(school_institution_type__c ,'District')),
OR(State == 'AK',State == 'MT',State == 'WA',State =='OR')
,ISPICKVAL(Division__c ,'Secondary Education') 
,OR(NOT  CONTAINS ((ISPICKVAL(Territory__c , OR'Admissions')),
ISPICKVAL(Territory__c , 'FSE'),
ISPICKVAL(Territory__c , 'iThenticate'),
ISPICKVAL(Territory__c , 'Profit'),
ISPICKVAL(Territory__c , 'SA')),$Label.Lead_Workflow_flag =='true'))

 
Dhanya NDhanya N
Hi Aman,

There is no function like NOT CONTAINS. It should be NOT(CONTAINS(text, compare_text)). 
Try the below formula once.
AND(
	OR(
		ISPICKVAL( school_institution_type__c ,'Elementary School'),
		ISPICKVAL( school_institution_type__c ,'Middle/Jr. High School'),
		ISPICKVAL( school_institution_type__c ,'High School'),
		ISPICKVAL(school_institution_type__c ,'District')
	),
	OR(State == 'AK',State == 'MT',State == 'WA',State =='OR'),
	ISPICKVAL(Division__c ,'Secondary Education'),
	OR(
		NOT ( 
			CONTAINS (
				ISPICKVAL(Territory__c , 'Admissions'),
				ISPICKVAL(Territory__c , 'FSE'),
				ISPICKVAL(Territory__c , 'iThenticate'),
				ISPICKVAL(Territory__c , 'Profit'),
				ISPICKVAL(Territory__c , 'SA')
			)
		),
		$Label.Lead_Workflow_flag =='true'
	)
)
Thanks,
Dhanya