Data load and transform map through Catalog Item

varma2
Mega Sage

Hi All,

I need to import data load and transform map through catalog item. When ever user submit a request with attachment the data should load  through transform map via ritm only.

Please suggest how it possible.

 

Thanks,

Hari

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I have written article for same

Refer that and do the steps mentioned in that.

Please mark it helpful as well

Data load and transform via Catalog Item

Just one thing to remember if you are doing your catalog item in scoped application then you should allow Can Delete access

find_real_file.png

Regards
Ankur

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

View solution in original post

15 REPLIES 15

Hi,

you should use field map script and search for the correct manufacturer based on domain name from excel.

Also for updating the dynamic user name this you can try. Not sure how much it works

1) on onAfter transform script query sc_req_item table and pick the latest RITM

2) get the RITM -> Request -> Requested For and update as this

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {

	// Add your code here

var ritm = new GlideRecord('sc_req_item');
ritm.orderByDesc('sys_created_on');
ritm.addQuery('cat_item.name', 'Your Catalog Item Name Here');
ritm.setLimit(1);
ritm.query();
if(ritm.next()){

target.sys_created_by = ritm.request.requested_for.user_name;
target.update();

}

})(source, map, log, target);

Regards
Ankur

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

Hi Ankur,

 

 Above script, I need to give in runscript  or in the business rule.

 

 

Thanks,

Varma

 

 

 

Hi,

in the onAfter transform map script

Regards
Ankur

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

Hi,

I could see you had marked my response as correct earlier and now it is not.

If I was able to help you for your original question please mark my response correct and helpful.

Regards
Ankur

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

Hi Ankur 

can you tell the same things in flow designer except for workflow?