Robust transform map target List field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2025 02:43 AM
Hi All
Just wondering whether anyone has any example scripts of importing into a Glide list through Robust transform ETL. I currently have a table lookup which updates fine if 1 sys id. However I require sysid's to append to the field.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2025 03:07 AM
Hi,
Below is the sample where I populate the company sys_ids in an array from array of company name. As long as you are keeping the sys_ids in an array, the transform would take care of it.
(function(batch, output) {
for (var i = 0; i < batch.length; i++) {
var input = batch[i].input; // Value of the input column.
var inputArray = input.split(',');
var outputArray = [];
for(var j=0; j<inputArray.length;j++)
{
var companyResult = new sn_cmdb_int_util.CmdbIntegrationHardwareModelUtil().cleanseCompany(inputArray[j]);
outputArray.push(companyResult.companySysId);
}
if(global.JSUtil.nil(outputArray) == false)
output[i] = outputArray.toString();
else
output[i] = '';
}
})(batch, output);
Regards,
Vivek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2025 04:19 AM
Thanks @VivekSattanatha
This is an example of data load.
{"entity_id":"1","mss_entity_id":"12345","domain_entity_id":"5","created_date":"2024-10-07T12:24:16.670777Z","updated_date":"2024-10-07T12:24:16.670777Z"},
{"entity_id":"2","mss_entity_id":"12345","domain_entity_id":"6","created_date":"2024-10-07T12:24:48.921126Z","updated_date":"2024-10-07T12:24:48.921126Z"},
mss_entity_id could be the same number but we want to grab domain_entity_id to update the glide list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2025 03:14 AM
check the approach shared by @VivekSattanatha and it should help you
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
