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!

Leveraging the use of Site Columns – Part II

This posting has a new location:

http://dougortiz.blogspot.com/2009/06/leveraging-use-of-site-columns-part-ii.html

 

In the previous blog posting we explored how to use Site Columns to propagate data throughout a Site
Collection. Now it is time to take it a step further, this time instead of saving the data within the Site
Column we will reference the data stored in a SharePoint List named Company Departments. We will
quickly create the SharePoint List, populate it and create the Site Column referencing the SharePoint List.

 

  1. Let's create the SharePoint List:
    • Click on the List Links on the left hand Navigation Bar
    • Click the Create Link on the Menu Bar
    • Click the Custom List from the Custom Lists Group
    • Set the Name to Company Departments
    • Select the Yes Radio Button choice from the Display this list on the Quick Launch?
    • Click the Create Button
  2. Populate the Company Departments SharePoint List:
    • Click the New Link on the Menu Bar
    • Set the Title Textbox to: Finances
    • Click OK Button
    • Click the New Link on the Menu Bar
    • Set the Title Textbox to: Human Resources
    • Click OK Button
  3. With our SharePoint List created we must create a Site Column that references the newly created

        Company Departments SharePoint List

  • Click on the Site Actions link on your site
  • Click on the Site Settings option
  • Click the Site columns link in the Galleries Group
  • Click the Create Link
  • Set the Column name to List Based Company Departments
  • Set the Type to Lookup (information already on this site)
  • Either choose Custom Columns from the Existing Group Drop Down or set the name
          for the New group, for this example we will use the Company Wide group name
  • Decide if it is Required that this column contains information, it is recommended to set it to Yes
  • Select from the Get information from: DropDown the Company Departments SharePoint List
  • Select the Title (linked to item) choice from the In this column: DropDown
  • Click OK Button

We are ready to put the List Based Company Departments Site Column in action! To use the newly

created Site Column we will create a SharePoint List named Employees and a required Column
named Company Departments that will use the Site Column by clicking on the Add from existing
site columns
link as shown below:

Add from existing site columns

The next screen will be the following:

Add Columns from Site Columns 

  • Select the Company Wide group or the name you assigned to the Site Column from the Select

          site columns from: Drop Down

  • The List Based Company Departments Site Column will be display in the Available site columns

          ListBox

  • Click the Add Button
  • Click OK Button

You are right ahead of me, our next steps involve testing that our Site Column works properly. For this purpose
we will attempt to create a new Employee:

Site Column being used 

As expected, the Finances and Human Resources Departments are listed in the DropDown. Go ahead
and add the Information Technology Department to the Company Departments SharePoint List created
previously and proceed to create a new Employee again. As you can see below, the newly item is
displayed in the DropDown.

 

New Choice in Site Column 

Comparing both methods of Site Columns Creation

While both methods accomplishes the same, there is a major difference between them:

The previous method requires either a SharePoint Administrator(s) or a User(s) with enough permissions to
update the Site Column every time that an update is required. 

The current method enables the SharePoint Administrator(s) to assign permissions to User(s) that can maintain
those SharePoint List(s).

Depending on the amount of updates that are required, the first method could become problematic in
environments in which a single person is the SharePoint Administrator along with other responsibilities
that already have been assigned to that position.

 


Posted 02-27-2008 8:25 PM by DOrtiz

Comments

SHAREPOINTBlogs.com Mirror wrote Leveraging the use of Site Columns – Part II
on 02-27-2008 10:02 PM

In the previous blog posting we explored how to use Site Columns to propagate data throughout a Site

Links (2/28/2008) « Steve Pietrek’s SharePoint Stuff wrote Links (2/28/2008) « Steve Pietrek’s SharePoint Stuff
on 02-28-2008 7:28 PM

Pingback from  Links (2/28/2008) « Steve Pietrek’s SharePoint Stuff

Using Site Columns to lookup information across sites in Sharepoint 2007 « Andys Techie Blog wrote Using Site Columns to lookup information across sites in Sharepoint 2007 « Andys Techie Blog
on 03-14-2008 4:49 PM

Pingback from  Using Site Columns to lookup information across sites in Sharepoint 2007 « Andys Techie Blog

Coops wrote re: Leveraging the use of Site Columns – Part II
on 04-01-2008 9:59 AM

Hi

Great blog posting. I have 1 question tho.

This appears to only make the new Site Column available to child sites and the creating site. Is there a way to use these site columns in other sites??

DOrtiz wrote re: Leveraging the use of Site Columns – Part II
on 04-01-2008 10:36 AM

Coops,

Glad you liked it, if you create the Site Column at the very top level it should be available to all the children Webs.

If you would like a more detail walk through just contact me ( Click the Contact Link ) and we can discuss it through email or via phone.

Regards,

Doug Ortiz

Sabin wrote re: Leveraging the use of Site Columns – Part II
on 04-10-2008 3:08 PM

Hi Doug,

I have been using this method but one problem that I am having and it's a major concern is that if you remove any items from the list that drives the site column(in your case say you remove Finance), then it will delete that metadata from items that use that in other places. So in your case if you removed Finances from the Company Departments list then all Employees in the Employees list that had Finances as their department would lose that information. Can you suggest how I can prevent that?

DOrtiz wrote re: Leveraging the use of Site Columns – Part II
on 04-10-2008 3:47 PM

Sabin,

Glad to hear that the blog posting is being put to good use.

I do have a suggestion that will prevent the deletion on that list; the solution consists of developing a ListEventReceiver that checks when an item is about to be deleted and displays an error message indicating that only Site Administrators are able to delete items from the SharePoint List.

This should prevent unwanted deletions from happening.  

Stay tuned because in a week or so I will illustrate how we can develop such this ListItemEventReceiver.

Thank you for following my blog.

Regards,

Doug Ortiz

Sabin wrote re: Leveraging the use of Site Columns – Part II
on 04-10-2008 8:00 PM

Hi Doug,

Thanks for the quick reply. I really appreciate it. I have thought of using Events to prevent such things. But the problem is not to prevent the deletion of items. Let me explain. We have documents that need to be stored for later retreival. When these docs are saved we need to save the Customer as a metadata. This customer metadata is what needs to be driven off the list. Now I am going to use a Timer job to keep this list in sync with the Database table. Now consider the scenario that they delete some customers from the db. Then our timer job would also remove it from the list. (Here is where I can prevent it from deleting. But if I prevent it from being deleted, then the next time someone goes to save a doc they see customers that no longer exist. And since they have thousands they want to limit the choice to be only the valid ones. Now if we do allow them to delete it, then sharepoint deletes the metadata from existing documents which prevents us to search for the document.

Sorry that this is too long. But I am trying to be as verbose as possible.

Another option that I am looking at is driving the metadata with a BDC, but I am not sure if this same problem of data being removed if an Item does not exist in the BDC will occur.

Your thought on this will be greatly appreciated.  

Thanks Again,

Sabin

Michael wrote re: Leveraging the use of Site Columns – Part II
on 04-10-2008 11:20 PM

Doug,

    Thank you for the education - learning alot this evening.  I was wondering if there is a way to perform the same type of funtion between Site Collections?

    Is there anyway to pull data up to the root from the children instead of the other way with site cols.  

    Thank you in advance for any ideas you can provide and keep up the good work with the blog.  

Michael

DOrtiz wrote re: Leveraging the use of Site Columns – Part II
on 04-11-2008 12:14 PM

Sabin,

Thanks for explaining in more detail, after reviewing the explanation it seems that deleting definitely is not needed. Mostly because, they still need to be able to search based on that Item.

It occurred to me, that they just need renaming so that they can still be searched. For instance, the Custom to be deleted is named: "MyCustomer" when it is required to be removed it should be renamed to "MyCustomer - Deleted" that way they still can associate the data to that specific customer and modify it to whichever new Customer it should be assigned to.

Hopefully this helps, if it still does not contact me through the email link on the blog and we will take it from there to brainstorm more ideas.

Regards,

Doug Ortiz

Sabin wrote re: Leveraging the use of Site Columns – Part II
on 04-11-2008 1:06 PM

Hi Doug,

Thanks for your reply again. A work around to this problem I have found is to use an extra site column that has the same value as the one that is associated with the list. So for instance when I upload a doc, I choose the metadata from a list of available values. As soon as I add the doc to the library, I have a List Event that copies the selected value into another column. So if in the future, they remove an item from the list of possible metadata, it will remove it from the document metadata but the document still has this backup metadata column that has the original value.

About marking it as deleted may not work in our scenario because it will change the metadata in the doc library anyway and users might get confused.

I don't know if Microsoft is aware that this kind of problem exists or what they recommend for it. Let me know your thoughts on it. This has been a great discussion for me.

Thanks again,

Sabin

DOrtiz wrote re: Leveraging the use of Site Columns – Part II
on 04-11-2008 2:26 PM

Michael,

I am glad to have been able to help you in the learning process. In regards to your question, there are two ways I can think of doing that: First with the DataView Web Part in SharePoint Designer and the other by leveraging the Content Query Web Part.

Thank you for reading the blog.

Regards,

Doug Ortiz

Sabin wrote re: Leveraging the use of Site Columns – Part II
on 04-15-2008 9:04 AM

Hi Doug,

Thanks for the blog and the quick replies.

Sabin

DOrtiz wrote re: Leveraging the use of Site Columns – Part II
on 04-15-2008 9:45 AM

Sabin,

You are more than welcome.

Doug Ortiz

Patrick wrote re: Leveraging the use of Site Columns – Part II
on 04-23-2008 7:00 PM

Doug,

This is a great tip for static lists like departments within a company.  I'm trying to do something a bit different.  I have a list called Support Log, containing every issue with my product reported by any customer (only a few customers).  I want to give customers access to at least view the status of their own issues, but don't want them to see issues from our other customers.  I am exploring the ideas of a subsite for each customer, but cannot figure out how to view a list located on a parent site.  It's hard to believe I'm the first person trying to do this.  What is the usual solution?

Thanks, Patrick

DOrtiz wrote re: Leveraging the use of Site Columns – Part II
on 04-24-2008 1:08 PM

Patrick,

Glad you liked the tip, I think this blog posting might point you in the right direction:

www.sharepointblogs.com/.../displaying-and-filtering-lists-in-another-sharepoint-site-with-sharepoint-designer-2007.aspx

Regards,

Doug Ortiz

Lucy Blain wrote re: Leveraging the use of Site Columns – Part II
on 05-06-2008 8:41 AM

Hi - Great blog!  I was wondering if you could help me? I have created a List and in that I added a site column (Scheduled Start Date) I am now not using this and wish to Delete it, but I don't have a Delete button in my Change Column form.  I am the administrator so should have the rights but can't see how to do this.

Tasso wrote re: Leveraging the use of Site Columns – Part II
on 05-06-2008 1:52 PM

Good evening from sunny Greece,

I'm not familiar with sharepoint, I'm just a humble software engineer. 2 weeks ago a friend from the office asked me to help him out with his project, although i'm pretty busy I was also curious to check what sharepoint is all about. Everything were running smoothly and we handed over the project on time.

As it always happens they wanted some enhancments and I would apreciate any help since it is out of my league.The issue is as follows: On edit form we have a  lookup column where we can choose a document from a folder structure to add a link document is it possible, either add a treeview instead of the left list box and from there add it??? Or leave look up as it is and the left hand listbox will be populates base on a treeview selection?? Any suggestion is highly apreciated.

Adam wrote re: Leveraging the use of Site Columns – Part II
on 05-12-2008 10:04 PM

Doug,

Great set of Posts.

I have a variation to the scenarios you have have described. I need to create a site column that displays a list of countries sourced from an external data source . ie not a list or a hard coded set of values in SharePoint. I am using WSS 3.0.

any point in the right direction would be appreciated.

Cheers

Adam

Doug wrote re: Leveraging the use of Site Columns – Part II
on 05-13-2008 8:12 AM

Tasso,

Glad that you are looking into SharePoint.

The type of enhancement that is being requested will require some custom development, from what you have mentioned I see two possible solutions:

  using SharePoint Designer 2007

  developing a custom Web Part and adding it to the edit form

Both, depend on how much time on how comfortable you are with each tool. The easiest and fastest is the one using SharePoint Designer 2007.

Doug

Doug wrote re: Leveraging the use of Site Columns – Part II
on 05-13-2008 8:16 AM

Adam,

With the information that you have provided, there are a couple of ideas that come to mind.

1. Link the SharePoint List to a Microsoft Access Database that connects to that External Data Source

2. Develop a custom tool that populates the SharePoint List from that External Data Source

The first choice while it does not require custom development, will require some maintenance to ensure that the data is up to date.

Regards,

Doug

DOrtiz wrote re: Leveraging the use of Site Columns – Part II
on 05-14-2008 12:52 AM

Lucy,

Made a quick run through to attempt to replicate the problem you are experiencing. I was able to see the Delete Button on the SharePoint List that is referencing a Site Column.

Could you provide more details?

Regards,

Doug Ortiz

galen wrote re: Leveraging the use of Site Columns – Part II
on 11-14-2008 1:07 PM

Thanks for your write up on this Doug.

I'm in the process of applying site columns at a top level site that are going to be used by multiple departments.  I'm hoping to relate the contents of the site columns and I'm struggling with how to implement it.  

Example:  I am creating a site column named Vendor.  This column references a list of Vendors.  I have another site column named Applications referencing a list of applications.  These lists are quite long.  I want to display the lists as drop downs so that once a Vendor is chosen, the application list is filtered, displaying only those applications matching the vendor selected.  If, for example, I choose Microsoft as my vendor, then I see SharePoint, Exchange, Biztalk and all the other Microsoft Applications (But, I don't see anything else)

Any pointers you could give would be much appreciated.

DOrtiz wrote re: Leveraging the use of Site Columns – Part II
on 11-18-2008 7:46 PM

Galen,

Glad you enjoyed the blog posting.

There are a couple of options:

  - Easier: Use a DataView with SharePoint Designer 2007, you can look at the following link:

blogs.msdn.com/.../asp-net-controls-filter-the-data-view.aspx

  - Not as easy: Developing a custom Web Part

Regards,

Doug Ortiz

Katy wrote re: Leveraging the use of Site Columns – Part II
on 01-06-2009 11:56 AM

Hi there and thanks for the great info.

I use site columns in a few child sites and it's working great. The only thing I can't figure out is how to turn OFF the hyperlink from the selected item within a list to the edit screen of the lookup list. I want the site column to only popluate the list, not navigate to it.

Any ideas??

Thanks,

Katy

DOrtiz wrote re: Leveraging the use of Site Columns – Part II
on 01-10-2009 10:55 AM

Katy,

Was not able to find an out of the box way to turn off the hyperlink when using the Site Columns.

I do have a few ideas for accomplishing it by using some custom development:

  - SharePoint Designer and a DataView Web Part

  - Custom Web Part and SPGrid

Regards,

Doug Ortiz

Sankar wrote re: Leveraging the use of Site Columns – Part II
on 01-17-2009 7:17 AM

Hi,

Thanks for the great Info. I am looking for a slightly different solution. I want to create a content type field (Check box - Multi Choice) i want to populate the choice list from a List. Lookup field will generate a dropdown field.

Any Idea?

Thanks

Sankar

DOrtiz wrote re: Leveraging the use of Site Columns – Part II
on 01-17-2009 10:09 AM

Sankar,

Thank you for reading the blog, that is very interesting idea you are bringing up.

With the details you have provided, it seems that you might want to take advantage of creating a custom field type that references a list on a sharepoint site. The custom field type can be a multi choice check box or any other control of your choice.

The only drawback is that the configuration for the location of the list is not easily configurable as a web part property ( out of the box ), unless you code it for added flexibility ( retrieve the url and name location of the list from a fixed url and list location ).

As an added bonus the field custom type can be also combined to work with a site column allowing you that extra flexibility you are looking for.

If you are intrigued with this approach, please reply and I will gladly create a blog posting that will explain how this would work along with a quick implementation.

Regards,

Doug Ortiz

Sankar wrote re: Leveraging the use of Site Columns – Part II
on 01-17-2009 10:58 AM

Hi Doug,

Thanks for the immediate reply. This approach looks interesting and it should be helpfull for my solution. It will be great if you can explain in detail on this approach. Thanks a lot.. looking forward for your new blog.

Thanks

Sankar

Doug Ortiz blog wrote Removing the default enabled HyperLink when using Site Columns
on 01-29-2009 8:18 PM

There have been some great ideas posted in the comments section of this blog, particularly to the following

DOrtiz wrote re: Leveraging the use of Site Columns – Part II
on 02-09-2009 2:35 PM

Katy,

This post might be exactly what you are looking for:

sharepointblogs.com/.../removing-the-default-enabled-hyperlink-when-using-site-columns.aspx

Regards,

Doug Ortiz

Sankar wrote re: Leveraging the use of Site Columns – Part II
on 02-20-2009 6:14 AM

Hi there thanks for the informations.

I have a page layout created from a custom content type which included custom site columns as i commented earlier in the blog. I am building a custom CQWP to show the data from the content type. I want to sort the items in the custom CQWP on most frequently accessed. I was thinking is it possible to have a hit counter kind of site column in the content type to store every hit to the page using the content type. Or is there any other way to implement the same?

Thanks

Sankar

DOrtiz wrote re: Leveraging the use of Site Columns – Part II
on 02-22-2009 11:00 AM

Sankar,

I would look into leveraging the existing auditing capabilities within WSS and MOSS.  While the auditing capabilities do not create a hit counter you can build one by iterating through the auditing logs.

Regards,

Doug Ortiz

Sankar wrote re: Leveraging the use of Site Columns – Part II
on 02-24-2009 6:52 AM

Hi Doug,

Thanks for your suggestion.

i have created a custom field type for Hit counter and stored the count from the Audit logs by iterating through the log entries. In my custom CQWP when i set the sort by to new custom field and sort direction as ASC/DESC changes are not afftecting the result of the CQWP. I would like to know is there any method available to check the query or the Hit counter value while displaying the result in the Custom CQWP.

Thanks

Sankar

Sankar wrote re: Leveraging the use of Site Columns – Part II
on 02-27-2009 10:28 AM

Hi Doug,

I was creating a custom CQWP. i wanted to give a background color for the group header and items in the CQWP. I have change the item background color in the controls.css and configured as stlesheet in the masterpage. It is working fine. I wanted to give a rounded header style and background color for the group header. I would like to know how i can implement the same leveraging the stylesheet properties of Custom CQWP.

Thanks

Sankar

Joseph wrote re: Leveraging the use of Site Columns – Part II
on 03-24-2009 4:15 AM

Hi Doug,

Your blogs are too good. Thanks.

Is it possible to get a loop-up data from one sub-site to another sub-site which are residing in the same parent or main site. If yes, plese advice me the steps to do this.

Thanks is advance.

KSB wrote re: Leveraging the use of Site Columns – Part II
on 03-25-2009 1:20 AM

Hi Doug,

with the answer you have given to Michael i.e. pulling value from sub-site to main site, I wanted it in WebForm just like lookup data. Is this possible?

Deependra wrote re: Leveraging the use of Site Columns – Part II
on 03-27-2009 1:02 AM

Hi Doug,

Quite useful stuff. I was just wondering, how do i add 'select one of these' in the list when the data is mandatory. Otherwise it gives the top one as default.

Regards,

Deependra

DOrtiz wrote re: Leveraging the use of Site Columns – Part II
on 04-04-2009 10:50 AM

Sankar,

I think you might benefit at this point in time of even displaying your data in a SPGridVIew that way you can make the grid adhere to the look and feel of SharePoint or any other look you would like, even adding sorting.

Regards,

Doug Ortiz

DOrtiz wrote re: Leveraging the use of Site Columns – Part II
on 04-04-2009 10:53 AM

Joseph and KSB,

I think you might want to look at these other postings, that go step by step on how to leverage Site Columns with the Free List RollUp Web Part.

sharepointblogs.com/.../free-list-rollup-web-part.aspx

sharepointblogs.com/.../list-rollup-web-part-in-action.aspx

I think it might be exactly what you are looking for.

Regards,

Doug Ortiz

J H wrote re: Leveraging the use of Site Columns – Part II
on 05-22-2009 12:49 PM

Good stuff :)

Very helpful

A+++

Gagneesh wrote re: Leveraging the use of Site Columns – Part II
on 06-09-2009 11:32 AM

In MOSS 2007, I'm attempting to delete a Site column.

My questions are:

1) Is if there is a way to know where a Site Column is being used so that I can delete permanently?

2) Will it allow me to delete a Site Column if it is use in some list or another content type somewhere in the site collection.

Thanks

DOrtiz wrote re: Leveraging the use of Site Columns – Part II
on 06-11-2009 11:27 AM

Ganeesh,

Thank you for reading the blog, this posting has a new location:

dougortiz.blogspot.com/.../leveraging-use-of-site-columns-part-ii.html

The answers to your questions are:

1 - Not out of the box

2- The deletion of the Site Column will be allowed, a message will be displayed that you will have orphaned content though.

Regards,

Doug Ortiz

Gary Turner wrote re: Leveraging the use of Site Columns – Part II
on 06-25-2009 9:39 AM

Site columns based on a column in a list is fine, my question is if I have a list that contains an "Active" column and only want to display items in the site column that a marked as "Active" when adding or editing existing records is there a way to do this? Originally I thought it would be easy to base the site column on a view of a list that only displayed "Active" entries, but you can not limit the values in a list in this manner and use it to fuel a list based site column.

Thank you,

Gary out...

Doug Ortiz wrote re: Leveraging the use of Site Columns – Part II
on 06-25-2009 10:19 AM

Gary,

Thank you for reading the blog.

This functionality is not available out of the box, it can be achieved through a few ways:

  Combination of Field Types and custom development.

  Setting up a workflow on a list in which users update the status ( Active or Inactive ), kicking off the workflow that another list built and used for the Site Column

Regards,

Doug Ortiz

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.