Project Server: Flag fields – why can’t I make them required?

We have had a couple of questions recently relating to this, so thought I’d post some explanation.  In Project Server 2007 we hid the option to make flag custom fields required as soon as you selected a custom field type of ‘Flag’.  In 2010 we just greyed out the option, which might be what has raised awareness of this one.  A Flag field has just two values.  Yes or no. (no that wasn’t a question – but the answer).  By default the value is set to No.  If the user wants to they can change to Yes.  But it will always have a value (either Yes or no) – so there is absolutely no point in making it required – so we do not even give you the option.  For this same reason in the workflow we do not display any fields of type flag in the list of fields to be required at specific stages – because it will always have a value anyway!

When asking this question what customers really want is a way to ensure that the flag has a value that someone has consciously set – rather than the default.  So does ‘No’ mean ‘No’ – or did the user just not bother changing it?  One way around this is to create a lookup table with three values:

  • Not Set
  • Yes
  • No

and make Not Set the default for the custom fields that use it.  This remove ambiguity.  Or you could just have two values in a lookup table – Yes and No, but for the custom field have no default and then you could make the custom field required.  In this case a blank value means it has not been set..  I hope that gives you enough options to achieve what you need.

Technorati Tags: ,