0

I want to make this validation rule where every time assignment__C is active then the disable_date_c must be blank. So if it shows some date the validation rule shows the error message. This is what I got so far but I am missing something.

AND(
    ISBLANK(Disable_Date__c)    
    ISPICKVAL(assignment__c,"active"),
)
  • What happens? Does it just not work the way you want? That exact validation rule won't even save... – Nick Cook May 2 '16 at 5:49
1

Validation rules will display an error when the formula evaluats to true.

In your case, you want the validation rule to be true when the assignment__c field is 'active' and the disable_date__c field is not blank.

i.e.

AND(
  NOT(ISBLANK(disable_date__c)),
  ISPICKVAL(assignment__c, 'active')
)

When troubleshooting things like validation rules, workflow rules, etc. it's a good idea to isolate the conditions. In this case, if you'd changed it the just be ISBLANK(disable_date__c), it would immediately show up that the logic was incorrect.

0

I tried the formula by Nick with time assignment as a checkbox and got an error when time active was checked and disable date was not blank.

AND(time_active__c==TRUE,NOT(ISBLANK(Disable_Date__c))).

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.