Skip to main content
Skip table of contents

SelectFromList: Select Rows From List

Tag: SelectFromList

The SelectFromList function selects rows in a grid from values stored in a list of SetVar actions.

<SelectFromList ListName="O365GroupList">
	<SetParam columnID="groupType" value="GType"/>

Detailed Description

Values set in SetVar actions that are added to a list can be used as row selection keys.

Each row value in the target column is compared to the variable value for each entry in the list.

When there is a match, the row is selected.

Tag Attributes

AttributesAttribute ValuesValue Description
TargetApplicable Grid CodeN/A - Not Required (See detailed description)
ListNameName of list to use as source of values by which to match rows.N/A - Required

The list must contain SetVar actions only.

Inside the action, SetParam entries will set the ColumnID and variable name from the list to be used as reference in the Value parameter:

SetParam Options

AttributesAttribute ValuesValue Description
ColumnIDThe corresponding Column ID as shown in the Grid ManagerSource item names. Separate multiple field names with a semicolon - Required (See detailed description)
ValueVariable name from the list to be used as reference.

Required (See detailed description)

CaseSensitiveTrue / False

Force case-sensitivity.


Defaults to false.

<SetParam columnID="MyColumnID" value="MyListVariable"/>

More than one pair of column ID / variable name can be used. They are combined with and AND (as in a regular select with SetParam actions combine with And="true" - cf Select: Select Rows

Example Script

 Example 1: In sapio365 / Group Module, select all rows where where the group type column value matches Distribution list or Security Group or Marketing...

	<List name="O365GroupList" Action="SetVar" GType="Distribution list"/>
	<List name="O365GroupList" Action="SetVar" GType="Security Group"/>
	<List name="O365GroupList" Action="SetVar" GType="Marketing"/>
	<SelectFromList ListName="O365GroupList">
		<SetParam columnID="groupType" value="GType"/>

Example 2: In sapio365 / Group Module, select all rows where where the group type and display name annotation column values match Distribution list and ABC, or Security Group and XYZ, or Distribution list and jambon:

<ytriaAutomation Console="True" KeepAlive="True">
	<List name="O365GroupList" Action="SetVar" GType="Distribution list" Comment="This a comment about the distribution list"/>
	<List name="O365GroupList" Action="SetVar" GType="Security Group" Comment="This a comment about the security group"/>
	<List name="O365GroupList" Action="SetVar" GType="Distribution list" Comment="Another comment about the distribution list"/>
	<SelectFromList ListName="O365GroupList">
		<SetParam columnID="groupType" value="GType"/>
		<SetParam columnID="displayName-A" value="Comment"/>

Only SetVar Select Row from list

JavaScript errors detected

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

If this problem persists, please contact our support.