Share via


GUID Element

Applies to: SharePoint Foundation 2010

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>

Attributes

Attribute

Description

None

N/A

Child Elements

None

Parent Elements

Numerous

Occurrences

Minimum: 0

Maximum: Unbounded

Remarks

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

Example

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>