top of page

Setting a Column Default value on a Person field....why can't I do that?

  • Writer: Kasper Larsen
    Kasper Larsen
  • Apr 10
  • 1 min read

Just a quick tip: Yes, you can set a default value on a Person Column, (both List Columns and Site Columns), but it will require PnP.PowerShell.



I have a new library and have add a single select Person Column and a multi select Person column


However, when I go to the settings in order to set a default value for the columns, I get this:


I have no idea why there isn't any GUI for setting the default value for a Person column. Is it a bug or perhaps on purpose?


It doesn't really matter because we have PnP.PowerShell:


$conn = Connect-PnPOnline -url "https://contoso.sharepoint.com/sites/SetDefaultColumnValuesTestArea" -Interactive -ClientId $clientId -ReturnConnection

$user1 = New-PnPUser -LoginName "Admin@contoso.onmicrosoft.com" -Connection $conn

$user2 = New-PnPUser -LoginName "DiegoS@contoso.onmicrosoft.com" -Connection $conn

Set-PnPDefaultColumnValues -List "A new Library" -Field "SinglePersonColumn" -Value "$($user1.Id);#$($user1.LoginName)" -Connection $conn

Set-PnPDefaultColumnValues -List "A new Library" -Field "MultiPersonColumn" -Value "$($user1.Id);#$($user1.LoginName)","$($user2.Id);#$($user2.LoginName)" -Connection $conn

 
 
 

Comments


30103817

  • Twitter
  • LinkedIn

©2023 by M365thinking. Proudly created with Wix.com

bottom of page