Amit Gujarathi
Giga Sage
Options
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
07-10-2021
09:18 AM
Hi Friends ,
In this video we will try to understand the imense power of Servicenow Reporting | We will see how we ServiceNow call Script include in Reports.
We will focus on the use case to generate ServiceNow Duplicate Records report | This tutorial includes powerful reporting tips and tricks.
Use a script to find any "duplicate" records within your ServiceNow application.
WHY WOULD YOU NEED THIS?
One example might be duplicate user ids. Users may have duplicate user ids if the Transform Map is coalesced off another field other than User ID. This happens in corporate environments with multiple company mergers/partnerships where AD directories and user name rules are not combined or determined yet.
Other times there might be a mistake in an import, discovery issue, customization mistake, or maybe you just need to find this out for a report. Regardless of the reason to find a "duplicate" record, these scripts may assist you.
FIND DUPLICATE RECORDS WITH A BACKGROUND SCRIPT
What I do to check for "duplicate" records most often is just to run a quick background script. This works great for testing your imports or helping to find a permanent fix to an existing issue.
So lets first understand what is reports and script include ?
Script includes
Paris
Script includes are used to store JavaScript that runs on the server.
Create script includes to store JavaScript functions and classes for use by server scripts. Each script include defines either an object class or a function.
Consider using script includes instead of global business rules because script includes are only loaded on request.
Script include form
Script includes have a name, description and script. They also specify whether they are active or not, and whether they can be called from a client script.
To access script includes, navigate to System Definitions -- Script Includes.
Use script includes
Script includes are found under System Definition or System UI. You can call existing script includes from a script.
To create an entirely new script include, you can follow the format of any of the existing script includes. In the example, the name of your Script Include is 'NewInclude' and there is a single function called 'myFunction.' It is important that the name of the script include match the name of the class, prototype, and type. When you create a new script include and give it a name, the system provides you a code snippet with the class and prototype set up properly.
Reporting
ServiceNow Reporting enables you to create and distribute reports that show the current state of instance data, such as how many open incidents of each priority there are. Reporting functionality is available by default for all tables, except for system tables.
- 6,447 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.