Question

Need some help please - currently working on SharePoint 2013 online.

I have a choice column (drop down) called 'Stage'. In 'Stage', I have 3 choices;

  • Start
  • Pause
  • End

I also have 3 calculated columns (formatted for Date only);

  • Start
  • Pause
  • End

What I am trying to do is, if 'Start' is selected in 'Stage' drop down, it applies current days date in 'Start' calculated column. If you select 'Pause', then it applies current days date in 'Paused' calculated column etc.

I have got it to work using the following in each calculated column: (e.g. below is from the 'Start' calculated column);

=IF(Stage="Start",TODAY(),)

What is happening though is, when I change from 'Start' to 'Pause' in 'Stage' it is deleting the previous entry. E.g. Start = 19/06/2020 but when changed to 'Pause', 'Pause' = 19/06/2020 but 'Start'=0. I want the previous entry to retain it's date (think of it like an audit trail).

Can anyone advise what I am doing wrong? Admittedly, I am only a week old in SharePoint so I am certain it's me that is the problem here. Would really appreciate any help, been on this for 3 days now and can't find anything online.

Thank you!

Was it helpful?

Solution

You can not achieve this using Calculated column.

One option to this is SharePoint Designer as explain below -

  1. Create 3 date columns each for Start Date, Pause Date and End Date.

  2. Create a SharePoint Designer workflow that will trigger when an item is created and when an item is modified.

  1. Write below steps in workflow to compare Stage value and accordingly set the respective Date column value to today's date.

my

OTHER TIPS

This is the known behavior in SharePoint.

Calculated column values gets updated whenever an item is changed/updated in list and it will not retain its old values.

To achieve what you are trying you may need to use SharePoint designer workflow/Power automate flow. Using these you can set the date column values based on the choice column("Stage") values.

References:

  1. How To Set A Date Value In A SharePoint Designer Workflow

  2. Microsoft Flow: Update SharePoint Columns

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top