0

I need to create a validation rule that will fire when 1. Record type = Clinical Studies. 2. Start date and End date fields have been updated or modified. 3. Validation should require user to fill in text area field (Date Change reason) if 1&2 are true.

Here is what i have so far ->

AND( 
$RecordType.Name = "Clinical Studies",
ISPICKVAL(Status__c,"Draft"),
OR(
ISCHANGED(Start_Date__c),
ISCHANGED(End_Date__c),
ISBLANK(Date_Change_Reason__c)))

2 Answers 2

0

I'd assume you also want to validate if "Date Change reason" is also changed, otherwise once it's set, the VR won't trigger (it depends on what your preferences are...). Also you didn't mention Status = "Draft" but have it in your logic.

AND(
/* use the line below if you want to only require "Date Change reason" to be not blank
 ISBLANK(Date_Change_Reason__c), */
 NOT( ISCHANGED(Date_Change_Reason__c)),
 $RecordType.Name = "Clinical Studies",
 ISPICKVAL(Status__c,"Draft"),
 OR(
  ISCHANGED(Start_Date__c),
  ISCHANGED(End_Date__c),
 )
)
0
0

Validation rule for your conditions:

  1. RecordType = "Clinical Studies"
  2. Status__c = "Draft"
  3. Start_Date__c && End_Date__c are changed.
  4. Date_Change_Reason__c should not be null.

AND( 
  $RecordType.Name = "Clinical Studies",
  ISPICKVAL(Status__c,"Draft"),
  ISCHANGED(Start_Date__c),
  ISCHANGED(End_Date__c),
  NOT(
    ISBLANK(Date_Change_Reason__c)
  )
)

You must log in to answer this question.

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