how to update multiple records in target table from one record in source table in a transform map?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2018 03:06 AM
Hi All,
i have multiple records in a target table with the same user ID. As per the requirement i want to update all the records in target table using one source record.
i am using an excel with data for 5 fields. rest of the column data will remain same.
how can i achieve this?
Thanks,
KUMAR
- 4,536 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2018 03:18 AM
Hi Ashwani,
You should be writing condition in the transform script where it should get the source record userid.
And get all the records in target table with that particular userid and update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-23-2018 09:45 AM
Did you find a solution to this? I have the same situation, wondering what is the best way to accomplish this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2022 03:37 PM
Hello,
I make it work today but writing an 'onAfter' script in 'Transform Map'. I am providing a sample script as below -
Scenario - adding comments aginst the user based on each department who are eligible for promotion.
Code
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
var gr = new GlideRecord('sys_user');
var dep = source.u_user_department;
gr.addQuery('department', dep);
gr.setValue('comments', 'eligible for promotion');
gr.updateMultiple();
})(source, map, log, target);
Please mark it 'helpful' if it really helps you.......thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2019 04:43 PM
Sorry to bring up an old thread.
Can someone elaborate on this solution please? An example would be beneficial.
I am attempting to use the import/transform solution to find all location records with a given key value and set the 'IsDeleted' value = 'true'.
Thanks,
Mike