Scope: ServiceNow -> ServiceNow migrations
ID List Mappings can be used for ServiceNow to ServiceNow migrations when the target field type is a ServiceNow List field. The source value can either be another ServiceNow List field, a String field or a temporary variable (of type string).
Note that this type of mapping is only required if the referenced sys-ids in the list are different on the source and target instance. If they are the same then a Simple Mapping can be used instead.
To create a new ID List Mapping, first select the Target Field from the list of fields in the Field Mapping List, then select ID List from the New Mapping field below. A new screen is then presented to allow the ID List Mapping to be completed:

The Source Type can be either Source Field or Temporary Variable. If Source Field is selected then a drop-down list of source fields is provided for selection. The source field selected should be either a ServiceNow List field or a String field.
If Temporary Variable is selected, the variable must be set either from another List type field or populated with a comma delimited set of sys_id values (without any value delimiters). For example, use a lookup mapping with the concatenated values option to obtain a list of sys_id values, then strip out the quotes (with an assignment mapping) to leave a list of sys_id's which could then be mapped to the list field.
In ServiceNow, the List field contains a list of SysIDs, each of which relate to records in a reference table. During execution, the target server is searched for the corresponding list of SysIDs based on the display value of the field. If you want to use something other than the Display Value to identify the list, change the option from Use Display Field Values to Use Selected Field Mappings. When you select this option, a new tab called Reference Field Mappings is displayed like this:

This allows the user to enter one or more source and target values that can be used to uniquely identify the target records on the referenced table.
If no matching record is found you can control the behaviour using the No Match Action field on the Source Tab as follows:
|
On No Match Action |
Description |
|
Ignore |
Ignores the mapping and leaves the target unchanged. |
|
Skip Record |
No target values are set for this record, skips to the next record; |
|
Log Error |
No target value is set but an error is recorded in the log. |
|
Warning |
No target value is set but a warning is recorded in the log. |
Similarly if multiple matches are found, you can control the behaviour using the Multiple Match Action field as follows:
|
Multiple Match Action |
Description |
|
Use First |
Sets the target value to the field value returned by the first record in the Query. |
|
Skip Record |
No target values are set for this record, skips to the next record; |
|
Log Error |
No target value is set but an error is recorded in the log. |
|
Warning |
No target value is set but a warning is recorded in the log. |
Creating ID List Field Mappings using String Fields or Temporary Variables
If the Source Type is Source Field and the source field selected is a String then the Reference Forms tab should be used to identify which table the ID values in the source list reference so that their display values can be looked up.

Similarly, if the Source Type is Temporary Variable, the Source Reference Form must be selected to identify which table the ID values in the temporary variable reference.
If the target field is of type String or the target is a temporary variable then the Target Reference Form must be selected to identify which table the ID values on the target or temporary field relate to.
Comments
0 comments
Please sign in to leave a comment.