Hi I have a scenario with Tasklists.

In the tasklist we observed that the title is allowing duplicate values so I thought of creating a new field with name “Task” which will have all features as Title and will not allow duplicate values.

1) First I created a field with name “Task” where I selected the option of Enforce Unique values and Required.
2)I went to server and run the below power shell script.Here in the code mention your site , list name and field.

Powershell script

Add-PSSnapin “Microsoft.SharePoint.PowerShell”
#Get the web
$SourceWebURL = “http://xyz/sites/abc/”;
$Spweb = Get-SPWeb $SourceWebURL;
#update based on your list
$ListName=”TaskList1″;
$FieldName=”Task”;
$SPList = $Spweb.Lists[$ListName];
$field=$SPList.Fields[$FieldName];
$field.ListItemMenu = $true;
$field.ListItemMenuAllowed = 1;
$field.Update();
$SPList.Update();
write-host “Done”

Then just like by default Title now you can able to add all other functionality for new field Task.

tasklist.png

Advertisement