In SharePoint, any custom list will have a default column called “Title”. This column will have the edit menu attached to it when it is shown in a List View. The edit menu is also referred to as the “Edit Control Box” or ECB. The Title column can be renamed if another column name is preferred. This is easy and will be suitable for many situations.
What’s not so easy, though is to change the type of the Title column to something other than “Single line of text”, or to move the link to the edit menu to another column altogether.
For example: I would like a field called “Dropdown” to have the link to the edit menu, and the field “Dropdown” is a choice field with – you guessed it – a dropdown list. At the same time, I don’t want to show the Title field at all. Not in my list view and not on my form. So, looking at the current state in the following screenshot: The link should be on the “Dropdown” column, not on the “Title” column.
Now, there are several ways of tackling this. I can turn on the content type management setting for the list, and then set the Title column to “Hidden” to remove it from the form. I can edit the List View Web Part with SharePoint Designer. In a SharePoint 2010 XsltListView it is possible to designate any visible column to show the link to the edit menu by clicking a value in SharePoint Designer and selecting the chevron that pops out the options.
This seems like a lot of work though, and I’d also like the end user to be able to use the out of the box List view without any manipulation with SharePoint Designer.
Another approach involves using PowerShell. Can’t do that, though. I am an end user and have neither access nor permissions to run PowerShell scripts. I could put a request in our IT department’s long queue of things to do, but that will take time, involve a lengthy approval process, and I don’t want to wait for a week or more.
Yet another approach involves creating the list via Visual Studio and deploying it as a feature. Again, that is not a viable option for me. I’m not a developer, I don’t have access to these tools, and in general, I don’t want to litter my farm with features and solutions that are only used in one puny list.
So, I had to come up with a better way, and I think I found one.
I want to jazz up my form with InfoPath anyway, so while I was working on the list form in InfoPath, I did the following:
I set the default value for the “Title” field to the value of the “Dropdown” field.
Here’s the original form after clicking “Customize Form” in the List Tools:
Select the Title field and click the “Control Properties” in the Control Tools ribbon. Then click the formula button for the default value and insert the Dropdown field.
After that, delete the table row with the Title field. Now, whenever the Dropdown field is changed in the InfoPath form, its value will also be saved in the Title field.
An alternative method is to trigger an action when the “Dropdown” field is changed: Add a rule to the “Dropdown” field that changes the value of the “Title” field to be the same as the current value of the “Dropdown” field.
Publish the form and test it.
As an added twist, the Title column can be renamed to “Drop down” and the actual “Dropdown” column can be removed from the view. The result looks like this:
So there now: no custom code, no feature that needs to be deployed, no PowerShell, no SharePoint Designer. Instead, with just a touch of InfoPath we have achieved the behaviour and look and feel of moving the “link to item with edit menu” to another column. At the same time, we’ve apparently changed the data type of the “Title” column to a choice column. Well, not really, but it sure looks this way. The user can create new views of the list and see that behaviour without involving SharePoint Designer or other tools.
Will that work for you?