Friday, February 21, 2014

SharePoint 101: Naming and Site Columns

I've been working with SharePoint 2010 for around 4 years on the front end, over that time I have found ways to make life easier for myself down the road. Here are a few simple but vital standards everyone should use when creating a site.

What: Naming

Where: Any time creating something new

When: Creating Site Columns, Content Types, Lists, Libraries, Pages, sub sites etc… keep the name as simple as possible. Ideally you want to use one word or a TLI (Three Letter Initials), do not use spaces, do not use long winded descriptions to start with.

Why: Because when you initially create something in SharePoint it uses that name to hardcode in a system variable. If you name a site Vacation Requests the URL for that site will have a %20 between the two words this is wasted space and can cause problems down the road. Same goes for Document Libraries, Lists and Tasks.

Even the default Document Library of a newly created site has this flaw in it.

If you create a column with a space or long winded name you can run into programing issues, I had this problem when inserting the Property Name in Custom Query Web Parts (CQWP) that I made for a custom user Dashboard (future post):

\<property name="CommonViewFields" Current_x0020_Status,choice;Start1,DateTime;

When I created "Current Status" with spaces and I ended up with 7 unnecessary characters, had I named it CurrentStatus, CStatus or CS (Status is a default) it would have been much simpler to figure out and code. Keep it simple.
 


What: Site Columns

Where: Site Actions > Site Settings > Site Columns
When: All the Time. Period. (ok most of the time)

Why: When you use site columns they can be reused on multiple list, sub sites and Content Types. This allows you to create a column once and use it over and over. When you update a site column you have the option of disseminate your update for all columns or just add it to other lists that are created afterwards.

Site Column setting:

This allows you to make a status like (again) Current Status and customize it for multiple lists, this is especially useful if you don't let users update them but rather workflow. Even if the list doesn't need "Pending Approval" you can still use the column and allow workflows and triggers select the necessary actions. 


How: to create a column under site Columns click on the Create at the top 

Chose the title (one word) then choose the Type:  

Once you select a specific column type you may not be able to switch it to another type so choose carefully as you may have to delete it later and start over.

Now you need to select where this will be found in the list under the Site Column List. If you are making multiple items that will be used for specific purposes then you should put them in a new custom group.

The rest should go under your new category or Custom to be easily found. 


Additional Columns Settings is where you want to spend some thought, especially since some columns NEED information here:

You can always come back and add remove options.

Now to use the newly made Column:

These can be added to a list or library and go to List Tools > List > List Settings >


Then Add from Existing Site Columns 

Now select your Group 

And select the Columns you want to add 

Now they show up as a column under the list. 


No comments:

Post a Comment