Tom Clarkson

SharePoint, Startups and some other stuff

MOSS Column Limits and SharePoint Solution Generator

with 4 comments

My current SharePoint project involves setting up lists in the browser then packaging them as features for deployment. To export the lists we are using SharePoint Solution Generator (the one good part of VSeWSS). This works well as a one time process but since some manual cleanup is needed to handle lookup fields any later changes probably need to be done by manually editing schema.xml.

 
 

If you need to add an additional field in schema.xml it is reasonably easy to copy an existing field definition. However there are some attributes that can’t be copied as is. Actually I suspect that most of the attributes exported by solution generator are unnecessary, but I don’t like to mess with them too much as it can be hard to tell whether or not Xml changes have taken effect.

 
 

The attribute colname indicates how the field will be stored in the underlying database. There are two things to watch for when setting this:

 
 

Duplicates

Trying to store two values in the same column won’t work unless you also mess with rowordinal, which I wouldn’t recommend. The error this produces when you try to create the list is at least reasonably clear and the log file tells you which column is causing the problem.

 
 

Column limit exceeded

This one took a bit of tracking down because the error is one that normally only appears in SharePoint 2003:

 
 

Column Limit Exceeded

 
 

There are too many columns of the specified data type. Please delete some other columns first.

Note that some column types like numbers and currency use the same data type.

 
 

SharePoint 2007 lets you create thousands of columns (albeit with some performance limitations). Full details can be found in MOSS 2007 Column Limitations. However, because SharePoint supports this by adding additional rows rather than columns, the fixed limit still applies to column names. The first solution you try to the duplicates is increasing the numbers and trying to put something into int17 will fail.

 
 

Fortunately the solution is simple – remove the colname attribute altogether.

Advertisement

Written by Tom Clarkson

September 19, 2008 at 3:07 am

Posted in SharePoint

4 Responses

Subscribe to comments with RSS.

  1. Man Tom, you’re a lifesaver…

    Josh Einstein

    May 1, 2009 at 5:06 pm

  2. Great article, the colname sent me in the correct direction to solution of my problem :D

    Nico

    August 7, 2009 at 1:03 am

  3. Migrating from 2003 to Moss. How can we bring the columns over from 2003 for document upload metadata into 2007?

    John Tsai

    September 12, 2009 at 7:07 am

  4. hi tom
    can you help me…
    I made a form with infopath and published it into sps2010 but I want to have more columns in my list just with number type but it couldn’t publish it and made this error:Column Limit Exceeded!
    how can I solve this problem,or how can I change this limit I should have more number columns in my list.
    thanks alot

    shima

    February 22, 2011 at 7:30 pm


Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.