Is there any way to run transform map automatically?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2019 07:10 AM
My requirement is, if i submit a request using one of the service catalog with the attachment excel file which needs to be upload into service now. After i submit a request with excel file it should trigger a particular transform map.
Thanks For the help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2019 07:14 AM
Hi,
The Transform map will automatically run when the data is inserted into the Import Set Table.
Please refer the below link for info - Auto run a transform map
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Thank you
Cheers
Alberto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2019 07:16 AM
Hi Kapil,
Yes this is possible and here are the steps:
1) create a data source with some file as attachment xls, csv etc
2) create transform map, field maps etc as usual
3) create a schedule data import and attach this data source to this data import. keep it active false since you will be triggering it from workflow
4) in the workflow of RITM copy the attachment from RITM to the data source using GlideSysAttachment
GlideSysAttachment.copy('sc_req_item', current.sys_id, 'sys_data_source', '<dataSourceSysId>');
5) use below script in your workflow script to execute the data source
var schImp_GR = new GlideRecord('scheduled_import_set');
schImp_GR.addQuery('name','<NameOfDataImport>');
schImp_GR.query();
if(schImp_GR.next()){
SncTriggerSynchronizer.executeNow(schImp_GR); // this will work in global scope
//gs.executeNow(schImp_GR); // this will work in scoped app
}
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2022 04:31 AM
You really made my day!!!! Thank you so much. Each step explained very clearly. I simply followed your instructions and finished my requirement in just 30 mins.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2023 08:49 PM - edited ‎08-15-2023 08:50 PM
Hi @Ankur Bawiskar ,
In the above scenario there will be multiple attachments to the same Data source and not the latest attached will be loaded. Only if we delete the existing attachment on the data source and attach a new one then it picks the new attachment