Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Formulas & Validation Rules Discussion
- :
- Does IsChanged work for Date Field Types?
turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
0
Does IsChanged work for Date Field Types?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-21-2008 12:07 PM
We are trying to create a Workflow Field Update that checks to see if a Date Value (Custom Field) has changed. We are using the IsChanged() function in Salesforce. For some reason it never evaluates to true. Any thoughts on what we are doing wrong? Or, does the IsChanged() function not work with dates?
In the example below, it should check the date field and update the IS_CHANGED__c field with a notification if the value has changed.
IF( ISCHANGED( My_Custom_Date__c ) ,'My Custom Date Changed on' & TEXT(NOW()) , IS_CHANGED__c )
Any thoughts or workarounds?
In the example below, it should check the date field and update the IS_CHANGED__c field with a notification if the value has changed.
IF( ISCHANGED( My_Custom_Date__c ) ,'My Custom Date Changed on' & TEXT(NOW()) , IS_CHANGED__c )
Any thoughts or workarounds?
0
Re: Does IsChanged work for Date Field Types?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-21-2008 01:14 PM
I haven't tried IsChanged() on a date field, but I'm pretty sure that your formula needs some work regardless. For starters, text should be in double quotes, not single. Second, why are you putting IS_CHANGED__c as your "else" statement in the IF function? I'm not sure what that would do, but it may not be supported.
Have you tried just a simple
to see if the basic idea works?
Have you tried just a simple
Code:
IF( ISCHANGED( My_Custom_Date__c ) ,"Changed","Not changed" )
0
Re: Does IsChanged work for Date Field Types?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-21-2008 03:29 PM
Thanks, that did the trick. I guess the single quote was the problem. Here is my revised formula:
IF( ISCHANGED( My_Custom_Date__c ) ,"My Custom Date Last Changed On " & TEXT(NOW()) , IS_CHANGED__c )
I am using the IS_Changed__c as the False condition so I can preserve the previous value if there is no change.
So, I guess this means that IsChanged() does indeed work fine for date fields.
Thanks for your help with this! -- Anand
IF( ISCHANGED( My_Custom_Date__c ) ,"My Custom Date Last Changed On " & TEXT(NOW()) , IS_CHANGED__c )
I am using the IS_Changed__c as the False condition so I can preserve the previous value if there is no change.
So, I guess this means that IsChanged() does indeed work fine for date fields.
Thanks for your help with this! -- Anand
0
Re: Does IsChanged work for Date Field Types?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-21-2008 03:31 PM
Cool! That's a neat trick using False to preserve the previous state, too.

