Thursday, September 3, 2009

Most common problems in SharePoint naming: spaces

When I did create a workflow action, Using SharePoint Designer 2007, which emails the URL of the current item in a list. I did use below lookup items in my workflow mail
1-[%LISTNAME: Encoded Absolute URL %]
2-[%LISTNAME: Server Relative URL%]
3-[%LISTNAME: URL Path %]
4-[%LISTNAME: Path %]

There is one problem which will always occur and another which may occur, depending upon the naming convention you use for your lists.

Problem 1: ID number pulled from URL actions are appended with "_.000" in case 1, 2 and 3.
Problem 2: In case 4, Spaces within list names are sometimes ignored, sometimes not. i.e. "My Test List" could be translated into "My Test %20List" - causing a 404 error during the URL lookup.

Solution: Here I am solving problem 2. It works for me. According this,

You need to rename your lists to contain no spaces. Now this would seem easy to do - enter your list settings, go to Title, description and navigation, and change the name. This will not work as it seems to only change a pointer for SharePoint references, but not anything that has to do with URL paths.

You need to rename the list itself within SharePoint Designer to have one single list name. Right-click on the selected list, select "rename" and rename the list to something without spaces. SharePoint Designer will save this information to your SharePoint site and references in all attached workflows will reflect these changes.

Basically this changes internal name of list. Now you can rename list name again from SharePoint list setting, go to Title, description and navigation, and change the name, if you need to display list title with space to all.

1 comment:

  1. Not really the best solution, because list items and file name also need to be read by humans and setting all your filenames to read like this:
    EO_BRIST_LET_CL_JAN14
    just makes your site difficult you use.

    ReplyDelete