Tag: SetVarListsFromGridColumns

The SetVarListsFromGridColumns function creates lists of variables from the unique values in the grid column.

<SetVarListsFromGridColumns/>
XML

Tag Attributes

AttributesAttribute ValueValue DescriptionComment
TargetN/A

Grid target name -mandatory according to context (like any other grid action)

The Target may also be an action to open another module (e.g. ShowUsers).

In that case, the module opens and the selection is made in that grid. Then the module closes.

Mandatory
Variable namesN/AAnything except:

- "Name"
- "Action"
- Reserved names:

Date: current date MM/DD/YYYY
Time: HH:MM;SS AM/PM

Loop context:
LoopIndex: current loop index
ListSize: current list size
ListName: current list name

FolderDocuments: Windows account Documents folder path (%USERPROFILE%\Documents)
FolderTemp: Ytria temp folder path (%LOCALAPPDATA%/Ytria)

ErrorAction
ErrorSystem
N/A
Variable valuesN/A

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.

N/A

Example Script

<ytriaAutomation Application="sapio365">
	<SetVarListsFromGridColumns target="ShowUsers" cities="city" positions="jobTitle"/><!-- make lists of cities and job titles from a user module that will be temporarily opened-->
		<UserInput Title="Select city and position">
			<Variable name="City" Label="Select city" Tooltip="The unique cities from ShowUsers" Type="List">
				<ListItem ListName="cities" value="cities"/>
			</Variable>
			<Variable name="Position" Label="Select position" Tooltip="The unique positions from ShowUsers" Type="List">
				<ListItem ListName="positions" value="positions"/>
			</Variable>
		</UserInput>
		<MsgBox Title="Selection made" Message="City is {%City%}" MessageExtended="Position is {%Position%}" Type="eXclamation"/>
</ytriaAutomation>
XML


In this example, two lists of the unique values from a Users module that will be opened are created from the columns city and jobTitleThe two lists are then used to populate two dropdowns in a UserInput dialog.
The users module opens in order to gather the data and closes automatically when the lists are ready.


<ytriaAutomation Application="sapio365">
	<ShowUsers>
		<SetVarListsFromGridColumns cities="city" positions="jobTitle"/><!-- make lists of cities and job titles from current user module-->
			<UserInput Title="Select city and position">
				<Variable name="City" Label="Select city" Tooltip="The unique cities from ShowUsers" Type="List">
					<ListItem ListName="cities" value="cities"/>
				</Variable>
				<Variable name="Position" Label="Select position" Tooltip="The unique positions from ShowUsers" Type="List">
					<ListItem ListName="positions" value="positions"/>
				</Variable>
			</UserInput>
		<MsgBox Title="Selection made" Message="City is {%City%}" MessageExtended="Position is {%Position%}" Type="eXclamation"/>
	</ShowUsers>
</ytriaAutomation>

XML


In this example, two lists of the unique values from the current Users module are created from the columns city and jobTitle.