You need to sign in to do that
Don't have an account?
joe27
Need validation rule plz help
Hello all
I am looking for a validation rule to say
if a picklist field is populated then 4 other text fields are required .
AND ((text( Board_1_Menu_Design__c ) != null), picklist field
(( Board_1_Display_Length__c ) = null) ,
(( Board_1_Display_Width__c ) = null) ,
(( Board_1_Print_Width__c ) = null) ,
(( Board_1_Print_Length__c ) = null))
I need it so that if i select an option from the picklist field all other fields are required ..at the moment i can save if i only populate 1 of the text fields
Use ISPICKVAL to check if the picklist is populated. You can do this with NOT(ISPICKVAL(Board_1_Menu_Design__c, "")). When this returns true, the picklist is populated. Also use ISBLANK to check if a text field has a null value: ISBLANK(Board_1_Display_Length__c) returns true if Board_1_Display_Length__c is null.
Combining the above formulas, you get
This checks if Board_1_Menu_Design is populated. If it is, then it checks if any of the four text fields are null (using OR). If any one of them is null, it returns true (validation error). If none of them are null, it returns false. If Board_1_Menu_Design is not populated, it returns false.
All Answers
Use ISPICKVAL to check if the picklist is populated. You can do this with NOT(ISPICKVAL(Board_1_Menu_Design__c, "")). When this returns true, the picklist is populated. Also use ISBLANK to check if a text field has a null value: ISBLANK(Board_1_Display_Length__c) returns true if Board_1_Display_Length__c is null.
Combining the above formulas, you get
This checks if Board_1_Menu_Design is populated. If it is, then it checks if any of the four text fields are null (using OR). If any one of them is null, it returns true (validation error). If none of them are null, it returns false. If Board_1_Menu_Design is not populated, it returns false.
Try this formula:
AND( NOT( ISBLANK( TEXT(Board_1_Menu_Design__c) ) ) , OR( ISBLANK( Board_1_Display_Length__c) , ISBLANK(Board_1_Display_Width__c) , ISBLANK( Board_1_Print_Width__c) , ISBLANK(Board_1_Print_Length__c) ))
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
Madhan Raja M