Derik Whittaker

Syndication

News


Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Renaming Issue with a Site Column in Sharepoint

One of the features with Sharepoint (WSS 3.0 is what I am speaking about) is the ability to create ‘site columns’ for use in your site.  A site column is basically a data column that can be shared across all libraries/sub sites within your Sharepoint site.  This is a really nice feature, but beware as potential trouble is around the turn.

How so, turns out that whatever name you give the column upon initial saving is the one it keeps.  Sharepoint keeps an internal name and a display name (key, value pair).  You always see the display value, not the key.

For example, you create a column called ‘Red Bell’ and you save it, then you notice you misspelled the name and you change it to ‘Red Bull’.  You save your changes and go along on your marry way.  What you did not notice is that the actual ‘key’ did not change, just the display value.  Now, if you are NEVER going to be creating custom web parts, or using the API (via assemblies or web services) this should not be an issue for you.  However, if you do plan to do any custom development against Sharepoint, this may be an issue.

How to find out the ‘real’ name of the column? Simple, just look in Sharepoint and you can find it.  Bad news is, that to the best of my ability there is NO screen that will actually show it to you.

Here is how to get the real name

  1. Navigate to the Site Column Gallery
  2. Click on the column you are looking for
  3. Check the URL, yup, you read that right.  Check the URL

The real column name is in the URL
…/fldedit.aspx?field=CheckNumber&Source=%2F%5Flayouts%2Fmngfield%2Easpx….

The CheckNumber field is one word, but in my Site Column Gallery it is Check Number.

Hope this helps someone, I know I was pulling my hair out trying to understand why my web service calls worked for all columns but this one.

Till next time


Posted 08-09-2007 2:34 PM by Derik Whittaker
Filed under:

[Advertisement]

Comments

Links (8/9/2007) « Steve Pietrek’s SharePoint Stuff wrote Links (8/9/2007) « Steve Pietrek’s SharePoint Stuff
on 08-09-2007 8:46 PM

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)