Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is the closest I've ever come:</p> <pre><code>&lt;Field ID="{99ced9dc-5715-47a7-9ede-1733f027eeb4}" Name="MyField" DisplayName="My Field" Type="User" List="UserInfo" UserSelectionMode="PeopleOnly" Required="TRUE"&gt; &lt;DefaultFormula&gt;=";#"&amp;amp;Me&lt;/DefaultFormula&gt; &lt;/Field&gt; </code></pre> <p>It doesn't <a href="http://social.technet.microsoft.com/Forums/en-ZA/sharepoint2010customization/thread/d503d05f-9234-45dd-90b4-3faef74fbf1e" rel="nofollow">blow up</a>, but it doesn't give the desired result either. The problem is that <code>Me</code> will give the name of the user, but since the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfielduser.aspx" rel="nofollow">User Field</a> is a special type of <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfieldlookup.aspx" rel="nofollow">Lookup Field</a>, the name is ignored. All that is needed is the ID, but I haven't been able to find anything that will give me that value.</p> <p>Here are some possible workarounds:</p> <ul> <li>Custom Field: <a href="http://www.fftf.org/news/Oct06feed/Current_user_as_default_value_for_a_SharePoint_Person_or_Group_field.rss.html" rel="nofollow">Current user as default value for a SharePoint Person or Group field</a></li> <li>Event Receiver: <a href="http://jeff-sharepoint-note.blogspot.com/2011/09/add-current-user-to-person-field.html" rel="nofollow">Add current user to person field default value with event receiver ItemAdding–SharePoint</a></li> <li>Javascript: <a href="http://social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/ce824583-b488-4db4-9abd-09d9525b2040" rel="nofollow">Current user as default value for a SharePoint Person or Group field</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload