How to show only Top 25 Host with highest Critical vulnerability

Talari Balateja
Tera Expert

Hi Developers,

Greetings of the day!!😊

 

I'm not able to show only Top 25 Host with highest Critical vulnerability (VIT) in report. For the reference I attached a Image. Can anyone get me out of this issue.

 

 

Thanks in Advance,

Bala.

1 REPLY 1

Ahmmed Ali
Mega Sage

Hello @Talari Balateja 

 

Not sure if there is any other easy way, but one solution would be to create a client callable script include. In the script include, query VULs table using GlideRecord with orderByDesc on Criticality and use setLimit() to set 25 limit. Then add all the resulting sys_ids into an Array and return string version of the Array. Now you can call this script include in your report as sys_id IS ONE OF your_script_include.

 

For reference: https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0832051 

 

Thank you,

Ali

 

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali