2

We have a requirement that need to display the date&time when user select as 'Completed' from a Status picklist filed.I used below formula to achieve this.It is working exactly perfect in the object .But when I used this field in the Report,fetching the Report creation date in that field.

IF( ( ISPICKVAL( Status , "Completed" ) ) , NOW() , null )

Please help to resolve this issue.

1
  • 1
    I don't think is very clear what is the issue when you run the report, could you rephrase it or post a screenshot?. Also, are you sure you want to use a formula to display the value of now if the status is completed and not to actually store the value of NOW at the moment the record was set to completed (using a field update) ?
    – PepeFloyd
    Jul 16, 2014 at 7:56

1 Answer 1

5

Formula fields don't execute the formula once and save a value, they are evaluated each time that the record is retrieved from the database - in this case the records are retrieved from the database when the report is run, so now() is re-evaluated at that time.

If you want to timestamp when the status field changed to that value, you should use a workflow rule and apply that formula to a workflow field update triggered by the rule. That will evaluate the formula and update the field at the time the change took place.

1
  • Thanks Bob,I've changed the criteria as you suggested and its working fine.
    – User1511
    Jul 16, 2014 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.