Skip to main content
Skip table of contents

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 NameAttribute Value
ListNameName of List Required
TargetGrid 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
The field value in this column is tested against the the value set in (where mode)
See example below with OBJECTTYPE column used as WHERE clause
<Select Lines="ByValue">
<SetVarListFromGridSelection v_ID='id' ListName='list_COUNT' where='OBJECTTYPE' Equals='Message'/>

Note: WhereAlternate will use the underlying 'alternate value' (always integer) that exist in some columns as sapio365's 'OBJECTTYPE' or 'STATUS' columns.

Where mode


  • Equals
  • Begins
  • NotBegins
  • NotEquals
  • Contains
  • NotContains
  • Ends
  • NotEnds
  • IsIn (semicolon separated list, e.g. IsIn ="abcd;efgh")
  • IsNotIn (semicolon separated list)
  • IsInString
  • IsNotInString


  • GreaterThan
  • GreaterOrEquals
  • LessThan
  • LessOrEquals

- not supported -

UniqueTRUE - Only keep unique variable sets
"Any variable name" - Only keep sets with unique value for this variable
OrderArcsByVariable Name on which to order ascending (cannot be combined with OrderDescBy)
OrderDescByVariable Name on which to order descending (cannot be combined with OrderAscBy)
UseAlternateValuesemicolon 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.
RawFormatTrue: Use raw (unformatted) value (otherwise display formatted value is used)
$PK$the PrimaryKey of the selection in Grid
ExplodeColumnIDUnique ID of column whose multivakues must be exploded during the making of the list

Example Scripts

	<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%})"/>

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.