After working with SharePoint Designer
2013 for about 3 years (in the context of Project Server Workflows), there
are some undeniable issues that every developer should know. This blog covers
the issue with missing If conditions.
If Statements Vanish
have experienced this issue on multiple computers pointing to different
environments (both on premises and Online). This issue is not caused by some
quirk on my local computer, it is a bug in SharePoint Designer.
This is the most common issue I have come
across with SharePoint Designer 2013. When you first create your workflow everything
goes smoothly. To give an example, for one client a workflow stage had this If
structure in the Transition to stage.
When I created it, I had no issue. I saved and published the
workflow and then moved on to my next task.
The next day, when I open SharePoint Designer and the workflow
this is what I see instead:
The conditions I had before were erased! So I had to
manually put back what I had entered the previous day.
This kind of thing with If statements happens all the time
when the condition is not “equals”. Whenever I put an If condition with a
comparison of “Not Equals” or “is empty” this is what happens.
After (publishing and re-opening)
To make this even stranger, the published workflow works
perfectly on the Project Server instance. If I were to create a project and
take it through the workflow everything would function as expected. It seems
like the issue is that SharePoint Designer cannot load what it saved.
To start, please verify that you have the latest version of
SharePoint Designer. The last update as of writing this was SP1 http://www.microsoft.com/en-us/download/details.aspx?id=42009.
Next, try to use “equals” conditions instead of the other
options wherever possible. For one client, I had this condition after an
That if condition would always get erased. To avoid having
to redo this If condition every time I opened the workflow, I changed it to
Instead of “Not equals” Approve, I put an “Equals” for each
of the other two options. Yes, this is more work at the beginning of the
workflow, but it’s better than having to re-enter your work each time you open