CIO Dashboard - Sorting Metrics

Chio
Giga Guru

When adding indicators in the sn_ciodashboard_cio_dashboard_metrics_config, I've encountered that the metrics cannot be sorted (the way of order it should be displayed) even if Order values are being supplied. 

 

The way to fix this is to add a Sort code in getMetricsOfCIODashboard in the Data Broker Server Script

 

find this line of code and insert the line as mentioned

 

while (ciodVerticalGr.next()) {
        var cioGr = new GlideRecord('sn_ciodashboard_cio_dashboard_metrics_config');
        cioGr.addQuery('tab', tabID);
        cioGr.addQuery('vertical', ciodVerticalGr.getValue('vertical'));
		cioGr.orderBy('order'); //<--- add this code
        cioGr.query();
        var headlineMetrics = [];
        var supportingMetrics = [];

 

This should fix the Order of indicators being displayed based on what you set on the Order field

2 REPLIES 2

BethanyMcCool
Tera Contributor

@Chio , could you share where this data broker server script is located? Thanks!

Hi, I found the table :"sys_ux_data_broker_transform".

mqt_0-1756436836572.png