How to import excel file from Mid Server to import set table in service now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2019 10:56 PM
Hi Team,
Can you please let me know how can I import files from Mid Server to Service Now.
Mid Server will be present on host system. And Host will post data in excel format to the mid server.
How can I pull that file into service now. Is there any direct configuration that is available.
If no, then what all scripting that I have to do?
Please do not give link to service now guru. I have already checked it and there is no update set available and it is outdated.
Really appreciated if any one could help me with this. I need to do this as an urgent requirement.
Regards,
Sindhuja.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2019 11:07 PM
Hi Sindhuja,
Following link should be helpful
https://community.servicenow.com/community?id=community_question&sys_id=54d2cb61dbd8dbc01dcaf3231f9619dd
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
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
11-08-2019 12:05 AM
Hi Ankur,
If I want to go with below solution, where do I have to write the probe code?
var probe = SncProbe.get("Command");
probe.setName("cd /Users/me/Desktop && cat example.csv | base64");
probe.create("<MID Server Name>");
The response to this will be a base64 encoded string of the file that will get written to ECC Queue in the response. You can then turn this into an attachment with a script on the instance
var encStr = '<long base64 encoded string>';
var stringUtil = GlideStringUtil;
var attachment = new Attachment();
attachment.write('<table>', '<record sys_id>', '<file name>', 'text/csv', stringUtil.base64DecodeAsBytes(encStr));
Regards,
Sindhuja.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2019 12:44 AM
Hi Sindhuja,
check this link; it would help you
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
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
11-08-2019 04:46 AM
Hi Ankur,
I wanted to know, where do I have to write below code. Is it in schedule job?
var probe = SncProbe.get("Command");
probe.setName("cd /Users/me/Desktop && cat example.csv | base64");
probe.create("<MID Server Name>");
Have you worked on similar kind of requirement and is it possible?
Regards,
Sindhuja.