Is there any way of adding a column to show the previous version of an approval status?
I want 2 columns: one to show the current version and the second column to show the previous version of the 'approval status'.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityYou could use a workflow to update the second column. First capture the approval status as a variable, and when Approval Status changes, set the second column to be the variable.
You could do this via a workflow that is set to run on change. Add two fields, so you'll have a total of three for this process:
CurrentStatus
StatusTracker
OldStatus
Each time the workflow runs, it will compare CurrentStatus to StatusTracker. If they're the same, the workflow stops. If they're different, then it puts the value from CurrentStatus into OldStatus.
so, at first the values might be:
CurrentStatus - draft
StatusTracker - draft
OldStatus -
Then, the user changes the CurrentStatus to submitted. The workflow sees that currentStatus!=statusTracker, and so sets OldStatus = statusTracker, and updates statusTracker to the new status of CurrentStatus. So now you have:
CurrentStatus - submitted
StatusTracker - submitted
OldStatus - draft
Then, the user changes the status to approved. To be clear, when the workflow starts, the values are now:
CurrentStatus - approved
StatusTracker - submitted
OldStatus - draft
That's why I'm suggesting the use of the status tracker field. Without it, we wouldn't have access to the old value. So the workflow runs, sees that currentStatus!=statusTracker, and so sets OldStatus = statusTracker, and updates statusTracker to the new status of CurrentStatus. So now you have:
CurrentStatus - approved
StatusTracker - approved
OldStatus - submitted