So here I was, late at night, banging my head against the desk trying to figure out why my a custom field’s custom property wasn’t hiding when I clearly stated Hidden=”true”. As it turns out, you need to specify the uppercase value for that boolean or it simply won’t work. There’s no error; it just doesn’t hide. Here’s a snippet of code where this bit me while developing a custom column using the ProperySchema section to allow additional settings to be used for the field.
<Field Name="TypeDisplayName">My Custom Column</Field>
<Field Name="TypeShortDescription">My Custom Column</Field>
As you can see Hidden is set to “TRUE.” “true” simply does not work.
What’s funny is that the WSS.XSD gives you intellisense in VS.NET (in most areas) for the following options for boolean fields: true, false, True, False, TRUE, FALSE. Ok. Why?
This was just one case where my choice of case caused an issue. What about everywhere else? So proceeded to tell my colleagues, including Bryan Phillips, about this oddity with hiding properties of custom fields. He said that he always uses uppercase. Not only for custom columns, but for everything. I’ve typically used lowercase since it seemed to be close to my c# practices. However, from now on, I’m going to capitalize my boolean values.