How to link to view item from any field in a SharePoint list

(this post was written using a SharePoint Server 2010 environment)

This is a variation on a theme and something I have used quite a bit over the years to change the link to the item display view from the default title or name field or another field of my choosing.

Changing the item link to another field or field(s)

  • Open SharePoint Designer
  • Enter the URL of your list or library site collection > Open
  • Navigate to the list or library you wish to change > Click to open it
  • in the Views section, open the view you wish to edit
  • in the Ribbon, turn on Advanced Mode
  • In the code view, look for the ViewFields section
<ViewFields>
	<FieldRef Name="Title"/>
	<FieldRef Name="Created"/>
	<FieldRef Name="DateStarted"/>
</ViewFields>
  • Highlight the Field you want to create a link from and add the following
<ViewFields>
	<FieldRef Name="Title" LinkToItem="TRUE"/>

You can add LinkToItem=”TRUE” to any, or as many of the fields as you wish, the end result will mean that each column in the list view you have added the above to will be click-able.

Add a link to the edit item menu

As I was writing this up, I came across the post below which also adds the extra option of creating a link to the item’s edit menu to, so full props go to the SharePoint Diary site for this one!

http://www.sharepointdiary.com/2016/04/show-link-to-item-edit-menu-on-any-column-in-sharepoint-list.html

If you do want to extend this to have the drop-down item edit menu, just add ListItemMenu=”TRUE” to the field in SharePoint Designer. You can add this after the LinkToItem=”TRUE” and to multiple columns in the list view.

<ViewFields>
	<FieldRef Name="NameOfTeam" LinkToItem="TRUE" ListItemMenu="TRUE"/>
	<FieldRef Name="Category" ListItemMenu="TRUE"/>
	<FieldRef Name="Created"/>
	<FieldRef Name="Author"/>
</ViewFields>

Looking for all of the available data types?

You can get a list of all the internal data types and their descriptions from the the link below:

https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ms437580(v%3doffice.14)

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: