+ Start a Discussion
Marilyn BureshMarilyn Buresh 

validation rule missing ')'

Can someone tell me where I'm missing the ')' ? This is a validation rule on a custom object. I'm adding the line with OMTOA but getting a syntex error that I'm missing a ')' - help!

AND(
OR( 
ISPICKVAL( Interview_Model__r.Interview_Type__c , "1"),
ISPICKVAL( Interview_Model__r.Interview_Type__c , "2"),
ISPICKVAL( Interview_Model__r.Interview_Type__c , "3"),
ISPICKVAL( Interview_Model__r.Interview_Type__c , "4")),
OR(
NOT(ISBLANK( Profiles__c )), 
NOT(ISBLANK( External_Predictions__c )),
NOT(ISBLANK( Internal_Predictions__c ))), 
OR(NOT( Interview_Model__r.Name  , "OMTOA")),
$User.Bypass_Validation_Rules__c =false)

Thank you!
Best Answer chosen by Marilyn Buresh
Steven NsubugaSteven Nsubuga
AND(
	OR( 
		ISPICKVAL( Interview_Model__r.Interview_Type__c , "1"),
		ISPICKVAL( Interview_Model__r.Interview_Type__c , "2"),
		ISPICKVAL( Interview_Model__r.Interview_Type__c , "3"),
		ISPICKVAL( Interview_Model__r.Interview_Type__c , "4")
	),
	
	OR(
		NOT(ISBLANK( Profiles__c )), 
		NOT(ISBLANK( External_Predictions__c )),
		NOT(ISBLANK( Internal_Predictions__c ))
	), 
	OR(
		NOT(Interview_Model__r.Name == "OMTOA")
	),


	$User.Bypass_Validation_Rules__c = false
)

 

All Answers

Raj VakatiRaj Vakati
try this
 
AND(
OR( 
ISPICKVAL( Interview_Model__r.Interview_Type__c , "1"),
ISPICKVAL( Interview_Model__r.Interview_Type__c , "2"),
ISPICKVAL( Interview_Model__r.Interview_Type__c , "3"),
ISPICKVAL( Interview_Model__r.Interview_Type__c , "4")
),
OR(
NOT(ISBLANK( Profiles__c )), 
NOT(ISBLANK( External_Predictions__c )),
NOT(ISBLANK( Internal_Predictions__c ))
), 
OR(NOT( Interview_Model__r.Name  , "OMTOA"),
$User.Bypass_Validation_Rules__c =false
)
)

 
Steven NsubugaSteven Nsubuga
AND(
	OR( 
		ISPICKVAL( Interview_Model__r.Interview_Type__c , "1"),
		ISPICKVAL( Interview_Model__r.Interview_Type__c , "2"),
		ISPICKVAL( Interview_Model__r.Interview_Type__c , "3"),
		ISPICKVAL( Interview_Model__r.Interview_Type__c , "4")
	),
	
	OR(
		NOT(ISBLANK( Profiles__c )), 
		NOT(ISBLANK( External_Predictions__c )),
		NOT(ISBLANK( Internal_Predictions__c ))
	), 
	OR(
		NOT(Interview_Model__r.Name == "OMTOA")
	),


	$User.Bypass_Validation_Rules__c = false
)

 
This was selected as the best answer
Marilyn BureshMarilyn Buresh
That worked, Steven, thank you! Raj, thank you as well!