import list with list view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2025 06:47 AM - edited 04-16-2025 06:50 AM
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2025 10:11 AM
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