SetVarListSize: Assign a list size to a script variable

The SetVarListSize function assigns a list size to a script variable.

Detailed Description

A list contains 0 or more elements. SetVarListSize fetches the number of elements and assigns it to the variable of your choice.


Tag Attributes

Attributes

Value Description

ListName

Anything in the form of : varName="listName" Assigns to the variable varName (subsequently accessible via {%varName%}), the number of elements in the list named "listName".


If no list exists with the supplied name, the variable value is set to 0 and an error is raised.

automation-SetVarListSize-1.gif

Example Scripts

XML
<SetVarListSize/>


XML
<ytriaAutomation>
	<SetVarListFromGridSelection ListName="GroupList" GroupName="displayName" Type="groupType" Kreator="createdDateTime" Mail="mailEnabled"/>
	<SetVarListSize GroupListSize="GroupList"/>
	<Echo value="Group list size: {%GroupListSize%}"/>
</ytriaAutomation>