For anybody that has looked at my blog before knows that I've been working with InfoPath 2007, InfoPath Forms Services and SharePoint 2007 Enterprise and I've been sharing some of my experiences from my projects. In a recent post I talked about using InfoPath Forms Services and using the Content Type that it creates for Form Libraries and today I would like to continue down that road and talk about SharePoint Site Columns. The introduction of Content Types and Site Columns in the latest version of SharePoint has brought to the table another thing that needs to be understood when building an Information Architecture. When you plan to deploy a large amount of forms for your organization it would be ideal to reuse existing columns as much as possible to help keep things more manageable. What this post will explain is how to use existing SharePoint Site Columns from existing forms for fields that you're promoting from new forms to a Form Library. Content Types and Site Columns are located on Site Settings page of a SharePoint site and can be found under the Galleries column.

Each Site Column is group by different categories and the one we are interested in is the "Microsoft Office InfoPath" categories. Everything that is included in this group is currently being used by published InfoPath forms. If you look at Site Columns and scroll down or change the Show Group drop down to the "Microsoft Office InfoPath" category you'll notice all the promoted columns from your forms. In the example below you will notice that there is about 12 columns and most of them are unique but some are duplicates. The reason for the duplicates is because 2 different forms promoted the same field names but didn't reuse the existing column.

Let's take this a little further now. Let's say you don't have 2 forms but 100 forms and half those forms promote the Divisional Controller field. Instead of having 2 duplicate fields all the sudden you have 50 duplicate fields. From a supportability standpoint this would be a nightmare to manage but you might be thinking that still wouldn't be a big deal because nobody comes to this page anyway and it doesn't effect anything in the libraries. Well this is not the only place you would run into this problem. You would also have issues in Form Libraries that have multiple forms specified. The forms would have duplicate columns and these columns would show multiple times even in the form libraries. The example below shows 3 forms and 2 of the forms reuses columns but the third form doesn't. Could you imagine what this would look like if you had 4 or 5 different forms specified for this library and didn't reuse existing columns.

Enough of me telling you what could happen if you don't reuse existing columns and let me show you how to reuse columns from InfoPath designer. In InfoPath there is two ways to promote fields as columns. One way to promote a field is by using Property Promotion option in Form Options (Tools->Form Options->Property Promotion).
The Property Promotion allows you to specify what fields you want to Add, Remove or Modify. Whenever you add a new field you get the below popup that lets you choose what field to promote but it doesn't give use the ability to choose from existing columns from a SharePoint site. But if we look at this popup a little closer it gives you a secret message at the bottom where it could be done from.

It tells us that other options are available on "Select a Field or Group" screen when publishing the form. These extra options are what give you the ability to choose existing Site Columns from the Web or Site Collection that you are publishing to. When you are publishing to InfoPath Forms Services it's really important to add the URL where the form will be activated to even though you are publishing the template initially to the file system. It's important because this where the list of Site Columns comes from. If fields have already been promoted then highlight the field you want to change and click the Modify button. The "Select a Field or Group" popup will appear and now you'll have the "Site column group" and "Column name" fields.

By default the "Site column group" field will have "(None: Create new column in this library)" and if you click the drop down then it will list all the existing groups. If you scroll down you'll see "Microsoft Office InfoPath" and when chosen the "Column name" field changes to a dropdown list box and lists all the existing columns that you can choose from. If you choose one of the existing columns then the form will use it instead of creating a new one when the form is activated. InfoPath will remember the column properties that you set and it won't be necessary to do it again. If the column doesn't exist then use the original setting and the column will be created but when you republish the form make sure the settings are updated to point to the existing column. If not another column maybe created and you'll end up having duplicate fields.
Once the columns are created SharePoint gives the flexibility to create a new group in Site Columns and change the column grouping. This has been done with several clients in the past and groupings are usually done by line of business or something else that is logical for that company. Using Content Types and Site Columns has really helped my clients streamline and organize the forms in SharePoint and keep the maintenance down to a manageable level.
As always if somebody has anything to add please post a comment because I'm always looking for opinions.
Cheers