Devlico.Us
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @devlicious

Derik Whittaker

Thoughts on Software Development, .Net, OOP, Design Patterns and all things cool



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



Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Derik Whittaker

Derik is a .Net Developer/Architect specializing in WinForms working out the northern suburbs of Chicago. He is also believer and advocate for Agile development including SCRUM, TDD, CI, etc.

When Derik is not writing code he can be found spending time with his wife and young son, climbing on his bouldering wall, watching sports (mostly baseball), and generally vegging out. Check out Devlicio.us!

Our Sponsors

Proudly Partnered With


This Blog

Syndication

News