Script to create incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2016 11:02 AM
Hi Everyone,
We have a spreadsheet that had a list of servers in Column A, could you auto create a priority E ticket for every 10 servers in that spreadsheet??? For example, we have 800 servers that need to be queried for patch levels. We want to create 80 tickets where each ticket includes 10 servers. All tickets would have the same attributes…priority E, same assignment group, etc.
further, we would like to ink those 10 servers in the CI tab of the incident record.
Thanks,
Rahul kathuria

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2016 01:50 PM
I forgot that the scripts are now run in functions so it precludes my whole concept of sharing global variable values. Darn! My whole solution was predicated on a loophole with variable scope. That loophole has been closed.
I need to rethink this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2016 10:42 AM
Chuck, Any luck with this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2016 11:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2016 12:33 PM
Hi Deepak,
Thanks for sharing this but I don't think i can use this in my transform map.
The chunking problem was resolved yesterday, We were able to make 1 single incident from 10 records i was importing (Thanks to Chuck) but the problem was that apart from this single incident, 10 more incidents were getting created with no data...
i don't know if there is a way to restrict those 10 incidents from getting created.
In a nutshell, when i am importing 720 records into servicenow, i only need 72 incidents, not 720+72.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2016 04:27 PM
HI Rahul,
The only other thing I can think of is to use a "temporary table" like a scratchpad that uses my original idea of the onStart and onAfter scripts to track the incident ID to attach to.
The only part that concerns me is whether or not target.sys_id is available in the onAfter script... if it's like an after business rule, it SHOULD. (keyword)