Critical Incidents Map

WESAdmin
Kilo Contributor

Has anyone utilised the Critical Incidents Map, most notably to highlight active "Critical" Incidents only?

 

I like the script that displays Marker Labels, last script shown here, Using Map Pages - ServiceNow Wiki, but this shows all Incidents, there's no query on the Priority of the active incident.   I'm no scripter so was wondering if anyone has utilized this particular script to do as is but also query the priority and only display Critical?

9 REPLIES 9

If I used the advanced script (same one mentioned above, the one with Marker Labels) exactly as it is written in the WIKI, it works, but as soon as I add the line to check the priority it kills the script altogether and wont work at all.


Bhavesh Jain1
Giga Guru

Correct me if I am misunderstood.


The script in the link shared by you says :



var gr = new GlideRecord("incident");


gr.addQuery('priority', '1');


gr.addActiveQuery();


gr.query();



Line 2 gets the   priority 1 tickets and line 3 queries for active incidents. Do you see anything missing here?


I believe that is what that script is supposed to look for but it doesnt seem to like it


It will work in Eureka patch 10 and Fuji release only. This is known issue/error.


If that doesn't please try the below code:



var cond_query = 'active=true^priority=1';


var gr = new GlideRecord("incident");


gr.addQuery(cond_query);


gr.query();


while (gr.next()) {


******


}