You need to sign in to do that
Don't have an account?
lincy
validatiin not working for number field
I have a entry code field i am trying a validation rule which says that it should contain only 7 numbers and adding user bypass and null check to it.But the formula is not working can any one suggest the fix.entry_code is a text(30) data type.
OR(AND($User.BypassValidation__c
NOT(ISNUMBER(entry_code__c)),
AND(ISNUMBER(entry_code__c)),
LEN(entry_code__c)<>7),(OR(entry_Code__c!="|| entry_Code__c!=NULL))
OR(AND($User.BypassValidation__c
NOT(ISNUMBER(entry_code__c)),
AND(ISNUMBER(entry_code__c)),
LEN(entry_code__c)<>7),(OR(entry_Code__c!="|| entry_Code__c!=NULL))
Try below snippet and it should work.
Hope above information was helpful.
Please mark as Best Answer so that it can help others in the future.
Thanks,
Vinay Kumar
All Answers
Try below snippet and it should work.
Hope above information was helpful.
Please mark as Best Answer so that it can help others in the future.
Thanks,
Vinay Kumar
Try the below anyone below formula.
AND( $User.BypassValidation__c = FALSE,
(OR(LEN(entry_code__c) <> 7,
ISBLANK(entry_code__c))
)
)
===================
AND( $User.BypassValidation__c = FALSE,
LEN(entry_code__c) <> 7,
)
Read the below two lines and decide whether we have to use TRUE or FALSE in $User.BypassValidation__c field check.
If the BypassValidation__c field is true then the bypass user should allow to save the record otherwise we have to throw the erroe means use $User.BypassValidation__c = FALSE in Formula
If the BypassValidation__c field is false then the bypass user should allow to save the record otherwise we have to throw the erroe means use $User.BypassValidation__c = TRUE in Formula
Thanks,
Maharajan.C