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.

  • if any of the below answers helped resolve your question, please mark it as Answered @lone . Thanks! – glls May 8 '17 at 4:00
3
AND(
    NOT(ISBLANK(Skillname__c)),
    OR(
        ISBLANK(SkillType__c),
        ISBLANK(Proficiency__c),
        ISBLANK(Experience__c)
    )
)
|improve this answer|||||
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.

|improve this answer|||||
  • 2
    You can always replace IF(condition, true, false) with simply condition. – Adrian Larson May 2 '17 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.