Tag: SetVarListFromGridSelection

The SetVarListFromGridSelection function creates lists of variables from grid values.


Tag Attributes

AttributesAttribute ValuesValue DescriptionComment
ListNameN/AAdds actions to a list that can be iterated in a LOOP actionMandatory
TargetN/AGrid target nameMandatory according to context (like any other grid action)
Variable NamesN/A

Anything except:
Reserved names:

Date: current date MM/DD/YYYY
Loop context


LoopIndex: Current loop index
ListSize: Current list size
ListName: Current list name
FolderDocuments: Windows account Documents folder path (%USERPROFILE%\Documents)
FolderTemp: Ytria temp folder path (%LOCALAPPDATA%/Ytria)

Variable ValuesN/AValid grid column IDs. If a column is not found (invalid column ID), an error is raised, the action fails, the list ends up empty, and the loop will do nothing.N/A
UniqueTrueOnly keep unique variable sets. "Any variable name": Only keep sets with unique value for this variable.N/A
OrderArcsByN/AVariable Name on which to order ascendingly (cannot be combined with OrderDescBy)N/A
OrderDescByN/AVariable Name on which to order descendingly (cannot be combined with OrderAscBy)N/A

Detailed Description

The values are taken from the displayed, formatted values (not the true, raw values) in the selected rows of the target grid. The row selection can be manual before launching the script or from the automation script itself. The value sources are identified by the grid column's unique IDs. Then the fetched values replace the variable names in all action parameters that use them.

Example Script

<ytriaAutomation Application="sapio365">
	<SetVarListFromGridSelection ListName="GroupList" GroupName="displayName" Type="groupType" Kreator="createdDateTime" Mail="mailEnabled"/>
	<!-- loop on the generated list -->
	<loop list="GroupList">
		<ExecuteListAction/> <!-- Does a <SetVar/> with the attributes in SetVarListFromGridSelection except 'ListName' and 'Target' -->
		<echo value="Group {%GroupName%} is of type {%Type%} and was created on {%Kreator%} (mail enabled: {%Mail%})"/>