SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

InfoPath 2007 and SharePoint Site Columns

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


Posted 10-24-2007 2:06 PM by mlotter

Comments

Alan Geering wrote re: InfoPath 2007 and SharePoint Site Columns
on 10-25-2007 10:39 AM

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?

Fred wrote re: InfoPath 2007 and SharePoint Site Columns
on 10-25-2007 1:23 PM

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

Links (10/25/2007) « Steve Pietrek’s SharePoint Stuff wrote Links (10/25/2007) « Steve Pietrek’s SharePoint Stuff
on 10-25-2007 7:43 PM

Pingback from  Links (10/25/2007) « Steve Pietrek’s SharePoint Stuff

mlotter wrote re: InfoPath 2007 and SharePoint Site Columns
on 10-25-2007 11:32 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

mlotter wrote re: InfoPath 2007 and SharePoint Site Columns
on 10-25-2007 11:38 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

Alan Geering wrote re: InfoPath 2007 and SharePoint Site Columns
on 10-26-2007 4:35 AM

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

Bob Silva wrote re: InfoPath 2007 and SharePoint Site Columns
on 11-06-2007 9:33 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

mlotter wrote re: InfoPath 2007 and SharePoint Site Columns
on 11-08-2007 8:18 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

Tim wrote re: InfoPath 2007 and SharePoint Site Columns
on 11-16-2007 1:24 PM

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?

Jason wrote re: InfoPath 2007 and SharePoint Site Columns
on 11-17-2007 1:32 PM

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!

Jason wrote re: InfoPath 2007 and SharePoint Site Columns
on 11-17-2007 2:02 PM

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!

mlotter wrote re: InfoPath 2007 and SharePoint Site Columns
on 11-18-2007 10:39 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

Hal Oliver wrote re: InfoPath 2007 and SharePoint Site Columns
on 01-06-2008 11:57 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?

mlotter wrote re: InfoPath 2007 and SharePoint Site Columns
on 01-07-2008 9:13 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 wrote re: InfoPath 2007 and SharePoint Site Columns
on 01-15-2008 10:05 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

Alan C wrote re: InfoPath 2007 and SharePoint Site Columns
on 01-28-2008 11:16 AM

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

mlotter wrote re: InfoPath 2007 and SharePoint Site Columns
on 01-28-2008 1:16 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

Clint wrote re: InfoPath 2007 and SharePoint Site Columns
on 02-07-2008 6:07 PM

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 -

mlotter wrote re: InfoPath 2007 and SharePoint Site Columns
on 02-12-2008 9:40 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

Caspur wrote re: InfoPath 2007 and SharePoint Site Columns
on 03-12-2008 4:51 PM

Clint another option you might look at would be to look into the functions of Look up columns that could use a custom list for you typ choice selection.

The custom list can then be utilized through IP as a data source. Upon publishing in theory you could than write this back to the site column (the lookup version not the source list).

I am actually working through this issue currently. I am woking with an IP 2003 form on MOSS 2007 (Had gone through a previous upgade from MOSS 2003). A recent migration to a new server farm created the same duplication you describe here with one difference. No duplication in the site columns list, and only the single form.

Futhermore the columns in the actual library are all populated identically including items that were posted in 2006 even though the twins have only existed for a few weeks. I am just fishing for advice here while I keep working on the issue, just thought you could use another twist :)

Stuart wrote re: InfoPath 2007 and SharePoint Site Columns
on 05-06-2008 6:06 PM

HI there,

I am trying to publish a form to a Form Library and I am trying to use existing site columns. I have created a simple form with one field and have marked it for Property Promotion.

When I go to deploy I find the Gender Site Column and map it to my field. When I go to create new entry in form it does not show up as a choice but empty text box.

Any help is appreciated.

Thanks

Jenny wrote re: InfoPath 2007 and SharePoint Site Columns
on 05-09-2008 12:17 PM

I'm also getting 'Updating content type failed' error message whenever trying to re-publish an infoPath form template to the same library.  

I'm running MOSS and when I try to re-publish 31 it’s OK, but above 49 columns to the SharePoint form library, when it fails.  And I get many duplicate columns.

Please provide a solution on how to fix this problem without deleting data from my SharePoint site.

Thanks in advance!

Jenny

Jenny wrote re: InfoPath 2007 and SharePoint Site Columns
on 05-09-2008 12:21 PM

I'm also getting 'Updating content type failed' error message whenever trying to re-publish an infoPath form template to the same library.  

I'm running MOSS and when I try to re-publish 31 it’s OK, but above 49 columns to the SharePoint form library, when it fails.  And I get many duplicate columns.

Please provide a solution on how to fix this problem without deleting data from my SharePoint site.

Thanks in advance!

Jenny

David Saynor wrote re: InfoPath 2007 and SharePoint Site Columns
on 06-13-2008 6:37 AM

I have a similar issue with updating form templates but only when the number of promoted fields passes a certain limit.

This is a real problem and is causing huge logistical problems for me.

Also, when the update of the template fails it sometimes has created some or all of the required sharepoint columns but since the process fails we end up with multiple instances of the same column, very untidy and you can only deleted them if they were set to be editable.

sharepoint forms no infopath wrote sharepoint forms no infopath
on 07-10-2008 8:50 PM

Pingback from  sharepoint forms no infopath

Sam wrote re: InfoPath 2007 and SharePoint Site Columns
on 08-20-2008 1:06 AM

Hi Michael,

I have published an InfoPath form with a 'Time' field and now i couldn't remove this site column. Is there a work around to remove the site column?

Thank you in advance.

Nandini wrote re: InfoPath 2007 and SharePoint Site Columns
on 09-10-2008 5:24 AM

Hi Michael,

I am working on microsoft infopath forms 2007 and MOSS 2007. I am facing the same problem as you have mentioned earlier. i am getting "Updating Content Type failed" when i try to republish the form.

I would be very greatfull  If you could share the solution if you have any.

cvaa wrote re: InfoPath 2007 and SharePoint Site Columns
on 09-11-2008 12:37 PM

Friends,

  I am currently working with InfoPath 2007 and deploying them in Sharepoint (MOSS). Each and every form will be deployed as an individual template and viewed through XmlFormViewer web part.  I just need to know if this is a right way of approach / architecture that should be followed.

 The other approach is to develop using Visual Studio .NET, what are the pros and cons ?

hoda007 wrote re: InfoPath 2007 and SharePoint Site Columns
on 10-06-2008 7:23 PM

I just saw this blog, a few days too late :(

I already have a MOSS 2007 env with multiple templates (created in infopath2007) and numerous documents created based on them.

they all have the exact same field names being promoted (ScenarioID, Scenario name, Team Lead, ... (actualy all the other fields have the same name also)

As you might have guess now I have a whole lot of columns, and three of each.

Can I just delete all the columns and republish my templates, and not lose my existing form templates?

thank you

Richard Harbridge wrote re: InfoPath 2007 and SharePoint Site Columns
on 12-05-2008 3:13 PM

I am surprised but have not yet been able to find a solution, workaround, or adequate explanation as to why InfoPath gives a "updating content type failed" message when you try and publish many fields.

Does anyone have any feedback on this one?

Phil Birkland wrote re: InfoPath 2007 and SharePoint Site Columns
on 01-26-2009 8:45 PM

I am also still facing this problem.  I noted on another forum that there could be a timeout issue at hand on the server or that there could be a max number of different types of fields you can promote.  I still see no resolution, and about to abandon InfoPath as it appears to be too immature of a tool to use.

nancy wrote re: InfoPath 2007 and SharePoint Site Columns
on 02-12-2009 9:26 AM

I was wondering if there is any alternative for not promoting field while publishing your infopath form.

Promoted column approach, not only causes issue for publishing complex forms later down the road, but also it is not maintainable, and you end up with having massive number of columns under your column list.

Any alternative?

Thank you

nancy wrote re: InfoPath 2007 and SharePoint Site Columns
on 02-12-2009 9:29 AM

Phil and Richard,

Please check the link below. It helped me alot. Hopefully it helps you too.

But again, back to my previouse comment, There must be some way around this so we don't have to promote any field at all.

acuffgroup.com/.../tip-for-publishing-infopath-form-to-sharepoint-library

Phil Birkland wrote re: InfoPath 2007 and SharePoint Site Columns
on 02-28-2009 8:19 PM

My resolution much like the acuff group link was to create my columns in sharepoint first.  But this only worked when promoting to a document form library as opposed to publishing to a content type.

I never was able to flawlessly publish to a content type.

Chris wrote re: InfoPath 2007 and SharePoint Site Columns
on 03-10-2009 3:24 PM

Please fix the pictures as this post is really helpful!

John wrote re: InfoPath 2007 and SharePoint Site Columns
on 03-18-2009 4:03 PM

I recently modified the type of a site column (eg changed from "Yes/No" to "Choice").  Directly after clicking o.k. the site column disappeared and now I cannot find the site column anywhere.  When I try to recreate the site column I get an error message stating "the site column is in use or reserved, try another name".  Do you know how I can recover this site column, or where it is?

Thanks

Rakesh wrote re: InfoPath 2007 and SharePoint Site Columns
on 03-27-2009 2:01 AM

i have the same issue it may be because of number of fields see the link for solution which i have used

raundal.blogspot.com/.../infopath-updating-content-type-failed.html

Alana wrote re: InfoPath 2007 and SharePoint Site Columns
on 05-08-2009 1:16 AM

Hi,

I recently published a form through central admin and applied it to a library as a content type. I then decided I didn't want that form in that library anymore so I removed the content type. Unfortunately, the site columns have remained in the library even thugh I removed the form. Because the columns are read only I cannot remove them. Could you please let me know how I can get rid of unwanted read only infopath site columns?

Tom wrote re: InfoPath 2007 and SharePoint Site Columns
on 06-15-2009 3:46 PM

How do get the data from an InfoPath form into a SharePoint Library that  is using several multiple list item fields?

Also was is the forumula for create a new file every time the form is used?

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.