Posts

Showing posts from March, 2011

How To Add column to all content types and lists in SharePoint

Adding a column to all content types and list in SharePoint is simple, but there are implications that first need to be considered before doing so.  Once completed, the new column will be available in all existing content types in the Site Collection, as well as lists and libraries that exist on SharePoint sites. Implication: The implication of this change, is that the process to reverse is not nearly as simple as the process to implement. Removing the column from the content type(s) will not remove the association of the column with lists that previously had the global column.  A custom solution could be developed to automate removal of the column from content types and lists, but the alternative would be to manually remove each instance which could be time consuming in larger, more complex environments. Process: Content Types in SharePoint inherit from the Item content type.  If a column is added to this content type (with the “Update all content ...

Dynamic List Filter Menu Using Data View Grouping

This article explains how to create a dynamic filter menu for content in SharePoint.  Methods from the article  SharePoint: List Distinct (unique) values from a specific column in a list are used to obtain unique values from a specific column in a SharePoint list to be displayed as each menu item.  When an filter option from the menu is selected, content on the page will be filtered based on the selection.   For a single menu displaying filter options dynamically, you only need to associate the menu with one column from the main list.  When an option is selected, the browser is redirected to the same page with a query string parameter set to the selected filter parameter using JavaScript.  The main list on the page is then configured to filter contents based on the parameter. Components: Document Library with custom column "Heading" One Web Part page with the following components: Data View Web Part displaying the actual documents in the li...

SharePoint: List Distinct (unique) values from a specific column in a list

The following describes two methods to list distinct/unique values from a specific column in a SharePoint list.  An example where this may be useful is a menu system providing filter options for items in a list, using only values that are being used at the time.   Display Unique Values using Data View Grouping (No Code): Obtaining a distinct/unique list of values from a specific column in a SharePoint list can be achieved easily using a Data View Web Part, and by applying sort and group criteria to group items.  When grouping (group by) criteria of a Data View web part has been provided, the result is a distinct (unique) list of values from the particular column in the list that will be displayed as group headings.  Once the Data View is listing items grouped by the specified column, you can manually modify (remove cells/rows) the XSL template used to display the table to remove the actual list items from under each group (use Design mode in SPD to ...