
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 04-08-2021 12:01 AM
There is an interesting question I have seen on community which is to compare and create a report by comparing value of multiple fields among different tables.
I did a POC to achieve comparisons on Service Portal, this can data objects available can be leveraged to generate csv or pdf
How it works
1. User will select tables for whose fields need to be compared
2.Once tables are selected, Click on Add field comparison button , which creates a mapping of fields that are needed to be compared by script.
In the below example , incident table short description will be compared with description field of change table
3. Append necessary data conditions using condition builder. Once conditions are added dont forget to click on "Run". Clicking on run will trigger necessary events to register filter condition of specific tables. If there is a change in condition or mapping there is no need to reload the page , just update mappings and filter and then click on compare.
Note:
a. All the data from table A will be compared with records of table B, i.e. if condition provided for table A returns 100 records and 200 for table B , then only 100 records (table A count) will be compared.
b. Comparison can be done on same table or different table
c. There is no limit on number of fields and records
4. Once conditions are added click on "Identify differences" button which will display a list of records ( equal to rowcount returned by Table A query)
5. In order to see the difference click on "i" icon at the right end of alert bar which will toggle the field comparison. Clicking on "i" icon will display result as below
Note: if there is difference between field values then Label will be in "RED" color.
Update Set link: Utility to compare field values between two tables on Service Portal
Note:
Comment either in share or in this article if there is any feedback, This is just a POC version there might be some glitches.
Hope this helps.
- 3,629 Views