InfoPath 2007 and SharePoint Site Columns

by michaellotter 10/24/2007 12:06:00 PM

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

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

MOSS | InfoPath 2007

Related posts

Comments

10/25/2007 9:39:50 AM

http://


I'm working with SharePoint Server 2007 and Infopath 2003.

The above "hidden options" are not there in InfoPath 2003.

Is there anyway to not duplicate columns without these options to use existing columns?


http://

10/25/2007 12:23:20 PM

http://

Just let you know that width your posting is not enough, so that text is cut off both in firefox and IE7.

http://

10/25/2007 10:32:48 PM


Hi Fred,

Thank you for letting me know that the text is being cut off from the main page. I guess its been caused by the posts that I paste from MS Word. If you click in the entry post title it will not cut off the text.

Thank you again for pointing it out.

Cheers,
Michael


Michael Lotter

10/25/2007 10:38:37 PM


Hi Alan,

I've only seen this capability in InfoPath 2007 and unless MS released a InfoPath 2003 update to add this functionality then I don't think its possible.

Cheers,
Michael


Michael

10/26/2007 3:35:23 AM

http://


Thanks Michael,

I'm curently borrowing a desk in a large institution doing most of my work via a thin client. Unfortunatly the chances of the IT dept. giving me access to a newer version of InfoPath/Office are slim!

Thanks again for your site, it's been a great help.
Alan


http://

11/6/2007 9:33:38 PM


Thanks for the information Michael. I was wondering how to make my own column titles rather than being stuck with InfoPaths defaults when using property promotion.

Bob


Bob Silva

11/8/2007 8:18:39 AM


Hi Bob,

All you should have to do is update the column name field and then you should be fine. If you are using an existing Site Column then this change will need to be made in SharePoint first or you will need to create a new column.

Hope this helps.

Cheers,
Michael


mlotter

11/16/2007 1:24:10 PM

http://

Ok. But now I have all these duplicate columns already. They seem to be readonly in SharePoint. How do i remove the duplicates so i can begin using only 1 column?

http://

11/17/2007 1:32:47 PM

http://

Hi, I have the same problem as Tim. How do I clean up SharePoint 2007 to remove the duplicate columns? Also, I published two seperate InfoPath Forms as content types and then specified that they use the same columns, but now I have 3 columns? The new column does not show any data in my document library either. How do I get the data to show up? Thanks in advance for you time!

http://

11/17/2007 2:02:34 PM

http://

Okay, I figured it out. I had to go in and delete all the content types and their respective site columns before I could then re-publish the two forms to utilize the same site columns. Now it's working great!

http://

11/18/2007 10:39:43 PM


Hi guys,

Sorry for the late reply but I was out this weekend at the Nova Code Camp and I'm just now getting back in the swing of things. The last comment Jason posted is pretty much the only way to do it. In some cases you don't have this option and what I've done in the past is just make the switch and just leave all the forms in the same library and just create different views.

Cheers,
Michael


mlotter

1/6/2008 11:57:07 AM


Hi Michael, I have a data connection to a WSS list (inventory) in a drop down list box in a IP 2007 form template and a repeating section that is my inventory picking list. When I set a fields value in the repeating section from the drop down list it works fine. When I select another item from the dropdown list it changes the previous item in the repeating section. What is happening is all item fields in the repeating section are the same as the last choice I made from the dropdown list.

How can I keep the previously set values in the repeating section and only update the new one?


Hal Oliver

1/7/2008 9:13:16 AM


Hi Hal,

I'll take a look at the situation your having tonight because I don't know the answer because I really don't deal with repeating sections that often.

Cheers,
Michael


mlotter

1/15/2008 10:05:42 PM


Hi Hal,

I'm not sure what is going on with you're form because I'm unable to replicate the problem. I've tried several different scenario's. If you are still having problems and need help please send me a email.

Cheers,
Michael


mlotter

1/28/2008 11:16:54 AM

http://


Michael

I seem to be having a variety of problems with SharePoint and InfoPath, specifically around the number of site columns I now have, and the error I get when trying to re-publish an InfoPath template which is the primary form into a library. Basically we seem to have ended up with a site column list which has many entries duplicated, and all of which come from the same source template file. We are also getting the 'Updating content type failed' error message whenever trying to re-publish a template, especially if we have added 2nd and 3rd content types which are also InfoPath forms.

Do you have any thoughts about the reasons for this, how we can prove what the problem is (whether it is the template form(s) or the library or the SP site as a whole etc) and any ideas how we can resolve it back to a working system. To make matters worse, this library holds about 32,000 documents and is now approximately 3gb in size including attachments etc.

We've copied everything out several times now and rebuilt the library from scratch, but things still error.

Any help would be very gratefully received.

AlanC


http://

1/28/2008 1:16:26 PM


Hi Alan,

If you can send me a email by using the "Contact" link with a few more details like are you running WSSv3, MOSS, MOSS Enterprise or Forms Server and how many site columns do you currently have and how you are publishing the form. I would be more than willing to exchange emails with you on your problem.

Cheers,
Michael


mlotter

2/7/2008 6:07:59 PM

http://


I have site columns in sharepoint that are of typ choice list box and I want these same choices to appear in an infopath form. How do I create a data connection to the content type and more specifically the site columns so I can reuse my exisiting columns that sit within sharepoint in my infopath forms? The choices in these lists can change over time so I want to have one master list of columns that all forms can pull from whether it's an infopath form or a simple libray upload form.

thanks -


http://

2/12/2008 9:40:02 AM


Hi Clint,

I don't know of an out of the box way to pull the list box choice items from a content type without writing code and I'm not totally sure if this would be possible but I can’t see why it wouldn’t be. I would imagine that you could create a web service and class that could pull those values and once this was built then you could use the web service as a secondary data source and use it for a dropdown list. You can reuse Site Columns for any type of content type and for InfoPath you just need to specify these when you publish the form and come to the property promotion screen.
If you would like to discuss this in more details please fill free to send me an email by using the blog Contact option.
Cheers



mlotter

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

9/8/2008 12:11:05 AM

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen

About the author

Name of author Author name
Something about me and what I do.

E-mail me Send mail

Calendar

<<  September 2008  >>
MoTuWeThFrSaSu
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

View posts in large calendar

Recent comments

Tags

Don't show

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2008

    Sign in