Current user as default value for a SharePoint Person or Group field
I want to setthe current user as default value for a specific Peron or Group field ona custom content type. I have found a default node for the field element, butnot any examples on how to seta default value like "CurrentUser" for the Person orGroupField".

The closestI got was this blog post, with an example on how to create a custom fieldto solve this. http://srwgd.gjjblog.com/archives/330943/

Does anyone know of a way to specify this something like <Default>[CurrentUser]</Default>?
August 6th, 2008 10:47am

Oddleif, did you ever find a solution to this? I have just come upon a requirement for this and am investigating...

Did you ever try setting the <Default> Node to something like [CurrentUser]? Did it work?

Mark
Free Windows Admin Tool Kit Click here and download it now
March 23rd, 2009 6:06am

I tried setting <DefaultFormula>=[Me]</DefaultFormula> but that didn't work.

Does anybody else have a solution?
March 23rd, 2009 6:17am

Sorry, I never found a solution for setting thisthrough the default node.

Free Windows Admin Tool Kit Click here and download it now
March 23rd, 2009 6:28am

So did you solve it through another method?

If so, could you please provide details?

Thanks!

Mark

March 24th, 2009 12:21am

Don't think I ever solved this one. I think the requirements changed, or maybe I was able to set this through an event. Sorry.
Free Windows Admin Tool Kit Click here and download it now
March 24th, 2009 6:00am

Check this - http://blogs.vbcity.com/skullcrusher/archive/2008/04/10/9024.aspx.

You could put this script in the Default node within of the Field Type.

Regards
Prasad
March 24th, 2009 6:37am

User javascript inEditForm.aspx, get the field and set its value at start up.
Free Windows Admin Tool Kit Click here and download it now
March 25th, 2009 9:02am

Here is how I did it. I found the needed Javascript code here:

http://cs.vbcity.com/blogs/skullcrusher/archive/2008/11/04/set-sharepoint-peoplepicker-field-mark-2.aspx

I then used SharePoint Designer to paste the code on my NewForm.aspx page directly after the following tag:

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">

I didn't have to alter the copied code in any way, it worked exactly as copied.

I hope this helps others.

Jared aka AVGuy
October 30th, 2009 7:34pm

View this add-on(SharePoint Default Value Add-On), which inject a "default value" section into "Create Column" dialog.

Set

Free Windows Admin Tool Kit Click here and download it now
September 21st, 2013 12:54pm

Check this out:

http://social.msdn.microsoft.com/Forums/en-US/389f66a1-d1c1-4630-b5a5-e8be0b970aa7/how-to-specify-default-value-for-people-or-group-field-in-sharepoint-with-current-user

September 21st, 2013 2:34pm

In SharePoint Designer select the webpart and change the following properties

IsIncludedFilter=""

AuthorizationFilter=""

to the group name

Free Windows Admin Tool Kit Click here and download it now
August 14th, 2015 10:27pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics