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"/>
</SelectFromList>
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
Attributes | Attribute Values | Value Description |
---|---|---|
Target | Applicable Grid Code | N/A - Not Required (See detailed description) |
ListName | Name 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
Attributes | Attribute Values | Value Description |
---|---|---|
ColumnID | The corresponding Column ID as shown in the Grid Manager | Source item names. Separate multiple field names with a semicolon - Required (See detailed description) |
Value | Variable name from the list to be used as reference. | Required (See detailed description) |
CaseSensitive | True / False | Force case-sensitivity. Optional 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...
<ytriaAutomation>
<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"/>
</SelectFromList>
</ytriaAutomation>
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"/>
</SelectFromList>
</ytriaAutomation>