Tag: SelectFromList

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

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

Tag Attributes

AttributesAttribute ValueValue DescriptionComment
TargetN/AUniquely identifies the grid (grid code name).N/A
ListNameN/AName of list to use as source of values by which to match row.N/A

The list must contain SetVar actions only.

Inside the action, SetParam entries will set thecolumnIDand variable name from the list to be used as reference in thevalueparameter:

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


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

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>
XML

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="ABC"/>
	<List name="O365GroupList" Action="SetVar" GType="Security Group" Comment="XYZ"/>
	<List name="O365GroupList" Action="SetVar" GType="Distribution list" Comment="jambon"/>
	<SelectFromList ListName="O365GroupList">
		<SetParam columnID="groupType" value="GType"/>
		<SetParam columnID="displayName-A" value="Comment"/>
	</SelectFromList>
</ytriaAutomation>
XML


only-setvar