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.

4 thoughts on “Remove Lookup Column Link From View

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s