Skip to main content
Skip table of contents

ImportListInGrid: import values form a List of SetVar

Tag: ImportListInGrid

The ImportListInGrid action uses an automation list containing SetVar actions as input to insert its content in a grid.

Detailed Description

When list and a grid can be matched through key values, eg. an email variable in the list and an email column in the grid, each variable value of the file can be inserted to its matching key value in a new column in the grid.

These new columns are volatile and disappear when the module containing the grid is closed..

Once inserted, the new grid columns may be processed like any other column (sorting, grouping, export…).

Tag Attributes

Attribute

Description

Attribute

Description

Target

The corresponding Grid Code

Sets the target grid panel. Not Required

If no target is set, the default main grid target will be used.

ImportKey

Name of the column from the file to use as the key that connects the data in the file with the data in the grid. Required

GridKeyUID

Unique ID of the column from the grid as shown in the Grid Manager to use as the key that connects the data in the file with the data in the grid. Required

List

Name of list to import. Required

NB: only SetVar element are considered in the list

Separator

If a list value is itself a list and this list is to be inserted as a multi-value field in the grid, this parameter is used to separate each element in the list. Not Required

 

The selection of the file columns to import is made through one or several SetParam actions set as children of the ImportExcelInGrid action.

SetParam Tag Attributes

Attribute

Description

Value

File Column name. Required

ColumnID

Unique ID for the grid column that will contain the imported data of the file column set in Value. Required.

This UID is then automatically prefixed with the text: _IMPORTED_

ColumnTitle

Title of the imported grid column. Required

Example Script

CODE
<ytriaAutomation>
	
	<list name="UserCList" Action="setVar" v_ID="AdeleV@M365x421837.OnMicrosoft.com" v_Project="P1"/>
	<list name="UserCList" Action="setVar" v_ID="Crystal@M365x421837.OnMicrosoft.com" v_Project="P2"/>
	<list name="UserCList" Action="setVar" v_ID="GerhartM@M365x421837.OnMicrosoft.com" v_Project="P1"/>
	<list name="UserCList" Action="setVar" v_ID="NestorW@M365x421837.OnMicrosoft.com"  v_Project="P4"/>
	<list name="UserCList" Action="setVar" v_ID="JoniS@M365x421837.OnMicrosoft.com"  v_Project="P2"/>
	<list name="UserCList" Action="setVar" v_ID="LynneR@M365x421837.OnMicrosoft.com"  v_Project="P999"/>
   
    <ShowUsers>
		<Select lines='all'/>
		<ImportListInGrid List='UserCList' ImportKey='v_ID' GridKeyUID='userPrincipalName'>
            <SetParam Value='v_Project' ColumnID='ProjectList' ColumnTitle='PROJECT'/>
		</ImportListInGrid>
    </ShowUsers>
		
</ytriaAutomation>

This script matches the grid column with UID userPrincipalName to the variables v_ID in the SetVar entries found in list UserCList and imports the values of v_Project in column PROJECTwith UID _IMPORTED_ProjectList

JavaScript errors detected

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

If this problem persists, please contact our support.