Risk Workspace Risk heatmap dropdown items order configuration

Miikka_M
Tera Guru

Workspace: Risk Workspace
Variant: Operational risk manager homepage

Hi all, It's me - the every day workspace guy here. 

Pretty simple thing. Just trying to change order of options in dropdown component related to heatmap component. So that by defaut "By residual" option would be selected and show first when user opens workspace.

2024-02-06 15_32_17-2024-02-06 15_20_56-Settings.png ‎- Valokuvat.png



From ui builder by configuring Dropdown 2 named component list item script, I managed to change order of these options in dropdown menu by changing var items in row 7 the other way around what was in oob, but still "By inherent" is chosen by default. 

2024-02-06 15_25_50-Settings.png

As we can see here, order changed but "By inherent" is selected by default.

2024-02-06 15_26_23-Risk Workspace _ ServiceNow.png



Question:

Do I need to change something to that dropdown menu component script or what should I do so that "By residual" would be default chosen in risk heatmap dropdown menu in risk workspace, Operational risk manager homepage variant?

Best, 
Miikka

1 ACCEPTED SOLUTION

Miikka_M
Tera Guru

Found solution to this. I'll write it here so others can benefit from my knowledge. 

Configure order of dropdown menu items: 

2024-02-06 15_25_50-Settings.png

1. Choose dropdown component from Ui builder

2. Choose config on the right menu 

3. Open list item script
4. Change order in var items the way you want them to be seen 

In my case i changed "id":"inherent","label":"By inherent" and "id":"residual","label":"By residual" other way around.

function evaluateProperty({api, helpers}) {
var items = [{"id":"residual","label":"By residual"},{"id":"inherent","label":"By inherent"}];
if(api.data.plugins_installed.output && api.data.plugins_installed.output.isAdvancedRiskInstalled == true && api.data.plugins_installed.output.isAdvancedRiskEnabled == true){
items.push({"id":"target","label":"By target"});
}
return items;
}

 
Configure what heatmap is selected as default in dropdown menu:

2024-02-06 16_58_40-.png

1. Select "client state" from bottom left from ui builder 
2. Search for "heatmapType" 

3. Change Intial value to heatmap value wanted (you can find this value in list items script described before)

Thumbs up if I helped you!

Have a good one.

-Miikka

View solution in original post

2 REPLIES 2

Miikka_M
Tera Guru

Found solution to this. I'll write it here so others can benefit from my knowledge. 

Configure order of dropdown menu items: 

2024-02-06 15_25_50-Settings.png

1. Choose dropdown component from Ui builder

2. Choose config on the right menu 

3. Open list item script
4. Change order in var items the way you want them to be seen 

In my case i changed "id":"inherent","label":"By inherent" and "id":"residual","label":"By residual" other way around.

function evaluateProperty({api, helpers}) {
var items = [{"id":"residual","label":"By residual"},{"id":"inherent","label":"By inherent"}];
if(api.data.plugins_installed.output && api.data.plugins_installed.output.isAdvancedRiskInstalled == true && api.data.plugins_installed.output.isAdvancedRiskEnabled == true){
items.push({"id":"target","label":"By target"});
}
return items;
}

 
Configure what heatmap is selected as default in dropdown menu:

2024-02-06 16_58_40-.png

1. Select "client state" from bottom left from ui builder 
2. Search for "heatmapType" 

3. Change Intial value to heatmap value wanted (you can find this value in list items script described before)

Thumbs up if I helped you!

Have a good one.

-Miikka

Hey @Miikka_M,

I m using Heatmap visualization and in that created a metric on Case Table where the metric is like Created and Updated vs HR Service.

But When I get the count in Heatmap its correct on Visual, but as soon as Drilling down i m getting the wrong count i.e. list of cases

attaching the snapshot of it. 

SagarBhadke_0-1721908049753.png

Suppose i click on the "99" then its giving me the o/p in list as 

SagarBhadke_1-1721908120834.png

 

Please help me with this, How should i solve this ? 

Its real-time scenario.