+ Start a Discussion
Ryan Mastbergen 4Ryan Mastbergen 4 

Validation Rule Not Working as Expected suggestions?

Hello,

I am stuck on a validation rule -

If Sub Category is either 'Attestation Form Complete' or 'Attestation Form Incomeplete', all the other fields listed must not be blank.

The current formula will not let me create the record even if all the fields listed are completed.  Any suggestions would be helpful.
 

Thanks!
User-added image

Best Answer chosen by Ryan Mastbergen 4
Maharajan CMaharajan C
Hi Ryan,

There is a problem in your formula:

Please try the below one:
 
AND(OR(
ISPICKVAL(Sub_Category__c,"Attestation Form Complete"),
ISPICKVAL(Sub_Category__c,"Attestation Form InComplete")
),
OR(
ISPICKVAL(Creditable_Coverage__c,""),
ISBLANK(Start_Date__c),
ISBLANK(End_Date__c),
ISPICKVAL(Type_of_Coverage__c,""),
ISPICKVAL(Relationship_to_Member__c,""),
ISPICKVAL(Verbal_Permission_Obtained__c,"")
))

Thanks,
Maharajan.C

All Answers

ShirishaShirisha (Salesforce Developers) 
Hi Ryan,

Greetings!

Have you tried by enabling the debug logs to see,if the validation rule criteria is met.

Reference:https://help.salesforce.com/apex/HTViewHelpDoc?id=code_add_users_debug_log.htm&language=en_us

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
kamala swarnalathakamala swarnalatha
Hi Ryan,

Could you please change the formula like this and test it?

AND(OR(ISPICKVAL(Sub_Category__c,"Attestation Form Complete),ISPICKVAL(Sub_Category__c,"Attestation Form InComplete)),AND(......))

Hope this helps!

Please let me know if you have further questions.

Thanks,
K.Kamala
Sweet Potato Tec.

 
Maharajan CMaharajan C
Hi Ryan,

There is a problem in your formula:

Please try the below one:
 
AND(OR(
ISPICKVAL(Sub_Category__c,"Attestation Form Complete"),
ISPICKVAL(Sub_Category__c,"Attestation Form InComplete")
),
OR(
ISPICKVAL(Creditable_Coverage__c,""),
ISBLANK(Start_Date__c),
ISBLANK(End_Date__c),
ISPICKVAL(Type_of_Coverage__c,""),
ISPICKVAL(Relationship_to_Member__c,""),
ISPICKVAL(Verbal_Permission_Obtained__c,"")
))

Thanks,
Maharajan.C
This was selected as the best answer
Ryan Mastbergen 4Ryan Mastbergen 4
Thank you so much Maharajan, that works excellent!

Really appreciate it!

Ryan
fas asawsfas asaws
I want the same feature for my website of online Furniture store. You can see here the website detail (https://tcl365.ie/).
Prakash MisharaPrakash Mishara
Thanks for the update. It really works like a magic. Keep sharing such tips and help developers. Check out some of the best Sports Streaming Websites (https://sharphunt.com/sports-streaming-sites/).