- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2020 03:27 AM
I have a requirement to create Requested Items using data in Excel. This file will also contain the variables that are required to create the RITM if created using service catalog. But here the data will be fetched using an excel file. So I want to know how can I achieve populating the Request variables using transform map. I am able to populate the fields placed directly on the Requested Item form, but having an issue populating the Request variables.
Solved! Go to Solution.
- Labels:
-
Request Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2020 03:14 AM
since you have excel file you will have to parse it and get the variable value and use Cart API
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2020 03:35 AM
Instead of using a transform map to import data directly into sc_req_item you should use the Cart-API to create requested items.
https://docs.servicenow.com/bundle/orlando-application-development/page/script/server-scripting/reference/r_ServiceCatalogScriptAPI.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2020 03:47 AM
you will have to use Cart API for this
Also you need ExcelParser script to parse the excel row by row and create RITM with all the variable info
https://developer.servicenow.com/app.do#!/api_doc?v=newyork&id=GEPS-GlideExcelParser
these links will help you as well
Reading Attachment Contents || Copying attachment || Attachment Properties
Loading data from an email attachment
Script to create RITM with variable info
How to submit a catalog item from script?
Create requests from excel import
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2020 03:04 AM
Hi Ankur,
I referred to this article to create RITM
Creating a Service Request: Using Service Catalog Script API with Inbound Emails and Attachment.
RITM gets created successfully with the desired catalog item. But I am unable to populate catalog variables using data of columns in my excel attachment. Which part of this code do I have to work upon to solve this issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2020 03:14 AM
since you have excel file you will have to parse it and get the variable value and use Cart API
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader