Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Make a column unique powershell

$
0
0

How can I make a column/field unique in powershell?
Here is the code that I have :

 


$myList.Fields.AddFieldAsXml("<Field Type='Number' DisplayName='SortOrder' />",$true,[Microsoft.SharePoint.Client.AddFieldOptions]::AddFieldToDefaultView)

$myList.Update()
$ctx.ExecuteQuery()

just need to make it a unique field


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>