onAfter transform script in Integrationhub ETL

newservicenowus
Tera Guru

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);​

 

4 REPLIES 4

Sandeep90
ServiceNow Employee
ServiceNow Employee

@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... 

Thank you @Sandeep90 

I do not think that is available through the Integrationhub ETL, unless I'm missing something.

Sandeep90
ServiceNow Employee
ServiceNow Employee

Its is you need to go to RTE definition, please go through the docs.  

newservicenowus
Tera Guru

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.