SetVarListFromGridSelection: Create a list of Script Variables from Grid Data
SetVarListFromGridSelection function creates lists of variables from grid values.
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.
Tag Attributes
Attribute Name | Attribute Value |
---|---|
ListName | Name of List - Required |
Target | Grid target name - Required according to context (like any other grid action) |
Variable Names | See Variables for valid names. Value will be any valid 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. - Required |
Where / WhereAlternate | Unique ID of column to use as a filter Note: WhereAlternate will use the underlying 'alternate value' (always integer) that exist in some columns as sapio365's 'OBJECTTYPE' or 'STATUS' columns. |
Where mode | Text:
Number:
Date/Time: |
Unique | TRUE - Only keep unique variable sets "Any variable name" - Only keep sets with unique value for this variable |
OrderArcsBy | Variable Name on which to order ascending (cannot be combined with OrderDescBy) |
OrderDescBy | Variable Name on which to order descending (cannot be combined with OrderAscBy) |
UseAlternateValue | semicolon separated columnID list : For columns in this list, value in output list will be the underlying 'alternate value' (always integer) that exist in some columns as sapio365's 'OBJECTTYPE' or 'STATUS' columns. |
RawFormat | True: Use raw (unformatted) value (otherwise display formatted value is used) |
$PK$ | the PrimaryKey of the selection in Grid |
ExplodeColumnID | Unique ID of column whose multivakues must be exploded during the making of the list |
Example Scripts
<SetVarListFromGridSelection/>
<ytriaAutomation>
<SetVarListFromGridSelection ListName="GroupList" GroupName="displayName" Type="groupType" Kreator="createdDateTime" Mail="mailEnabled" where='OBJECTTYPE' Equals='Group'/>
<!-- 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%})"/>
</loop>
</ytriaAutomation>