Skip to main content
I have a validation rule that looks at the name of a record and if the first character is a number it makes us complete a second field.

 

I have come across an instance where this should not be validating and I don't know if it possible to sort.

 

We use the name field to display a work item number then the name but we also use it to display a date then the name:

 

Example 89784 Work order example

 

Example 2016-06-29 Date name example

 

I need it to error if 89784 is displayed but to accept YYYY-MM-DD {Name}

 

The rule currently is set to

 

AND(

 

(RecordType.DeveloperName="Incident"),

 

AND(

 

ISNUMBER(LEFT(Name,1)),

 

ISBLANK( TFS_Number__c)

 

))
1 risposta
  1. 29 giu 2016, 09:38
    Hi Peter,

     

    Please try the below

    AND(

    RecordType.DeveloperName="Incident",

    ISNUMBER(LEFT(Name,1)),

    NOT(CONTAINS(Name, "-")),

    ISBLANK( TFS_Number__c)

    )

    as per the above validation rule, if there is "-" in the name field and will not trigger the rule.

     

     
0/9000