The CreatorCon Call for Content is officially open! Get started here.

import list with list view

MaharshiC
Tera Contributor

Hi,

 

I have created a transform map and i have a site poc field which is list collector field reference to user in my target but a string in my source with email values separated by comma. Now when importing the data i want it to be mapped correctly. I have created a field mapping script but that is not working

answer = (function transformEntry(source) {

    var grp_type = '';
    var result = [];
    var inputArray = source.u_site_poc.split(',');
    var gtype = new ArrayUtil().unique(inputArray);
    for (var i = 0; i < gtype.length; i++) {
        var grpType = new GlideRecord('sys_user');
        grpType.addQuery('email', gtype[i]);
        grpType.query();
        if (grpType.next()) {

            grp_type = grpType.sys_id.toString() + ',';

        }
    }

 
	return usr.sys_id;

   

})(source);

 

MaharshiC_0-1744811256135.png

 

5 REPLIES 5

Hello @MaharshiC ,

 

Please provide a screen shot of the value in the staging table.

Check if there are any space characters at the beginning or end, or somewhere in that value.

Copy the value, go to your user table, and set the filter to: "Email" - "Is one of" - (paste the value). Do you get the expected results?

 

Regards,

Robert