GUID Element

Last modified: July 15, 2011

Applies to: SharePoint Foundation 2013 | SharePoint Server 2013

In this article
Attributes
Child Elements
Parent Elements
Occurrences

An internal ID number used in the database. The GUID element generates a globally unique identifier (GUID) as returned by the Microsoft Component Object Model (COM) function CoCreateGuid.


<GUID>
</GUID>

Attribute

Description

None

N/A

Minimum: 0

Maximum: Unbounded

This element is used primarily to generate unique IDs for discussion threads.

The following example evaluates a GUID variable and, if it is an empty string, assigns the current GUID to the variable. If it is not an empty string, the value of the GUID variable is returned by default.

<Switch StripWS="TRUE">
  <Expr>
    <GetVar Name="Guid" StripWS="TRUE" /> 
  </Expr>
  <Case Value="">
    <GUID /> 
  </Case>
  <Default>
    <GetVar Name="Guid" StripWS="TRUE" /> 
  </Default>
</Switch>
Show: