function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ella FitzpatrickElla Fitzpatrick 

Help with IF ISPICKVAL formula for Contact Validation Rule!

Hello All,

I need formula help! I have 3 custom dependent picklist fields on my Contact Object:

1. How contact data found?
2. What Show Team?
3. What competitor Show?

These are linked up in dependent picklists, which works as follows:
IF the answer to 1 is "Competitor Show" then the user has to specificy what show team they are from in field 2 "Labels OR Aerospace", then depending on what answer they give determines what values they can choose in field 3, "what competitor show?".

I need a validation rule formula that will do the following:

Competitor show is only 1 of 10 values available in field 1.  IF the answer to field 1 is Competitor Show then they have to have an answer in both 2 and 3.

Does anyone know how i would write this formula?

Thank you all in advance!!

Ella 

Best Answer chosen by Ella Fitzpatrick
Sagar PatilSagar Patil
Hi Ella,

Try below formula and replace API names of picklist fields
 
AND( 
   NOT(ISBLANK(TEXT(How contact data found API name))), 
   OR( 
       ISBLANK(TEXT(What Show Team API name)), 
       ISBLANK(TEXT(What competitor Show API name))  
     ) 

)

This formula will prevent user to save the record if How contact data field is not blank however rest of fields are empty.

Kindly mark this answer as best answer if it solves your problem.

Regards,
Sagar

All Answers

Sagar PatilSagar Patil
Hi Ella,

Try below formula and replace API names of picklist fields
 
AND( 
   NOT(ISBLANK(TEXT(How contact data found API name))), 
   OR( 
       ISBLANK(TEXT(What Show Team API name)), 
       ISBLANK(TEXT(What competitor Show API name))  
     ) 

)

This formula will prevent user to save the record if How contact data field is not blank however rest of fields are empty.

Kindly mark this answer as best answer if it solves your problem.

Regards,
Sagar
This was selected as the best answer
Ella FitzpatrickElla Fitzpatrick
Thanks Sagar! That worked perfectly! 
Ella FitzpatrickElla Fitzpatrick
Hi Sagar, This validation rule also fires when any other value is chosen for field 1. I need it only to fire when the user selects “competitor show - online” OR “competitor show – onsite” as the source of the contact data. Anything other than that then field 2 and 3 do not need to be populated. Any idea how I specify this?
Sagar PatilSagar Patil
Try this,
 
AND( 
   OR(
      TEXT(How contact data found API name) = “competitor show - online”,
      TEXT(How contact data found API name) = “competitor show – onsite”
     ),
   OR( 
       ISBLANK(TEXT(What Show Team API name)), 
       ISBLANK(TEXT(What competitor Show API name))  
     ) 

)