We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Analysis of the content of a CMDB table

ChristopheB7516
Tera Contributor

Hello,

I am looking for a report or a tool wich could produce the following report for any given table :

Quantity of records in the table

For each field in the table :
- Quantity of distinct values

- If the field has less than 11 distinct values, list of the values found for this field

 

Best regards
Christophe BERNARD

2 REPLIES 2

dimi_
Tera Expert

You can do it with a background script or in xplore. 

1-Total record count you can get easy with getRowCount().

2-Get all the fields of the table from dictionary. Loop through them and for each iteration use GlideAggregate and group the records by the field. 


CSA | CAD | DF | DISCO | ITIL4

Hi Dimitrios,
thanks for your answer.

Do you know of any ready to run solution for this question?
I have been developing this kind of tool several times with various technologies but I am new to ServiceNow