Skip to main content
Graham Milne 님이 #Formulas에 질문했습니다
I am trying to create a validation rule containing 2 picklists, 1 Multi-picklist and 1 text area field.

Fields

Picklists - "Owner_Role__c"

Multi-Picklist - "Benefits__c"

Text Area - "Comments__c"

The syntax I have is as follows

> AND(OR(ISPICKVAL( Owner_Role__c , "CSA"),ISPICKVAL( Owner_Role__c , "CSM")) &&  Comments__c = "" &&  ISBLANK( Benefits__c ))

I am not getting any syntax errors but it is not working. It is like it is ignoring the last argument. Even when I change fields to test it does nt recognize the last argument.

The rule should check to see if the owner role value is "CSM" or "CSA" and if it is, then the Benefits and comments fields should be required.

Any help appreciated.

Thank you.
답변 1개
  1. 2015년 2월 9일 오후 8:33

    try this.  You want both Comments and Benefits to be required.  when you fill in some text for comments, then the validation is no long valid because your comments__c != "" anymore.  So you want to use the "OR" statement to check if either of the Comment or Benefits is blank.

    AND(

    OR(ISPICKVAL( Owner_Role__c , "CSA"),ISPICKVAL( Owner_Role__c , "CSM")),

    OR (ISBLANK(Comments__c), ISBLANK( Benefits__c ))

    )

     
0/9000