3/25/2012

Names you can’t use for a SharePoint subsite!

 

 

Try to create a subsite in a publishing site named "Workflowtasks"

Error

The Web site address "/workflowtasks" is already in use.

image

 

I checked and View All Site Content does not list this subsite. But... it does list a
list named "Workflow Tasks". That should not be a problem as the URL for
lists always include "/Lists/".

http://intranet.contoso.com/Lists/Workflowtasks

So why can’t I create a subsite named “workflowtasks”? When the publishing feature is enabled it creates a special list in the root of the site (i.e. no "/Lists/") named "workflowtasks".

(Why would you ever create a subsite named “Workflowlists”?  Because in one of my SharePoint workflow classes step one of the lab said “create a subsite named “Workflowlists”!)

 

Other root level list names that cannot be used for subsites

The following is a list of a few of the names that cannot be used as subsites of a Publishing template based site:

  • Long Running Operation Status
  • Notification Pages
  • PublishedLinks
  • Quick Deploy Items
  • Relationships List
  • Reports Lists
  • ReusableContent
  • Variation Labels 

 

Other root level folder names that cannot be used for subsites

The following are names used in almost every SharePoint site for folders. Some are found in every subsite while a few are only found in top level sites.

  • _catalogs  ("Error: Site names cannot contain certain reserved words and
    cannot begin with an underscore.")
  • _cts
  • _private
  • images
  • Lists
  • m

image   image

 

Library names that exist in a site cannot be used as a subsite name

 

Error

The Web site address "/Shared Documents" is already in use"

  • Shared Documents
  • SitePages
  • etc...

Try to create a subsite named "Lists"...

Error

Cannot create a Web at "/lists" because a folder already exists at this
location.

 

To find names that are not valid as subsite names

Open your site in SharePoint Designer. In 2007 all of the folder and root level list and library names are displayed in the left panel. In 2010 click on “All Files”. (If you don’t see “All Files” then your Site Collection Administrator or you server administrator may have removed your “Allow Site Owners and Designers to See the Hidden URL structure of their Web Site” permission.)

 

A sample All Files in SharePoint Designer 2010:

image

 

.

3/15/2012

Last Chance to Sign Up for SharePoint Cincy 2012!

 

 

SharePoint Cincy – March 16th, 2012

Northern Kentucky University’s Center for Applied Informatics and MAX Technical Training are bringing a major SharePoint event to the Cincinnati area! SharePoint Cincy will be held at the METS Center located in Erlanger, KY. The METS center is near the Cincinnati airport (CVG) and has lots of free parking.

You’ve got to be registered to attend and it’s filling up fast. Last year was a sell out and this year is a bigger and better event!

See the site for the agenda, speakers and registration: http://www.sharepointcincy.com

 

SharePoint_Cincy_2012_blog_graphic3[3]

3/12/2012

SharePoint Cincy – This Friday - March 16th, 2012

 

 

SharePoint Cincy – March 16th, 2012

Northern Kentucky University’s Center for Applied Informatics and MAX Technical Training are bringing a major SharePoint event to the Cincinnati area! SharePoint Cincy will be held at the METS Center located in Erlanger, KY. The METS center is near the Cincinnati airport (CVG) and has lots of free parking.

Only a few days left!

You’ve got to be registered to attend and it’s filling up fast. Last year was a sell out and this year is a bigger and better event!

See the site for the agenda, speakers and registration: http://www.sharepointcincy.com

 

 

SharePoint_Cincy_2012_blog_graphic3

Lots of great speakers will be there! (And I will be speaking there too :-) )

  • Robert Bogue, Thor Projects LLC.
  • Mike Buob, Sogeti, USA
  • Steve Caravajal, Ph.D, Microsoft Corporation
  • Bill Crider, Ascendum
  • Jorge Guerreiro, K2
  • Brian T. Jackett, Microsoft
  • Tavis Lovell, Ascendum
  • Tony Maddin, Ascendum
  • Jennifer Mason, SharePoint 911
  • Sean P. McDonough, Idera
  • Chris Murphy, Ascendum
  • Nitin Nagar, Ascendum
  • Ted Perrotte, Aspect Software
  • Mark Rackley, Juniper Strategy, LLC
  • Raveen Rajavarma, Ascendum
  • Clint Richardson, Ascendum
  • Larry J. Riemann, CBTS/Indigo Integrations
  • Jeffrey Segebarth, NewsGator Technologies
  • Peter Serzo, High Monkey Consulting
  • Mike Smith, MAX Technical Training
  • Adam Solzsmon, Ascendum
  • Matthew Tallman, Ascendum
  • Eric Weissmann, Ascendum
  • Shane Young, SharePoint 911

.

3/05/2012

SharePoint: Search, Filter or Sort Lists from a Query String

 

The following works in SP 2007, SP 2010 and Office 365/SharePoint Online

 

Microsoft has generally done a good job of keeping new versions of SharePoint compatible with the older versions. While over time some features have dropped out of the documentation, most still work. An example is the Query String option to sort and filter a list. This was a feature from “SharePoint Team Services”, which is what they called SharePoint “back when”! The Query String feature we will look at here is still documented in an officially “archived” document on TechNet named “Using the URL to sort or filter a list” that can be found here: http://technet.microsoft.com/library/cc751316.aspx  As is often the case, I ran across the article by accident while searching for something else.

 

What’s a Query String?

A query string is a collection of more or more parameters added to the end of a URL. You see these throughout SharePoint and at most interactive web sites. As an example do a search using Bing.com for “techtrainingnotes”. After you click the search button your search text is appended to the URL and will look something like this: http://www.bing.com/search?q=techtrainingnotes.  The first parameter in a query string is identified with a question mark and each additional parameter is identified with and ampersand. Here the parameter name is “q” and the value is “techtrainingnotes”.

For the filter and sort tricks we will create a URL that looks something list this:

  http://intranet/sites/training/Lists/Tasks/AllItems.aspx?FilterName=Title&FilterMultiValue=Task 2

The first part, “http://intranet/sites/training/Lists/Tasks/AllItems.aspx” is the path to a view of a list and everything from the question mark to the end is the query string.

 

Filtering One or More Columns

To filter a task list to show just “In Progress” tasks you would first visit a view that included the Status column. The URL to this list would look something like this:

  intranet/sites/training/Lists/Tasks/AllItems.aspx

To filter this view you would add two query string parameters to the URL that specify the column to filter on and the value to filter for. This URL might look like this:

  intranet/sites/training/Lists/Tasks/AllItems.aspx?FilterField1=Title&FilterValue1=In Progress

 

You filter on more than column by adding additional FilterFieldX and FilterValueX parameters to the URL. To find all of Luis Bonifaz’s In Progress tasks you might use this query string:

  ?FilterField1=AssignedTo&FilterValue1=Luis Bonifaz&FilterField2=Status&FilterValue2=Not Started

 

Why “AssignedTo” and not “Assigned To”? List columns can have an internal name and a display name. You will always need to use the internal name in these queries. See “Finding the Real Column Name” at the end of this article to see how to find these internal names.

 

Notes:

  • There can be multiple filters per query named FilterField1, FilterField2, FilterField3, …, FilterFieldxxx
     
  • FilterNameX is the column we are searching in – this column must be displayed in the page… i.e. it must be in the current view.
     
  • FilterNameX is case sensitive!  A misspelled or miscapitalized FilterNameX column name causes the filter to be ignored and returns all rows from the list… So “Title” works and “title” does not.
     
  • FitlerNameX must be the internal name, which is not always the display name (details on how to find this name is at the end of this article)
     
  • FilterValueX is not case sensitive – searches for “in progress” and “In Progress” return the same results
     
  • FilterValueX does not support wild cards
     
  • All of the filters are AND’d together – i.e. the row in the list must match all of the filters to be displayed

 

Filtering a Single Column with Multiple Values and Wild Cards

The FilterField/FilterValue parameters can only find exact matches and only on a single value per column. You can also use “FilterName=” and “FilterMultiValue=” parameters to filter a column on more than one item or with wild cards. If you want to display all “In Progress” and all “Completed” tasks you could use this query string:

  ?FilterName=Status&FilterMultiValue=In Progress;Completed

You can also use wildcards in FilterMultiValue parameter:

  ?FilterName=Title&FilterMultiValue=*meeting*

 

You can combine FilterField/FilterValue with FilterName/FilterMultiValue when needed. Here’s an example to find all of Luis’s tasks with “meeting” in the task title:

  ?FilterField1=AssignedTo&FilterValue1=Luis Bonifaz&FilterName=Title&FilterMultiValue=*meeting*

 

Notes:

  • FilterName is the column we are searching in – this column must be displayed in the page… i.e. it must be in the current view.
     
  • FilterName is case sensitive!  A misspelled or miscapitalized FilterName causes the filter to be ignored and returns all rows from the list… So “Title” works and “title” does not
     
  • FitlerName must be the internal name, which is not always the display name (details on how to find this name is at the end of this article)
     
  • FilterMultiValue is not case sensitive – search for “in progress” and “In Progress” return the same results
     
  • FilterMultiValue supports wild cards! – Searching for “task*” finds “Task 1”, “Task 2” etc
     
  • As FilterMultValue contains the word “Multi” then you would expect to be able to filter on multiple terms… and you can – separate each term with a semicolon (;) like this:  &FilterMultiValue=In Progress;Not Started
    Be careful not to add any extra spaces. The following will not find “Not Started” because of the extra space after the semicolon:  &FilterMultiValue=In Progress; Not Started

You can sort too!

You can use the SortField/SortDir to sort on any column in the view:

    ?SortField=Title&SortDir=Desc

 

Sort can also be used with the other filters:

  ?FilterField1=AssignedTo&FilterValue1=Luis Bonifaz
     &FilterName=Title&FilterMultiValue=*meeting*
     &SortField=Title&SortDir=Desc

 

Filtering from Quick Launch and other Links

So how do you use this little tidbit of information? You can generally do what these filters do with a view. Views do have one have annoying limitation… you can only display the first 50 views created. Technically you can create more than 50, but only the first 50 get displayed. Besides, it’s kind of tedious creating all of those views.

Let’s say you have a list with your 350 retail stores and you wanted to be able to quickly display a view of the stores filtered by any one state. You could create the 50+ views (50 states plus the other postal codes), or you could:

  • Add links in Quick Launch to selected states:
        intranet/sites/training/Lists/Tasks/AllItems.aspx?FilterField1=State&FilterValue1=Ohio
     
  • Create a links list with all of the state codes and display it as a web part
     
  • Create a links list with all of the state codes, but display it as a dropdown list (http://techtrainingnotes.blogspot.com/2010/12/sharepoint-convert-links-list-to.html)
     
  • Create an HTML dropdown list with the state code and add a little JavaScript to create the filtered URL and redirect to it

 

Finding the Real Column Name!

The column name used as the FilterName parameter must be the internal name used by SharePoint, not the displayed name. As an example, in a task list there is a column named “% Complete”. The internal name of this column is “PercentComplete”. To find this name:

  1. Display the list
  2. Click the List (or Library) tab in the ribbon and click List (or Library) Settings
  3. Scroll to the bottom or the page and click the column name
  4. Explore the URL to find the internal name

image

intranet/sites/training/_layouts/FldEdit.aspx?List=%7B64C528B3%2D224B%2D4613%2D9D60%2D216300B5BCE0%7D&Field=PercentComplete

 

 

.

3/02/2012

SharePoint Cincy – Two weeks from Today!

 

SharePoint Cincy – March 16th, 2012

Northern Kentucky University’s Center for Applied Informatics and MAX Technical Training are bringing a major SharePoint event to the Cincinnati area! SharePoint Cincy will be held at the METS Center located in Erlanger, KY. The METS center is near the Cincinnati airport (CVG) and has lots of free parking.

Only two weeks left!

You’ve got to be registered to attend and it’s filling up. Last year was a sell out and this year is a bigger and better event!

See the site for the agenda, speakers and registration: http://www.sharepointcincy.com

Lots of great speakers will be there! (And I will be speaking there too :-) )

 

SharePoint_Cincy_2012_blog_graphic

 

.

2/28/2012

The SharePoint Site Icon and PowerShell

 

Governance and the desire for a consistent user interface may require you to occasionally change or reset the image used for the site icon.

 

First a few notes on the site icon

  • Sometimes Microsoft calls it the Site Icon and sometimes the Site Logo
     
  • The site logo is changed using Site Actions, Site Settings, Title, Description and Icon
        image
     
  • If the URL is blank in the top level site, then the default icon is used 
        image   (this icon is found here: /_layouts/images/siteIcon.png)
     
  • If the URL is blank in a sub site, the the icon from the top level site is used (not the icon from the next parent up)

Example:

  Top level site URL is blank, so the default icon is used (siteIcon.png)
  Subsite 1’s URL is supplied and has a custom icon
  Subsite 1A’s URL is blank, and the site display’s the top level site’s icon (siteIcon.png)

Then the icon for the top level site is changed to “newIcon.png”":

  The top level site displays the newIcon.png image
  Subsite 1’s URL is supplied and has a custom icon, and is unchanged after the change to the top level site
  Subsite 1A’s URL is blank, and now display’s the top level site’s new icon (newIcon.png)

 

Using PowerShell to document icon usage 

PowerShell can be used by administrators who have access to the SharePoint web servers to search and update SharePoint. The following scripts use the SharePoint 2010 cmdlets. Similar scripts could be written for SharePoint 2007 if needed.

 

The following PowerShell will list all of the sites in a site collection and their icons:

$site = Get-SPSite http://urlToYourSite
$site.AllWebs | foreach { $_.Url + "   Logo URL: " +  $_.SiteLogoUrl }

The result might look like this for the first example above:

http://intranet   Logo URL:
http://intranet/subsite1   Logo URL: /SiteAssets/CustomLogo.jpg
http://intranet/subsite1/subsite1a   Logo URL:

 

And after changing the top level’s icon to “newIcon.png” might look like this:

http://intranet   Logo URL: /SiteAssets/NewIcon.png
http://intranet/subsite1   Logo URL: /SiteAssets/CustomLogo.jpg
http://intranet/subsite1/subsite1a   Logo URL: /SiteAssets/NewIcon.png

If you want to dump all sites in a web application you could use this PowerShell:  (all one line)

Get-SPWebApplication "http://intranet" | Get-SPSite "| Get-SPWeb | 
foreach { $_.Url + "
Logo URL: " + $_.SiteLogoUrl }

Or for all webs in all site collections in all applications:

Get-SPWebApplication | Get-SPSite | Get-SPWeb | 
foreach { $_.Url + " Logo URL: " + $_.SiteLogoUrl }

 

Changing the Site Icon

This following PowerShell script sets the icon in every subsite of a site collection to an icon stored in the Site Assets library of the top level site. 
  NOTE 1: This will change the top level site and EVERY subsite in the site collection. 
  NOTE 2: There is no undo.
  NOTE 3: The users of all of the subsites will need at least Read permissions to the icon file.

$site = Get-SPSite http://urlToYourSiteCollection
$site.AllWebs | foreach { $_.SiteLogoUrl = "/SiteAssets/NewLogo.jpg"; $_.Update() }

If you set the SiteLogoUrl to "" then all the sites revert to the default site logo.

$site = Get-SPSite http://urlToYourSiteCollections
$site.AllWebs | foreach { $_.SiteLogoUrl = ""; $_.Update() }

If you wanted to set the URL so each site would point to its own custom image in its own library then you can add “../../” to the URL:  (the following is all one line)

 $site.AllWebs | foreach { $_.SiteLogoUrl = "../../SiteAssets/NewLogo.jpg"; 
$_.Update() }

 

.

2/25/2012

Cincinnati SharePoint User Group

 

Cincinnati SharePoint User Group

The next meeting is Thursday, March 1st, at 6:00 PM

http://www.CincinnatiSPUG.org

 

Topic:  Managed Metadata Services - Real World experiences how to leverage the feature within SharePoint from a PowerUser and Administrator point-of view!

Speaker:  Tony Maddin

 

 

.

2/20/2012

SharePoint Saturday Dayton! June 30th, 2012

 

 

We’ve had SharePoint Saturdays in Columbus, last year we had our first in Cincinnati, and now we have one coming up in Dayton!

There’s not much to report yet… but save the date!  June 30th, 2012.

 

Check here for updates:

http://www.sharepointsaturday.org/dayton/default.aspx

 

and follow #SPSDAYTON on Twitter.

 

.

SharePoint: Group by Year or Month in a View

 

The following is for SharePoint 2007, SharePoint 2010 and SharePoint Online.

 

Grouping by Year

Grouping by year is pretty straight forward, just add a calculated column to your list to display the year and then group on that column in a view.

Steps:

  1. Add a new column to your list or library
    1. 2007: Click Settings and then Create Column
      2010: In the ribbon click the List or Library tab and click Create Column
    2. Select “Calculated column (calculation based on other columns)”
        image
    3. Enter this formula: 
        =YEAR([yourdatecolumn])      example: =YEAR([Due Date])
        image
    4. Create or edit a view and in the Group By section select your new calculated column
        image
    5. Set the return type to text:
        image
    6. Save the view and test

        image

 

Two Problems!

What’s with the 1899 year and why the commas? The commas are because SharePoint, in spite of our selecting “Single line of text”, still thinks the digits are a number. The 1899 year is from items with no date entered.

Fixing the commas…

Easy, just force the result to be text by prefixing the year with an empty string:   “”
=  “”  &  YEAR([Due Date])

    image

Fixing the 1899 / no date problem…

Just add an ”IF” to the formula to test for the date.

    =IF(  [Due Date]="" ,  "No Due Date",  ""&YEAR([Due Date])  )

    image

The result:

image

 

If you want the “No Due Date” listed first, then just add a space before “No”:

  image

 

  image

 

Grouping by Month

The Group By option in a view groups on the entire field. There is no way to group on a part of a field, such as just the month and the year of a date. We can get there by creating a calculated column or two and then grouping on the calculated columns.

We can pull the Month using a formula similar to the one above by using MONTH(). You will need both the year and the month and as SharePoint will sort from left to right you will need to build a string that looks something like “2012/02”, “2012 02” or “2012 / 02”.

When we combine this with the “empty date IF” from above you will get something like this:

  =IF([Due Date]="","No due date",YEAR([Due Date])&"/"&RIGHT("0"&MONTH([Due Date]),2))

 

The final view:

    image

 

Both Year and Month?

If you wanted to group on Year and then on Month you can:

  1. Create both columns described above
    Month:  =IF(  [Due Date]="", "No due date", YEAR([Due Date])&"/"&RIGHT("0"&MONTH([Due Date]),2))
    Year:     =IF(  [Due Date]="", "No Due Date", ""&YEAR([Due Date])  )
  2. Create a view and first group on Year and then group on Month

The result:

    image

 

Year, Month and Day?

Sorry, but SharePoint views only support two levels of grouping. If you really need to do this then you can use SharePoint Designer to create a Data View Web Part to group to any number of levels. See here: http://techtrainingnotes.blogspot.com/2011/01/sharepoint-group-by-on-more-than-2.html

 

 

Group Headings

If you want to get rid of the group heading then see this article:

http://techtrainingnotes.blogspot.com/2009/06/sharepoint-removing-group-headings-from.html

That article is for SharePoint 2007. There are both 2007 and 2010 versions available in my book.

     image

.

SharePoint Customization for the Site Owner – The Class!

 

This Wednesday I will be offering a class and hands-on lab based on my book,  SharePoint 2007 and 2010 Customization for the Site Owner, at MAX Technical Training.

In the morning we will see how these customizations are done, what you can and cannot do, and do a few hands-on walk troughs. In the afternoon you can use our lab computers, or if you have remote access to your SharePoint site you can use your own site, to follow step by step labs to apply what you have learned. You may also use the lab time to apply anything in the book to your site while I’m there to help.

The class and the book apply to SharePoint 2007, SharePoint 2010 and SharePoint Online / Office 365. The lab computers will include access to all three versions!

 

And of course, you will get a free copy of the book!

 

Click here to sign up: http://www.maxtrain.com/Classes/ClassInfo.aspx?Id=33292

 

MS-SPFP SharePoint Customization for the Site Owner - Enhancing the User Interface and Productivity

A one day, hands on, quick way to enhance your SharePoint sites presented by MAX's own Microsoft SharePoint MVP. You can choose to do your customizations (labs) in SharePoint 2007, SharePoint 2010 or SharePoint Online / Office 365. The morning will get you the tips and background info you need while the afternoon will be all hands on labs!

As part of this class you will also receive a copy of Mike's book, SharePoint 2007 and 2010 Customization for the Site Owner. While we can only explore a handful of these customizations in a day, there are over 75 customizations in the book to further enhance your sites.

 

.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.