Skip to main content
Tweeted twitter.com/#!/StackSharePoint/status/473264742979481600
added 223 characters in body
Source Link

I don't see a way to default the EmployeeName column (person or group type) to current user. Is there a powershell way to set this up? I am not sure if the following code will work for Person and Group type column? I saw some jquery way but I rather go with OOTB if it's possible.

$w = Get-SPWeb http://inside.nov.com
$l = $w.GetListFromUrl("/Lists/EmployeeSurvey/AllItems.aspx")
$f = $l.Fields["EmployeeName"]
$f.DefaultValue = "[ME]"
$f.Update()

I tested jquery and it works perfectly with new form by adding cewp and reference the js from asset library.

http://www.sharepointdiary.com/2013/07/set-people-picker-default-value-to-current-user.html

Thanks

I don't see a way to default the EmployeeName column (person or group type) to current user. Is there a powershell way to set this up? I am not sure if the following code will work for Person and Group type column? I saw some jquery way but I rather go with OOTB if it's possible.

$w = Get-SPWeb http://inside.nov.com
$l = $w.GetListFromUrl("/Lists/EmployeeSurvey/AllItems.aspx")
$f = $l.Fields["EmployeeName"]
$f.DefaultValue = "[ME]"
$f.Update()

I don't see a way to default the EmployeeName column (person or group type) to current user. Is there a powershell way to set this up? I am not sure if the following code will work for Person and Group type column? I saw some jquery way but I rather go with OOTB if it's possible.

$w = Get-SPWeb http://inside.nov.com
$l = $w.GetListFromUrl("/Lists/EmployeeSurvey/AllItems.aspx")
$f = $l.Fields["EmployeeName"]
$f.DefaultValue = "[ME]"
$f.Update()

I tested jquery and it works perfectly with new form by adding cewp and reference the js from asset library.

http://www.sharepointdiary.com/2013/07/set-people-picker-default-value-to-current-user.html

Thanks

Source Link

Set EmployeeName default to current user

I don't see a way to default the EmployeeName column (person or group type) to current user. Is there a powershell way to set this up? I am not sure if the following code will work for Person and Group type column? I saw some jquery way but I rather go with OOTB if it's possible.

$w = Get-SPWeb http://inside.nov.com
$l = $w.GetListFromUrl("/Lists/EmployeeSurvey/AllItems.aspx")
$f = $l.Fields["EmployeeName"]
$f.DefaultValue = "[ME]"
$f.Update()