Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Length Element (View)

Last modified: July 15, 2011

Applies to: SharePoint Foundation 2013 | SharePoint Server 2013

In this article
Attributes
Child Elements
Parent Elements
Occurrences

Returns the length of the string within the element. The value returned can be divided by, or subtracted from, the value of the Div or Sub attribute, respectively.


<Length
  Div = "Integer"
  Sub = "Integer">
</Length>

Attribute

Description

Div

Optional Integer. Specifies how much to divide the resulting value by.

Sub

Optional Integer. Specifies how much to subtract from the resulting value.

Minimum: 0

Maximum: Unbounded

The following line of code sets a variable named TextLength.

<SetVar Name="TextLength">This is some text that is 
   45 characters long.</SetVar>

The next block of code divides the value of the TextLength variable by 5, to render the number 9.

<Length Div="5">
  <GetVar Name="TextLength"/>
</Length>
Show:
© 2015 Microsoft