function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
yakup kaygusuzyakup kaygusuz 

clearing date field using formula

I am trying to get a field to set a date time when a field is changed however there are conditions where i need that field to be empty when the field has a null or NO value is there an easy way to set a cleared date field using a workflow or the conditional formula field
Best Answer chosen by yakup kaygusuz
Blessy Voola 4Blessy Voola 4
Yakup: Try using this formula

IF(AND(ISCHANGED(Call_Result__c),NOT(ISBLANK(Call_Result__c))),NOW(),NULL)

Thanks!

All Answers

Ramu_SFDCRamu_SFDC
For this, I suggest going with workflow rule and a text field for setting up datetime stamp instead of using formula fields. 

You can use the PRIORVALUE and VALUE syntax to check if the field value is empty in workflow rule criteria formula. Follow the procedure explained in the below article on setting up timestamp in a text field.

http://opfocus.com/blog/time-stamping-salesforce-safeguard-your-system-against-undocumented-edits/

Please mark this as the best answer if it did resolved your question.
SteveMo__cSteveMo__c
Can you post your current Formula?  Are you using a Formula(Date) field, or a Workflow Rule?
yakup kaygusuzyakup kaygusuz
Currently i am using a workflow when ISCHANGED( Call_Result__c ) evaluates to true triggers a NOW() but what i would want would be a IF(Contains(Call_Result__c,BlankDate,Now()))
Blessy Voola 4Blessy Voola 4
Yakup: Try using this formula

IF(AND(ISCHANGED(Call_Result__c),NOT(ISBLANK(Call_Result__c))),NOW(),NULL)

Thanks!
This was selected as the best answer