0

My below validation rule is showing syntax error as " missing " )", I checked throughly but couldn't able to figure out where exactly I went wrong or missed the bracket or comma, can anyone please help me out.

OR
( 
AND( 
OR(ABS(Premium_adjustment__c)<0.05, ABS(Premium_adjustment__c)>0.1), 
ISCHANGED(Adjusted_technical_premium__c), 
$User.UserRoleId<>"UW 2" 
), 

AND( 
OR(ABS(Premium_adjustment__c)<0.05, ABS(Premium_adjustment__c)>0.2), 
ISCHANGED(Adjusted_technical_premium__c), 
$User.UserRoleId<>"UW 5" 
), 

AND( 
OR(ABS(Premium_adjustment__c)<0.05, ABS(Premium_adjustment__c)>0.3), 
ISCHANGED(Adjusted_technical_premium__c), 
$User.UserRoleId<>"UW 6" 
), 

AND( 
OR(ABS(Premium_adjustment__c)<0.05, ABS(Premium_adjustment__c)<0.3, 
ISCHANGED(Adjusted_technical_premium__c), 
$User.UserRoleId<>"UW 7" 
)
)
  • If you have troubles when editing formulas, don't hesitate to paste it in a text editor like Notepad++. It highlights the parentheses. – Martin Lezer Jan 12 '17 at 8:32
  • This validation rule doesn't make sense AT ALL as it will let any user to bypass it, for most cases if not all. – o-lexi Jan 12 '17 at 18:42
  • May i know plz how can it bypass ? as the role been assigned to the specific user and only those with the role can change it. Although till now its working fine. Thanks – sourav Jan 18 '17 at 2:34
3

After the last 0.3 you forgot a )

OR
( 
AND( 
OR(ABS(Premium_adjustment__c)<0.05, ABS(Premium_adjustment__c)>0.1), 
ISCHANGED(Adjusted_technical_premium__c), 
$User.UserRoleId<>"UW 2" 
), 

AND( 
OR(ABS(Premium_adjustment__c)<0.05, ABS(Premium_adjustment__c)>0.2), 
ISCHANGED(Adjusted_technical_premium__c), 
$User.UserRoleId<>"UW 5" 
), 

AND( 
OR(ABS(Premium_adjustment__c)<0.05, ABS(Premium_adjustment__c)>0.3), 
ISCHANGED(Adjusted_technical_premium__c), 
$User.UserRoleId<>"UW 6" 
), 

AND( 
OR(ABS(Premium_adjustment__c)<0.05, ABS(Premium_adjustment__c)<0.3), 
ISCHANGED(Adjusted_technical_premium__c), 
$User.UserRoleId<>"UW 7" 
)
)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.