Skip to content

Commit 508c90d

Browse files
authored
Update readme.md
1 parent 780630a commit 508c90d

File tree

1 file changed

+24
-1
lines changed
  • Server-Side Components/Background Scripts/Duplicate Finder

1 file changed

+24
-1
lines changed
Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,24 @@
1-
# Contribution
1+
## ServiceNow Duplicate Record Finder
2+
A simple server-side script for ServiceNow that finds and reports on duplicate values for any field on any table. It uses an efficient GlideAggregate query and formats the results into a clean, readable report.
3+
4+
### How to Use
5+
This script is designed to be run in **Scripts - Background** or as a Fix Script.
6+
1. Navigate: Go to **System Definition > Scripts - Background** (or type sys.scripts.do in the filter navigator).
7+
2. Copy Script: Copy the entire contents of the script.js file.
8+
3. Paste and Configure: Paste the script into the "Run script" text box. At the bottom, modify the function call to target your desired table and field:
9+
```js
10+
// CONFIGURE YOUR QUERY HERE
11+
findDuplicates('your_table_name', 'your_field_name');
12+
```
13+
For example, to find duplicate email addresses in the User table:
14+
```js
15+
findDuplicates('sys_user', 'email');
16+
```
17+
To find incidents with the same short description:
18+
```js
19+
findDuplicates('incident', 'short_description');
20+
```
21+
22+
23+
4. Run Script: Click the "Run script" button. The results will be displayed on the screen below the editor.
24+

0 commit comments

Comments
 (0)