ONCOMPLETE TRANSFORM SCRIPT?

dheeru_1994
Tera Contributor

HII ALL 

i am new in servicnow , my need is i have to count recently inserted records in target table by using oncomplete transform map script and i want see message in import log not in system logs and can i get import set number
please guide me with examples like my target table is student  
i need code to achive this 
thanks in advance 

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@dheeru_1994 

you can query the import set table with the current set and check the state=inserted to know the count

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

dheeru_1994
Tera Contributor

I gave you script 
var gr = new GlideRecord('u_trying');

gr.addQuery('sys_import_set',source.sys_import_set);

gr.query();

var count = gr.getRowCount();

gs.log('The record are:'+count);  
i am using this script this script is giving me message in system logs but i want to see in import log how can i achive that