- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Community,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ektamestri
I will suggest Import Sets with Multiple Transform Maps
1.Ensure your spreadsheet has the main Incident Number (inc_number) on every row, along with the identifier for the related record (e.g., task_number for incident tasks, ci_item for outages).
2. Navigate to System Import Sets > Load Data. Create a new staging table.
3.Create Transform Maps: Create separate Transform Maps for each table and map the data from staging table to target table:
a.Incident Task (incident_task) -> Coalesce on number.
b. Problem Task (problem_task) -> Coalesce on number
etc
Make sure for Incident task and problem task, you are mapping incident number properly ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you can use onAfter transform script and handle the data insert/update using that
no other approach
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
yes that's feasible
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ektamestri
Use onAfter transform script to update the remaining fields that is not on you MIM table,
For example - Query incident_task where incident = target.sys_id. update the relevant fields based on source.u_task_data.
Happy to help!
To help others in the community find this solution, kindly mark this response as the Correct Answer and Helpful.
Warm Regards,
Deepak Sharma
Community Rising Star 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
I have tried with onAfter transform script for work notes (present in excel as Note1, Note2, Note3, Note4), all four are coming, but only part of them.
Script is:
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
if (!target || !target.sys_id) {
log.error('[Notes Import] No target incident in context for row ' + source.sys_id);
return;
}
// Collect notes from your import set columns
var notes = [
source.u_note1,
source.u_note2,
source.u_note3,
source.u_note4
];
// One update per non-empty note (each becomes its own work note)
for (var i = 0; i < notes.length; i++) {
if (notes[i]) {
target.work_notes = notes[i].toString();
target.update();
}
}
})(source, map, log, target);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
I have used onAfter transform script. It is working, it is adding four work notes, but only part of what is available in excel. I have used below script:
