Workflow Status column recording workflow step
Summary: when creating a workflow always code the status of the workflow to track each step it completes.
Scenarios:
- Recently, our company migrate from SharePoint on premises to SharePoint online. All workflow statuses were lost. Since I coded the workflow status in a separate column – no worries that information is saved!
- Workflow has 3 approval steps, first 2 approvals are completed. Third approval went out and the team decided to change the approver. Or the third approver can’t find the email and wants to regenerate the email. Restart the workflow? But that would repeat emails for the first 2 approvers.
- The workflow gets suspended mid-workflow and you need to restart it from where it left off.
In all these scenarios, update the workflow status column if needed to the workflow step needed and restart the workflow. The workflow will action from the workflow step coded.
Benefits:
- 2013 workflows do not show in progress vs completed workflows in the status column. The workflow status column can be updated to completed as the last action so you can filter on all items completed or not completed.
- You can restart the workflow from any stage with in the workflow.
Instructions:
- Create column: create a workflow status column with choices for Not started, Completed and all stages in between. Set default value to Not Started
- Update the workflow:
- Before each workflow step but an if statement if workflow status is equal to this step then add the actions beneath it
- After actions for the step is completed, add an action to code the workflow status for the next step.
- You can edit an item, select update the workflow status column and (re)start the workflow. It will skip all steps until the step that matches the workflow status column.