Best approach for Dynamic Filter/Visualization when Script Include processes large datasets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
32m ago
Hi Community,
I have a requirement to identify duplicate Hardware Model Library records and show the affected CMDB Hardware Product Models in a Visualization/Report.
Scenario:
- Hardware Model Library table: sn_hamp_hw_product_model
- CMDB table: cmdb_hardware_product_model
- Reference field: cmdb_hardware_product_model.normalized_model
- Duplicate criteria need to be checked separately:
- Name + Model Number
- Name + Manufacturer
- We need the sys_ids of the affected cmdb_hardware_product_model records for reporting/visualization.
I have a Script Include that correctly identifies the records when executed from Scripts - Background. However, the Hardware Model Library contains a large number of records, so the Script Include performs a large data scan and can take significant time.
The requirement is to use the result dynamically in a Visualization/Report Dynamic Filter.
My concern is that a Dynamic Filter executes synchronously, so running the complete duplicate-detection logic every time the visualization loads may not be practical for a large dataset.
Question:
What would be the recommended ServiceNow architecture for this scenario?
I am looking for an recommended approach for large datasets, rather than simply optimizing the query.
Any guidance on the recommended approach would be appreciated.
