Requirement: Generally, almost all stage-gate project processes require the project to be baselined after a certain point in the process, commonly after planning is completed. The idea here is to build in a check, to see whether a baseline has been set or not, before moving to the next stage (or) starting the next step in the process.
I have to confess. The inspiration for this blog post came from this Nintex tutorial. If you are using Nintex, check the tutorial out. With Nintex, they show how one could use the Query Project Server option to query project server data, to check for the baseline.
I wanted to see if this could be done via the SharePoint Designer 2013 Workflow in Project Server 2013.
So, lets get started.
Step 1: Create the Custom fields to check for Baseline
To start off, we will create two custom fields, one to check for the baseline at the Task Level, and one to check for Project Level Baseline.
Create a Task Level Custom field, a Number field, as below. Make sure you set it to roll-up as SUM for Summary rows. We will call this field Baseline Check.
Next create a Project Level Custom field, we will call this Project Baseline Check, as below.
So, the idea here is that, for every task in the schedule that does not have a baseline in the schedule, the task custom field, Baseline Check will return 1, and sum up to the project level custom field, project baseline check. Now all we have to do is to check if the Project Baseline Check field is greater than zero, when a project is submitted, and take appropriate action in the workflow.
Step 2: Build the workflow
To get started, open SharePoint Designer 2013, and connect to your PWA Site. Start by building a new Site Workflow, and selecting the SharePoint 2013 -Project Server Workflow.
Add your Project Stages to the workflow. In my example, I use the stages Scope and Portfolio Selection, but really this “Snippet of Workflow” could be used anywhere your process mandates.
So, I build my workflow as follows.
The only step that really requires any explanation here is the, step where In check for the Project Baseline Check value. There all I am using is the condition, If Any value equals Value, and selecting Project Data from the lookup values.
Also, you could send an email to the Project Owner, as well. the Send email action looks like this. (Caveat: Make sure that the Project Owner has a valid email address in the system)
So, complete your workflow with any additional actions you desire and publish it. Do not forget to attach it to an Enterprise Project Type.
Step 3: Test the workflow
So go ahead and create a project, using the EPT you attached the workflow to. It look something like this.
If you look at the schedule, I have not set the baseline yet. Pay attention to the Baseline Check field, which is greater than 0 (which is also the Project Baseline Check)
Now, if you go ahead and submit the workflow, you will see that the Project returns back to the Scope Stage, and does not advance.
If you look at the workflow history log, this is what you will see.
Now, I will set the Baseline, publish the project. Pay attention to the Baseline check field value, which is zero right now.
Now, if I submit the project, you will see that it advances successfully to the next stage, in the workflow.
So, obviously you can add many other actions within these steps, per your requirement.
Final Caveat: The logic in this workflow, assumes that you have published your project before submitting to the Gate. To check for that, you can check the Last Published Date from within the workflow as a prerequisite. More on that in the next post!
February 1, 2015 at 1:10 pm
Hi Prasanna,
This is just awesome! Thanks for sharing o/
March 24, 2015 at 5:27 pm
Hello Prasanna,
This is wonderful and very helpful post.
Thanks a tonne for you 🙂
Regards,
Shashank
August 25, 2016 at 12:08 pm
Hi, I’m trying to replicate baseline check in my workflow also, but the formula used: IIF([Baseline Finish] = ProjDateValue(“NA”), “1”,”0′) doesn’t work for me? Can you tell me how I can fix this? This is the error message I got: “The custom field could not be saved due to the following reason(s):•This formula contains errors. Correct the formula and try again.”
August 25, 2016 at 1:37 pm
Anonymous,
It seems like you have a single quote after 0, in the formula, which could be causing the issue.
August 26, 2016 at 5:38 pm
Thank you!! This blog post has been tremendously helpful, no where else online has anyone shows steps for baseline check using SharePoint Designer! Thank you for the tips and tricks!
A couple questions: I notice that the baseline check clause failed to work during my testing of the workflow. I was able to submit to the next stage and bypass the check baseline clause. It took me a while to figure out what was wrong.. I then populated the Baseline Check and Project Baseline Check columns in my schedule(they can’t be hidden), and then did a publish. Then I restarted my workflow to test again, this time it was successful and I couldn’t move pass until I baseline. This is strange because I was under the assumption that nothing is every deleted on MS Project but columns can be hidden, and that data within the columns can still be called upon. Is this a caveat? And did you experience this yourself? Is there a way around this?
Do you have any how-to’s for a second baseline check? In the next stage after the first baseline check, I need to check that Baseline 1 has the original Baseline 0 saved to it and that Baseline 0 has been re-baselined?
Thank you for your prompt response!
August 27, 2016 at 8:30 am
I do not think it has anything to with hidden/visible columns. I am guessing that the project was not published before it was submitted to the next stage.
To make sure this does not happen, include a “publish” project action, when a project is submitted. That way, you are not depending upon the user to publish.
August 29, 2016 at 1:11 pm
I was able to have SPD checked baseline 1 by twitching your formula, is there a way to check Baseline 0 again when it has been rebaselined?
Wow, I didn’t know there is a publish project action!! I looked under the action dropdown in SPD but didn’t see it. I did a Google search and it didn’t yield much on how to accomplish this. Is this something you need to custom create?
August 31, 2016 at 2:59 pm
1) If you are using Project Online, the publish action is included. If you are using on-prem, you will have to use the HTTP Web Service call action. Some more direction here: http://www.christineflora.com/2015/05/updating-a-project-field-from-workflow-sharepoint-designer-2013/
2) To check if Baseline 0 has been copied to Baseline 1, you could do it in two different ways:
1) Create a custom field at task level, which is the difference between Baseline1 and baseline0 values, then total it up and see if the value is greater than zero.
2) You could store Baseline 0 values in a SharePoint list, and then compare Baseline 1 values by querying that list.
August 31, 2016 at 4:47 pm
Thank you so much!
I thought I would finally not have to come back here and bug you but I run into an issue with the Baseline Check. On some of schedules on my instance, the baseline check column would display numbers (which is correct) but for some schedules it error out. In the Baseline check column I would get #error. Why do you think this is the case and what can we do about it? The schedules are all on the same PWA instance using schedule templates the we rolled out.
September 26, 2017 at 4:05 am
Hi, I have the same problem about formula error, as first post, but the formula seems correct. Could you please suggest me what I can check?
IIF([Baseline Finish] = ProjDateValue(“NA”), “1”,”0″)