Export (0) Print
Expand All

UserID Element (Query)

Last modified: July 15, 2011

Applies to: SharePoint Foundation 2013 | SharePoint Server 2013

In this article
Attributes
Child Elements
Parent Elements
Occurrences

Contains the unique ID number of the currently authenticated user of a site, as defined in the UserInfo table of the content database.


<UserID>
</UserID>

Attribute

Description

None

N/A

Minimum: 0

Maximum: Unbounded

The following query returns cases where either the Author or Editor field is equal to the current value of the UserID element, and it returns the results in ascending order with the Title field first, and then the FirstName field.

<Query>
  <Where>
    <Or>
      <Eq>
        <FieldRef Name="Author" />
        <Value Type="Integer">
          <UserID />
        </Value>
      </Eq>
      <Eq>
        <FieldRef Name="Editor" />
        <Value Type="Integer">
          <UserID />
        </Value>
      </Eq>
    </Or>
  </Where>
  <OrderBy>
    <FieldRef Name="Title">
    </FieldRef>
    <FieldRef Name="FirstName">
    </FieldRef>
  </OrderBy>
</Query>
Show:
© 2014 Microsoft