You need to sign in to do that
Don't have an account?
Bella1
Validation Rule Formula connecting two fields
I am trying to create a validation rule that connects two fields. For example: When the Start date is filled out, they have to fill out the End date otherwise an error pops up when they go to save. I have tried so many different types of formulas but am missing something. Any suggestions on how to accomplish this?
Thanks!
Try this one
AND(NOT(ISNULL(Start_Date__c)), ISNULL( End_Date__c ))
You'll probably wanna have an additional validation routine that checks to make sure that the End Date is after the Start Date
Start_Date_c > End_Date__c
All Answers
Can you post the formula that you are using so we can take a look at it? (use the Clipboard with a "C" icon) above the post message text box.
End_Date_c > Start_Date_c End_Date <> null End_Date_c >= Start_Date_c
I think these are all wrong. I am terrible at formulas. I just want to show a conditional dependancy between the Start and End date, that if the Start date is filled out, you must always have an end date. Thanks so much for your quick response on this. Hopefully you can help?
Try this one
AND(NOT(ISNULL(Start_Date__c)), ISNULL( End_Date__c ))
You'll probably wanna have an additional validation routine that checks to make sure that the End Date is after the Start Date
Start_Date_c > End_Date__c
You are the best! It worked. Any suggestions on how or where to go to learn about formulas in detail and how to figure them out? Thanks so much, I really appreciate your quick response.
No problem, that's why they pay me the BIG BUCKS!
There are some great Formula and Validation guide books available here>
https://na2.salesforce.com/help/doc/en/salesforce_useful_formula_fields.pdf
https://na2.salesforce.com/help/doc/en/salesforce_useful_validation_formulas.pdf
Here's a few Start Date / End Date validation formulas that you can play around with.
1. If Start Date is not blank then you must enter an End Date.
AND(NOT(ISNULL(Start_Date__c)), ISNULL( End_Date__c ))
2. If you change the Start Date then you must update the End Date.
AND( ISCHANGED(Start_Date__c), PRIORVALUE(End_Date__c ) = End_Date__c )
3. If you change the Start Date it must equal the End Date.
AND( ISCHANGED(Start_Date__c), Start_Date__c <> End_Date__c )