0

How can I create a Validation Rule that makes a field required if some other fields are not null?

For example, if I were to enter a Skillname, then Skill Type, Proficiency and Years of Experience should become required.

1
  • if any of the below answers helped resolve your question, please mark it as Answered @lone . Thanks!
    – glls
    May 8, 2017 at 4:00

2 Answers 2

3
AND(
    NOT(ISBLANK(Skillname__c)),
    OR(
        ISBLANK(SkillType__c),
        ISBLANK(Proficiency__c),
        ISBLANK(Experience__c)
    )
)
2

Here I have taken the example as : For Opportunity object , when Account id provided as an input then Description and Competitor information are mandator:

At validation rule "Error Condition Formula" will be as below :

IF(AccountId != null, 
  ( IF( OR(Description == null, MainCompetitors__c == null) , true, false) ),
   false
)

This will work.

PS: Please replace your field with the above rule fields.

1
  • 2
    You can always replace IF(condition, true, false) with simply condition.
    – Adrian Larson
    May 2, 2017 at 12:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .