3.30.2009

I need to ... Make an "I Need To ..." web-part!

The "I Need To ..." web-part comes as a part of MOSS 2007 (not just WSS), and is not very intuitive as to how to configure it! One would think that one could use a link list to configure the web-part, but, no, you cannot. It must pull it's information from a custom list. Off we go:

Create a "Custom List" (not a links list):

  • From the Site Actions menu, Click View All Site Content.

  • Click Create.

  • Click Custom List.

  • We'll call it "Actions List"

  • Select List Settings from Settings.

  • Create these fields in our new Actions List:


    • A Title field (should already be there).

    • Click Create Column, Type "URL", Select Hyperlink or Picture, make it required.

    • Click Create Column, Type "Task Type", Select Choice, enter choices as "General" and other choices based on what the task type is, make it required. Some examples are "Technical", "Reference", "Human Resources", "Training" etc etc...

For each record in the list:

The Title field must not be blank.

The URL field must be called "URL" and must not be blank.

The Choice field must not be blank, and can be any choice, it seems logical to me to call the field "Task Type" and have it a choice between different activities your users may need to have access to.

Now, create a couple of items in the list:

URL: "http://www.cleverworkarounds.com/"
Title: "Find out about Governance"
Task Type: "Technical"
URL: "http://www.wikipedia.org/"
Title: "Look up something..."
Task Type: "Reference"

Now, let's put the "I Need To ... " web-part on a page:

Edit your Home Page:

  • Select Edit Page from Site Actions.
  • Click Add a Web Part.
  • Select the I Need To... Web Part.
  • Select Modify Shared Web Part from the "I Need To..." Web Part Edit menu.
  • Click the Change button.
  • Select the list you created at the beginning of this tutorial. Note, you may need to select it twice, once to select the sub-site, and once to select the list in the sub site. Just make sure your list is displayed under "List Name:".
  • Select Task Type from Filter Field.
  • Select Technical from Filter Value.
  • Click OK.
  • Note that the web-part may be displaying a "Value cannot be NULL" message, which is okay for now.
  • Click Exit Edit Mode.
  • The error message about Value cannot be NULL should disappear.

Now your Home Page will have an "I Need To ..." web part displaying the records you have listed under "Task Type" of "Technical" (in our example, we only have one Technical Task Type).

Now Edit some of your other pages to have an "I Need To ..." web part displaying the records you have listed under the appropriate "Task Type"; repeat the above steps for any sub-sites you want.



In what seems like weirdness, you MUST have a choice field in your list and you MUST have a field called 'URL' in your list, and you must have a "Title" field as well.

3.26.2009

Managing Links in WSS and MOSS Using Excel

Frequently, I am asked to check a page for links. Some pages have hundreds of links on them, links that appear, mostly, in the dreaded Content Editor Web Part. To properly manage those links, and deal with them on a massive basis, I need to extract them and manipulate them in batches.

First thing I do is copy them into Excel so that all links are in one column. I manually copied and pasted them into Excel from the Content Editor Web Part. Sometimes, I can get a whole lot of them, sometimes, just one or two at a time. If you are lucky, you will have a link list, that you can just open in datasheet view or export to Spreadsheet.

Put titles in your column in row 1:
  • A: Bad Link
  • B: Link Text
  • C: Link URL
  • D: New Link
  • E: Category
Now we have to deconstruct the URL from the title. There isn't a formula for this, although there should be, so we have to develop VBA code in Excel. Don't worry, it will be easy:

  1. Place the cursor into an empty cell
  2. Click Record Macro from the Developer Tool ribbon
  3. Click OK to name the macro
  4. Type 'asdf' and press Enter
  5. Click Stop Recording from the Developer Tool ribbon
  6. Click Visual Basic from the Developer Tool ribbon
  7. Select Module1
  8. On the text area, (big area with the code in it) press [CTRL]+A to select all.
  9. Press [DELETE]
  10. Copy this code into the empty space:

    Function GetAddress(HyperlinkCell As Range)
    GetAddress =
    Replace(HyperlinkCell.Hyperlinks(1).Address, "mailto:","")
    End Function

    Function GetText(HyperlinkCell As Range)
    GetText=HyperlinkCell.Hyperlinks(1).TextToDisplay
    End Function


  11. Close the Visual Basic window
  12. Place this formula into Cell B2: =GetText(a2)
  13. Place this formula into Cell C2: =GetAddress(a2)
  14. Place this formula into Cell D2: =hyperlink(c2,b2)
  15. Fill out Column E with the category name for your link.

Now, you have all of the Link Titles and Link URLs in separate columns.

Now that you have the URL exposed, you can manage them. One thing this is really good for is getting rid of that pesky CTID in your URLs. You can also replace the space character with %20 so that the URLs work correctly when they used used elsewhere.

We have some alternate access mappings, so in order for these links to work properly for the proper audience, I use this method to quickly go through the links and change them to the correct 'field use' domain names.

3.23.2009

Access Denied on Site with Publishing Turned on

Sometimes, 'Content Editor' type users will receive an Access Denied message, but the message will be cryptic in that it will also state that a list cannot be found.

Some things to check:


  1. Ensure all of the master pages and page layouts are published major version, checked in and approved. From the Top Level Site, Site Settings --> View All Site Settings --> Master pages and page layouts, (http://[sitecollection]/_catalogs/masterpage/)
  2. Ensure all of the Style Library (http://[sitecollection]/Style Library/) files are published major version, checked in and approved. From the Top Level Site, Site Settings --> View All Site Settings --> Master pages and page layouts
  3. Ensure all of the elements on that page are published major version, checked in and approved.
  4. Ensure the Master Page document library has at least RESTRICTED READ access for all users.
  5. Ensure the Style Library document library has at least RESTRICTED READ access for all users.

This should resolve the cryptic error messages.

3.20.2009

Map a SharePoint Folder to a network drive

Map a SharePoint Folder to a network drive:
  1. Go into the folder you want to map
  2. Select Open with Windows Explorer in Actions
  3. Wait until the window loads
  4. Keep waiting until it fully loads
  5. Wait some more
  6. Curse a little, or chatter with someone while it is loading
  7. Select the address (double click it) in the address bar of windows exploder (I mean explorer), right-click and select copy
  8. Select Map Network Drive from Tools
  9. Choose a letter you want
  10. Paste the address into Folder
  11. Leave everything else as it is, and click Finish

Now the folder will appear in your My Computer as that drive letter.

3.11.2009

WSS File and Folder Naming Rules

File Naming Rules

  • Invalid characters: ” # % & * : < > ? \ / { } ~ 
  • Cannot be longer than 128 characters
  • Cannot use the period character consecutively in the middle of a file name
  • Cannot use the period character at the end of a file name
  • Cannot start a file name with the period character

Folder Naming Rules
  • Cannot use the following characters anywhere in a folder name or a server name: ~ # % & * { } \ : < > ? / ”
  • Cannot be longer than 128 characters
  • Cannot use the period character consecutively in the middle of a folder name
  • Cannot use the period character at the end of a folder name
  • Cannot start a folder name with the period character

3.10.2009

Check Out / Check In Lots of Files at Once

When you upload or change a document, you are checking the document out to you first, and so in order for those changes to appear, or for other people to be able to open them for editing, you must first perform a check-in.

Sometimes, you have lots and lots of documents, and they all need to be checked in, that is a lot of clicking and button pressing!

There is a way:

If you are a Site Administrator, and the Publishing Feature is turned on:

  1. Go into the Document Library or Picture Library where you need to check in multiple files.
  2. Select Document Library Settings from Settings
  3. Select Manage checked out files under Permissions and Management
  4. Select the documents you want to check-in (or select the all checkbox to select them all)
  5. Go to: [YOUR SITE]/_Layouts/sitemanager.aspx (I wonder if this works without publishing turned on...)
  6. Select Checked out To Me from View
  7. Select the documents you want to check-in (or select the all checkbox to select them all)
  8. Select check-in from Actions

If you are not a Site Administrator, you will need to find a Site Administrator to do this for you - which may be worth it if you have hundreds of documents or images to check-in at once.

Also, you must make sure that all of the required fields are not blank. If you are checking in files using the method above, you will not get an error message, or any other notification that check in failed, documents missing the required information simply will not be checked in.

3.09.2009

Setting a Date field to NULL in Designer Workflows

I have been wondering how to do this for quite some time now, and came up with a way!

Create a new calculated field, and set it to ="", and make it a date/time field.

In Designer, set the field you want to be blank to that calculated field.

I thought it would be simple to set it to NULL in SPD, but no, can't really do it at all.

Now, we have to figure out how to set a people-picker field to NULL and we'll be all set.

3.02.2009

SharePoint Designer Workflow Task List vs Aardvark Task List

Auto-generated tasks created by SharePoint Designer workflows always go to a seemingly random tasks list instead of the "Workflow Tasks" list. Designer searches for the first task list in your SharePoint site and uses that instead, and gives you no option to define which task list you want worfklow tasks to go to!

Solution and workaround are here:
Things that Should be Easy:SharePoint Designer 2007 Workflow on Task Lists