Kingston : Map report is populating only one city per state, and may populate a wrong city when the request results contains only one city

kevindelorme
Kilo Expert

Hi,

I am knew to ServiceNow, I began last week. I used the ServiceNow Documentation in order to set some maps reports in a Kingston ServiceNow instance. For instance, I would like to design some reports showing open incidents by caller location.

My maps are using GeoJSON from https://code.highcharts.com/mapdata/ for both Canada and United States of America.

I created a 3 levels map source as above (the 3 levels were automatically created by ServiceNow) :

find_real_file.png

 

find_real_file.png

find_real_file.png

find_real_file.png

When I am trying to populate a report for Canada, the map contains only one city per state but it should not as we have a lot of locations per state, and the Caller.Location.* fields are well set and the used dataset contains multiple records of incidents from whose Callers have several locations (and not only one city). I may rephrase : a caller have only one location, but we have callers from several locations.

find_real_file.png

In the screen capture above, we should see Montreal, Toronto, Vancouver and Ottawa, but this is not the case. And there is also an orphan dot without any city label. I guess this point will be resolved when I'll be able to access the HI workaround for KB0538622.

 

But today I discovered another problem : sometimes when I decide to show the report for only one city, the displayed city is wrong :

find_real_file.png

This is a map of Florida for the same request, and there is no data displayed but 32 records do exist for the request :

find_real_file.png

 

And the Caller.Location for the tow captures above is :

find_real_file.png

 

The Latitude and Longitude fields are automatically populated, and after some checks they are well populated.

I already saw existing related topics, such as :

But unfortunately as I do not own an HI account, I cannot access the workaround for the KB0538622, that should hopefully resolve the fact that only one city per state is displayed.

I would like to know if anybody has an idea of what is happening...

Regards,

Kevin Delorme

 

 

 

1 ACCEPTED SOLUTION

Hi everyone,

I finally managed to get what I was looking for by editing the OOTB Incidents by caller Map Source as below :

 Level 1 (unchanged) :

find_real_file.png

 

Level 2 (unchanged) :

find_real_file.png

 

Level 3 (edited) :

find_real_file.png

 

Level 4 (created) :

find_real_file.png

 

I can now display the map reports as below, both on my developer instance and on the two instances we are working with :

find_real_file.png

find_real_file.png

find_real_file.png

 

I really do not know if this is the right way to configure the map reports, but adding a 4th level resolved the fact the incidents where aggregated on one city per state.

 

Regards,

Kévin Delorme  

 

 

 

View solution in original post

4 REPLIES 4

Adam Stout
ServiceNow Employee
ServiceNow Employee

Generally, I see issues with maps resulting from the strings for countries and states not matching the mapping (and not being consistent).  Did you use the UI action to build the hierarchy records or did you do it yourself?  When building based on Location (cmn_location), it should be pretty standard and UI action should do it.  When you build maps from a non-standard table, it does get more challenging to configure.

Do any of the OOTB reports work correctly for you?

Hi Adam,

 

Thank you for taking the time to read my question.

You were right about the mapping. I forgotten to create the Regions and States mapping for Canada. That resolved half of my problem because I can now sort incidents by states/provinces on the second level.

I am using the OOTB map source Incidents by caller location as I won't go on a more detailled view than displaying dots for the cities inside a state/province.

Unfortunatelly, the last level of the map source Incidents by Caller location, using latitude and longitude, still seems not to work as intended, both on the instance we are working with and on a fresh developper instance from the developper ServiceNow website.

On these two instances, I can automatically and properly get latitude and longitude for locations, but when I try to display all the cities concerned with incidents on a state/province map (and also on a country map), I still get only one dot by state/province and some displayed cities should not be displayed. The best example I can give is directly taken from the fresh developper instance I am using. I did not add any data to this instace, I am playing with the incidents that were on the instance on start :

 

There are incidents in North Carolina.

find_real_file.png

According to the map, the Caller Location should be in Raleigh. But when I go to see them, the employee location is not in the Raleigh city (but it's still in North Carolina) :

find_real_file.png

 

find_real_file.png

 

find_real_file.png

 

find_real_file.png

Regards,

Kevin Delorme

 

kevindelorme
Kilo Expert

Hi,

I finally decided to reset and wipe my developer instance, then I asked for the demo data deletion. At this point I would like to mention that the demo data clearing is not perfect : some locations where still present, some warehouses also (the warehouse were linked to the undeleted locations). Please remember I am using a Kingston instance, that should be important. After that I edited the OOTB "Incident by caller location" Map source in order to replace Caller Location Name with Caller Location City on the 3rd level, then I created the Region and state mappings for Canada, as below (and I also edited the map of Newfoundland and Labrador in order to replace the hc-key, which is wrong, from ca-nf to ca-nl) : 

find_real_file.png

After that I created locations, using this hierarchy : World/North America/Canada/Province/City/Locations for a city. I only created one city per province and only one location per city (this is important). The captures below will show you the logic I used to populate the fields, from the World to the specific location. I will only show it for a province, but I did the same routine for every city hall of the province's capitals :

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

find_real_file.png

NOTE : For the two lasts levels ("the city level" and the "specific location in a city level"), I manually set latitude and longitude as I did not link any Google Key to the instance this time.

After that I created 13 users, one user per last level location : 

find_real_file.png

And then I created one incident per user in order to create a new map report :

find_real_file.png

The map report  was created using the Incident by caller location Map Source (previously modified as noted above), and I get the data well displayed on every level (great !) :

find_real_file.png

find_real_file.png

find_real_file.png

 

But I then decided to add another city for the Québec province :

find_real_file.png

And when I created a child location for the Montréal city location, the displayed data for the Québec province changed as below regardless the fact there is nor user (so caller) nor incident linked with the city of Montréal (the incident for the Québec province is for a location of the Québec City) :

find_real_file.png

find_real_file.png

If I add another city, for instance Alma, and her City Hall as a child for the last level of location hierarchy, Alma will be displayed :

find_real_file.png

find_real_file.png

 

At this point, I cannot display several cities per state/province as ServiceNow appears to display the first city point in alphabetical order, for the corresponding state/province, whether incidents are related to it or not.

Is that normal, am I missing anything ? This is the same behaviour regardless of the country or province/state (for Canada or USA).

Thanks for reading.

Regards,

Kévin Delorme

 

 

 

 

Hi everyone,

I finally managed to get what I was looking for by editing the OOTB Incidents by caller Map Source as below :

 Level 1 (unchanged) :

find_real_file.png

 

Level 2 (unchanged) :

find_real_file.png

 

Level 3 (edited) :

find_real_file.png

 

Level 4 (created) :

find_real_file.png

 

I can now display the map reports as below, both on my developer instance and on the two instances we are working with :

find_real_file.png

find_real_file.png

find_real_file.png

 

I really do not know if this is the right way to configure the map reports, but adding a 4th level resolved the fact the incidents where aggregated on one city per state.

 

Regards,

Kévin Delorme