0

I need to create a formula field which returns the date when the status (picklist) field is marked as complete.

I have tried below formula but it is updating today's date for all the ones which were updated long back. Could you suggest what changes need to be made?

If(
    Ispickval(status__c, 'completed'), 
    TODAY(), 
    NULL
)
5
  • What have you tried? Where are you stuck? Edit your question to include that information, otherwise this comes off as a "do my work for me" request.
    – Derek F
    Commented Oct 7, 2022 at 14:16
  • I have added the formula
    – Guest
    Commented Oct 7, 2022 at 14:22
  • I've taken the liberty of adjusting the formula to be syntactically correct, and have retracted my close vote.
    – Derek F
    Commented Oct 7, 2022 at 14:24
  • Have you checked Field History tracking option?
    – Sid
    Commented Oct 7, 2022 at 15:08
  • No, can you tell what to do?
    – Guest
    Commented Oct 7, 2022 at 15:20

1 Answer 1

2

Formula fields are re-calculated every time that the record is accessed. They're not a one-time calculation, so they are not suited for the problem you're trying to solve here.

Instead, you should use a before-save record-triggered flow with a custom date field to:

  • detect when your record's status is changing to "completed"
  • and then execute an immediate action to set your date field with TODAY()

You must log in to answer this question.

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