Transform delimited list of user_name values to a glide list field that references sys_user table does not show Display name in Madrid


The customer is transforming command delimited list of user_name values to a glide list field that references sys_user table. Pre Madrid Patch 3 HF1 upgrade, these user_name values were successfully resolving to sys_user records and updating the glidelist field u_managers successfully. Per documentation, this should only happen if the incoming source value is the display name of the target table. In the case of sys_user this is Name.

While new Madrid behavior appears to be the expected behavior vs. previous London behavior. This appears to be a regression since it worked previously in London and is no longer working.

Steps to Reproduce

1. Create a custom field u_vmanagers on the sys_user table where Type = List and Reference as the User table.
2. Create a CSV file with these columns and values, substituting user IDs from your instance
3. Import the data source and create a transform map with these settings:
username: user_name, coalesce
vmanagers: u_vmanagers
4. On the target table, it shows,manager.two and not the display name for these users.


This work around is specific to Target fields which are of List type and have a reference to the sys_user table.

The transform entry in place will need to be reworked to "Use source script"

The transform entry which transforms from the staging table of list of users to a target table with List glide type and reference sys_user will have a script template as follows. Alternate as field names change.

answer = (function transformEntry(source) {
var sourceGlideList = source.getValue('<SOURCE_STAGING_TABLE_LIST_COLUMN_NAME>');
var listOfUserName = sourceGlideList.split(',');
var result= "";

for (var i = 0, len = listOfUserName.length; i < len; i++) {
result += GlideReferenceField.getSysID('sys_user', listOfUserName[i], <CREATE_SYS_USER_IF_NOT_FOUND(Boolean)>) + ',';
// Add your code here
return result; // return the value to be put into the target field



Related Problem: PRB1348060