Remove Lookup Column Link From View

Applies To: SharePoint 2010

Okay, the title to this post is a little misleading. I won’t be showing how to actually remove the link from the view column. That requires XSLT or JavaScript. What I will show you is a work around that is good enough for me and requires nothing but the browser.

When you add a Lookup Column to a list the linked item’s display form will automatically be linked to the column wherever it shows up in a view. Generally, this is pretty awesome behavior since it gives more detail on demand without us having to do anything. Sometimes, however, these links can get in the way. This is especially true when you have more than one lookup column in a view or when you don’t want people to get confused about which link to click.

In SharePoint 2010 you can include additional fields with your lookup. So for this workaround we’re going to simply have the same reference column also be an additional field for the lookup. This allows us to choose the additional field for our view. Got it? How about an example.

Say we have a lookup column named Position that references our Positions list. We choose Title for the display field for our lookup:

This works great because it gives us a nice drop down of all the available positions for people to choose on our new and edit forms. But then when you go to create a simple view you might run into this issue:

That’s part of our view for our list. So, which link do you click on? The Position link will open the display form for the Positions list item Associate Manager. The Job Type link will open the display form for the current list item. And my head just exploded.

So our goal is to keep the Position column showing Associate Manager but without the link to the secondary list. We also don’t want to use any JavaScript or have to edit this view with custom XSLT.

So, go back to the Lookup Column and in the Additional Fields section check the box next to the same column used in the lookup (Title in this example):

This adds a new column to our list called Position:Title. So now we edit our view to use the new column in place of the lookup:

As you can see, this takes care of our problem. The user is still only presented with the one dropdown when using the edit/new forms to pick the position and our view now has no hyperlink to the secondary list’s item display form. But what about that stupid column name?

Going back to our List Settings you can click on the Position:Title column and change the column name. Obviously, selecting the same name as the lookup will get you an error:

So don’t do that. The best move is to give it another name, but you can also use a little trick. Just add a space after the name so the column name becomes “Position “. You can save this and since you already put it in your view it looks perfect:

Of course, editing the columns or messing with additional views can get confusing when columns names look exactly the same – so use at your own discretion.

Simple SharePoint FAQ in 5 Minutes

Applies To: SharePoint

A common requirement/feature of sites is to have a Frequently Asked Questions (FAQ) section. This is a quick and easy way to provide help to end users. A FAQ is nothing more than a series of questions with their answers.

This can be implemented in a variety of ways but the standard way is to have the question above the answer all on a single page. This isn’t always the best way, but it’s certainly the most common and recognizable way.

Fortunately SharePoint makes this really easy using a custom list and only takes about 5 minutes to setup. This can be done in SharePoint 2007 or 2010 in both MOSS/Server and WSS/Foundation. Here’s the steps:

  1. Create a custom list. Name it FAQ or something.
  2. Edit the Title column and rename it Question.
  3. Add a new Column of type Multi-Line Text and name it Answer
  4. Modify the default view to only show those 2 columns and set the style to Newsletter.

That’s it! You end up with something like this:

FAQ in SharePoint 2007

FAQ in SharePoint 2010

You can then place this on a page using a ListView Web Part or just link directly to the main view. WOWEE!

Want to get fancy? Add another column called Order of type Number and use it to set custom ordering values and just sort by that column in your view.