+ Start a Discussion
Ken sfdc1Ken sfdc1 

validation on picklist it must fire for each and every field but firing only for all fields are empty

AND(ISPICKVAL(Juxtapid_Policy_Available__c,"Yes"),ISBLANK( TEXT(Juxtapid_PA_Expiration__c )),ISBLANK( TEXT(Parental_LDL_C_History__c )),ISBLANK( TEXT(GT_Jux__c )),  ISBLANK( TEXT(Apheresis_Jux__c)),ISBLANK( TEXT(Xanthomas_Jux__c)),ISBLANK( TEXT(PCSK9_Step_Details__c)),ISBLANK( TEXT(Tried_and_Failed__c)),ISBLANK( TEXT(Corneal_Arcus__c)),ISBLANK( TEXT(Kynamro_Step__c)),ISBLANK( TEXT(R_S__c)))

Each and every must be filled if policy available is yes but it is working only when all fields are blank even if 1 field is not filled we need it to fire.

Something wrong in the validation can anyone correct it.
Best Answer chosen by Ken sfdc1
Srinath R 9Srinath R 9
Hi Ken,

You should be putting all your ISBLANK validations inside an OR statement so that the validation rule fires when any of the fields are blank.

Your validation rule should look like below

AND(ISPICKVAL(Juxtapid_Policy_Available__c,"Yes"),
(OR(ISBLANK( TEXT(Juxtapid_PA_Expiration__c )),ISBLANK( TEXT(Parental_LDL_C_History__c ))etc...))

Thanks
Srinath R

All Answers

Srinath R 9Srinath R 9
Hi Ken,

You should be putting all your ISBLANK validations inside an OR statement so that the validation rule fires when any of the fields are blank.

Your validation rule should look like below

AND(ISPICKVAL(Juxtapid_Policy_Available__c,"Yes"),
(OR(ISBLANK( TEXT(Juxtapid_PA_Expiration__c )),ISBLANK( TEXT(Parental_LDL_C_History__c ))etc...))

Thanks
Srinath R
This was selected as the best answer
Ken sfdc1Ken sfdc1
Yes you are right Srinath !!

 Thanks.