Commit d49aa0f
authored
Refactor Duplicate Records for any table script and Add Dynamic output support (#1947)
* Update Duplicate Records for any table based on field.js
Enhancements
Function name changed from DupCheck to findDuplicateRecords for clarity.
Variable arr renamed to outputValues to better reflect its purpose.
Variable gr renamed to aggregateGR for clearer context.
Variable kb renamed to recordGR to remove table-specific implication.
HTML entity > replaced with '>' in the addHaving clause.
Use of addQuery('active', 'true') replaced with addActiveQuery() for standard filtering.
Field access changed from direct property access (e.g. kb.number) to getValue() for consistency.
Array logging improved by using JSON.stringify(outputValues) for readability.
Hardcoded usage moved to a clearly marked section for easier customization.
Added Functionality
New parameter outputFields added to allow dynamic specification of which fields to include in the output.
Each output entry is now a key-value object containing values from the specified outputFields.
Logging per duplicate record now reflects the full output entry using JSON.stringify(outputEntry).
* Update README.md
Updated the Readme file to reflect enhancement to the script. In addition, made it clear that there are 2 scripts (which was already the case). And per script explained the functionality in more detail. Including that of the original single script.1 parent a5bf3df commit d49aa0f
File tree
2 files changed
+71
-37
lines changed- Server-Side Components/Background Scripts/Find out Duplicate Records
2 files changed
+71
-37
lines changedLines changed: 48 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
28 | 40 | | |
29 | 41 | | |
30 | 42 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
34 | 47 | | |
35 | 48 | | |
36 | | - | |
37 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
Lines changed: 23 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments