MS Project Formula: Custom Field for Checking Logic

A custom field that I use constantly when building project schedules is for checking if the task is missing either a predecessor or successor.  I call this field Logic, and I find it handy because the last thing you want on your hands is a project schedule with spaghetti logic.  The best practice for network logic is that every task has a predecessor or successor, except for the first task or the last task.  Of course, each project has it’s own quirks and you might find this doesn’t make sense.  That will have to be something you need to decide whether to not follow this, but make sure you clearly document it in your project plan assumptions.

Define Custom Field: Logic

The first thing to do is to create a custom field named Logic.  I will build it using Flag1.  

Step 1 – Highlight your first column by clicking on the title name of your column.

Step 2 – Right-click and choose Insert Column.

 Step 3 – Scroll down or start typing Flag1.  Choose Flag1.  Once the Flag1 column is in your Gantt Chart view highlight the whole column and right-click.

Step 4 – Rename Custom Field. Make sure you have Flag1 chosen.  Then click on Rename, change the name from flag1 to Logic, finally click OK.

Now we have created the field Logic.  Don’t close the Custom Fields menu yet.  Now we are going to build the formula to show us where we are mission a predecessor or successor (or both).  Then we will add a graphical indicator to quickly spot our missing logic.

Step 5 –  Click on the Formula button in the Custom Fields menu.  Type in the following formula in the Edit Formula box.

 

IIf(([Predecessors]="" Or [Successors]=""),True,False)

Here is the project image below

Don’t close your Custom Fields menu yet!  The last part is to put a graphical indicator (image).  It’s easier to spot this way instead of seeing yes and no all over the column.

Step 6 – Click on Graphical Indicators… button towards the bottom of the Custom Fields menu.  In the test for logic field type equals, in values enter True, and in image choose the image that you best like.  Then click OK, and OK again.  You are done.


If all is working correctly you should see where you might be missing logic on your Logic column shown with an image in each row that has missing logic.

That should do it!  You now can quickly see where you need predecessors or successors.  You can customize it into two different custom fields if you want to check one or the other.  Have fun building custom formulas!