OnBefore Transform Script's log.info(str) Not Working

JosephW1
Tera Guru

Hello, does anyone know what causes the symptom shown in this script to occur? Thanks!

EDIT: See the Import sets properties [ServiceNow Docs] page for more info on Import Set properties, as there is no "Import Set Properties" module in the platform. Thanks @János

onBefore Transform Script

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
	log.info(source.sys_import_row + ' info'); //does not get created
	log.warn(source.sys_import_row + ' warn'); //gets created successfully
	log.error(source.sys_import_row + ' error'); //gets created successfully
})(source, map, log, target);

 

Transform History Form

Here are the results when ran on an import set that has 3 import rows. You can see that both A) the transform script ran because the warn and error lines are present and B) the log.info(str) did not work properly because the info lines are missing.

find_real_file.png

 

Any ideas? Thanks!
BTW: This is on a fresh PDI and using a global table, transform map, and transform script.

1 ACCEPTED SOLUTION

Ignore the now deleted message. That's the wrong property to set. glide.importlog.log_to_table is the correct one.

View solution in original post

15 REPLIES 15

Maik Skoddow
Tera Patron
Tera Patron

Hi

the only idea which comes into my mind is related to the following article: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0714743

Maik

Thanks, I'll read through that. This is on a fresh PDI, FYI, so it will have the stock preferences in these areas. Also, both the target table and the transform map are in the global scope.

This doesn't seem to be the answer. I added the following property but I still get the same symptom. Am I missing something, Mark?find_real_file.png

The KB says:

Other Concerns

A previous note on this article indicated these properties could be used in the "Global" scope. Please note this property will only work as created for specific application scopes.