1

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

1

Strictly speaking it is not possible to set a default value on a people field. But, you might be able to accomplish your requirement another way. For example,

  • A workflow
  • A list item event receiver
  • Some JavaScript on the new item form that prepopulates the form field.

...And, there is a third party tool that claims to do what you're looking for. As is always worth mentioning with third party tools, your mileage may vary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.