How To Avoid Duplicate Values In Task List And Make Another Field As Title Field In SharePoint 2013

In SharePoint 2013, we have Task Content type that allows us creating a task list. The bad thing about the Task Content Type is that it allows duplicate values as Task names. To avoid that, we need a field which exactly will work like task name or Title field.

For that, you need to create a new column and name it as: "Task”. Then, enforce unique values in the Task column.

However, it will still have issues such as - it will miss the feature to link to edit item, link to view item, and add to time line. To enable those features to the column, we can use a small PowerShell script given below.
  1. Add-PSSnapin "Microsoft.SharePoint.PowerShell"  
  2. #Get the web   
  3. $SourceWebURL = "http://klmn/sites/rst/";  
  4. $Spweb = Get-SPWeb $SourceWebURL;  
  5. #update based on your list  
  6. $ListName="TaskList1";  
  7. $FieldName="Task";  
  8. $SPList = $Spweb.Lists[$ListName];  
  9. $field=$SPList.Fields[$FieldName];  
  10. $field.ListItemMenu = $true;  
  11. $field.ListItemMenuAllowed = 1;  
  12. $field.Update();  
  13. $SPList.Update(); 

Fig 1: Both, Task field and Tile field, are showing all the same features but the Task field enforces unique values.

 
Ebook Download
View all
Learn
View all