onAfter transform script in Integrationhub ETL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2025 04:21 AM - edited 04-23-2025 04:22 AM
Hi
We have a onAfter transform script that updates various fields on child tables, sample script below.
We are now trying to convert this into Integrationhib ETL, so we can use IRE. Other than creating Multiple conditional classes where I can set condition and set a physical class from the fields I have available.
Is there a way to target a class dynamically using a script like below through Integrationhub ETL.
Thanks
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
// Setting Values for target record location *some target record fields sit on child tables only*
var table = target.sys_class_name;
var id = target.sys_id;
// Return record to update on child table
var record = new GlideRecordUtil().getGR(table, id);
var loc= source.u_address;
if (loc != "") {
record.u_address = loc;
record.update();
}
})(source, map, log, target);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2025 10:12 AM
@newservicenowus There is onBefore and onAfter that could be used with integrationHubETL please refer to this document https://www.servicenow.com/docs/bundle/yokohama-integrate-applications/page/administer/import-sets/t...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2025 12:12 AM
Thank you @Sandeep90
I do not think that is available through the Integrationhub ETL, unless I'm missing something.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2025 06:50 AM
Its is you need to go to RTE definition, please go through the docs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2025 07:19 AM
Thanks, I've read the docs. None of the existing applications (SG Intune, SG Meraki etc.) exist as ETL definitions. They all exist in Integrationhub ETL - CMDB Integration Studio Application Data Source as the definition.