Skip to main content
Skip table of contents

ImportListIntoGrid, ImportListInGrid: import values from a List of SetVar

Tag: ImportListIntoGrid, ImportListInGrid

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

Detailed Description

When a 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 into 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

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 varibale from teh list to use as the key that connects the data in the list 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

If GridKeyUID is set to ‘$PK$', ImportKey should be referring to a variable in the list also set to '$PK$’. In this case rows are identified by their basic PK (ignoring PK extras likes multivalue index in case of exploded rows). Only selected rows are processed: if exploded rows are not all selected in a set, only the selected ones get the list import fields.

List

Name of list to import. Required

NB: only SetVar elements 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

MatchSelectedRowsOnly

If True, only selected grid rows will be matched.
Required

Family

Name of family Multivalue for the imported columns

If the family exists in the grid, the imported columns are integrated according to the current status of the rows: values for exploded rows are set as part of the corresponding multivalue set, unexploded rows are set as mulitvalues.

It is highly recommended to use unexploded imports (set with the Separator parameter) to unexploded grids, and exploded imports (no separator set) with exploded grids.

Missing values (no match between list key and grid key) are set as No Value.

If the family does not exist, it is created.

Not Required

 

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

SetParam Tag Attributes

Attribute

Description

Value

List variable name. Required

ColumnID

Unique ID for the grid column that will contain the imported data of the list valriable 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 the list UserCList and imports the values of v_Project in column PROJECT with UID _IMPORTED_ProjectList

With Family:

CODE
<SetVarListFromGridSelection ListName='_tmpList' v_PK='$PK$' v='TARGETDOMAIN' Verbose='true'/>

<ImportListIntoGrid List='_tmpList' ImportKey='v_PK' GridKeyUID='$PK$' Family='Permissions' matchselectedrowsonly="true">
    <SetParam Value='v' ColumnID='VVV' ColumnTitle='VVV'/>	
</ImportListIntoGrid>
JavaScript errors detected

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

If this problem persists, please contact our support.