The CreatorCon Call for Content is officially open! Get started here.

Performance Analytics Groups select Item

Joshua Comeau
Kilo Sage

Looking to know where this would be configured and edited;

 

So that the filter selections that I would want can be changed so that the default would be "one of my groups" dependent on-load:

 

JoshuaComeau_0-1678285654923.png

 

Example: Just as a breakdown would be:

 

JoshuaComeau_1-1678285680355.png

 

 

1 ACCEPTED SOLUTION

Carmen Galante
Kilo Guru

You will need to create a breakdown source:

Facts Table: sys_user_group
Field: Sys ID

CarmenGalante_4-1678291267172.png

 

 

 

 

Conditions:

Active is true

SYS ID is javascript: gs.getUser().getMyGroups();

and optionally

SYS ID is javascript: sn_coaching.getGroupsManagedByUser(gs.getUserID());

this line gives groups you manage

 

From there make a breakdown, and once you create that map the breakdown to your facts tables.

CarmenGalante_1-1678291169833.png

 

 

CarmenGalante_3-1678291206445.png

 

You don't have to add all the mappings shown here, these are just replicated from the out of the box breakdown for assignment groups.

 

Once this is done you can choose this in the dashboard properties just as you added the other filter.

 

CarmenGalante_5-1678291334611.png

 

View solution in original post

3 REPLIES 3

Carmen Galante
Kilo Guru

You will need to create a breakdown source:

Facts Table: sys_user_group
Field: Sys ID

CarmenGalante_4-1678291267172.png

 

 

 

 

Conditions:

Active is true

SYS ID is javascript: gs.getUser().getMyGroups();

and optionally

SYS ID is javascript: sn_coaching.getGroupsManagedByUser(gs.getUserID());

this line gives groups you manage

 

From there make a breakdown, and once you create that map the breakdown to your facts tables.

CarmenGalante_1-1678291169833.png

 

 

CarmenGalante_3-1678291206445.png

 

You don't have to add all the mappings shown here, these are just replicated from the out of the box breakdown for assignment groups.

 

Once this is done you can choose this in the dashboard properties just as you added the other filter.

 

CarmenGalante_5-1678291334611.png

 

Worked like a charm thanks

Sankar N
Kilo Guru

In ServiceNow Performance Analytics, the groups available for selection in a "Groups" filter in a breakdown, widget, or report are determined by the "Performance Analytics Groups" record for each metric. You can edit this record to configure which groups are available in the filter and set a default selection.

Here are the steps to configure the "Performance Analytics Groups" record for a metric:

  1. Navigate to the "Performance Analytics Metric" list by typing "Metrics" in the navigation bar or using the application navigator.
  2. Open the metric record for which you want to configure the groups.
  3. In the "Related Links" section of the metric record, click on "Performance Analytics Groups".
  4. In the "Performance Analytics Groups" list, find the record for the group you want to edit.
  5. Click on the record to open it.
  6. In the record, you can edit the "Name" field to change the name of the group.
  7. To configure which users or groups are included in the group, you can add or remove records from the "Performance Analytics Group Member" related list.
  8. To set a default selection for the group in the filter, you can edit the "Default Group" field and select the group you want as the default.

To set a default filter selection for a breakdown, widget, or report, you can configure the filter conditions in the widget or report configuration. Here are the steps to configure a filter to default to "one of my groups":

  1. Open the widget or report configuration.
  2. In the "Data" tab, find the "Filter" section.
  3. Click on the "Edit" button to edit the filter.
  4. In the "Filter" dialog, add a new condition for the "Groups" field.
  5. In the "Operator" dropdown, select "is one of".
  6. In the "Value" field, enter the script "javascript:getMyGroups();".
  7. Save the filter configuration.

This script will dynamically retrieve the groups of the currently logged-in user and set them as the default selection for the "Groups" filter.