Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How can we push errors into an error field of sys_import_set_row table via transform map script.

Aanchal Mehndi1
Giga Contributor

How can we push errors into an error field of sys_import_set_row table via transform map script.

I have written few validations in a transform map script, which will ignore the row if condition doesn't matches.As there are many scenarios so I want to push the information in the error field of sys_import_set_row table that why row got ignored.

I didn't see any function in wiki that we can use to push error to error field of sys_import_set_row table via transform map script.

Does anyone have any solution?

11 REPLIES 11

HugoFirst
Kilo Sage

I'm not totally sure that I understand the question, but I log errors ( and informational messages ) using the log object if I'm in a transform map script..


See Transform Map Scripts - ServiceNow Wikiffor details.



Some example calls:



log.info("This is my informational message" );


log.error("This is my error message");



The messages all end up in the import log.   Is that what you're trying to do?