Placeholder

Customer Forum

Changing the Map Pin Colour and Size based on a Person’s Job Title

Sam (Workbooks Online) Posted: 2017-11-22 12:33

This Forum Post will show you how to change the colour and size of the Map Pins based on a Person’s Job Title. The same concept could also be applied to show you the Industry of an Organisation, or the Status of a Sales Lead. 

mappins.png

Step One: Create a Report based on People

Navigate to Start > New > Report > Build Pre-populated Report > People. You will also need to add the Column “Map Position” to the details tab.


Step Two: Create a Calculated Column

Now create a calculated column entitled “Colour Coding” using the following CASE Statement:

CASE 
WHEN person_job_role = 'Director' THEN '-wb-map-pin-color:#00ff00; -wb-map-pin-scale:3.0;'
WHEN person_job_role = 'Manager' THEN '-wb-map-pin-color:#ff0000;-wb-map-pin-scale:1;'
ELSE '-wb-map-pin-color:#0000ff;-wb-map-pin-scale:0.5;'
END

This will output a new column that looks like the below:

pinscss.png


Step Three: Apply the CSS Styling to the Map Position Column

Now you will need to add the Colour Coding column to the Map Position as CSS Styling. To do this open the Map Position Column and click on the Style tab. Under Cell conditional styles select “Calculated conditional styling” and in the Styling Column select Colour Coding:

pinsapplycss.png

Step Four: Save and Run the Report

Now Save & Run the Report, this will generate the Report in a standard grid view, however you should notice that the Map position pins have already changed colour. If you then change the view to View as Map or View as Map & Grid you will get something similar to below.

mappins.png

 

Step Five: Share this Report with those that will be using it.

By default, the report will only be shared with the Users that are a member of the System User Group. To share with a wider audience, use the padlock icon in the top right corner of the report editor. You can find more information at Sharing Reports page.