Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Interactive dashboard with Service operations workspace issue

imran rasheed
Tera Contributor

To add reports named - My Approvals

I am able to add the rest of the reports successfully by modifying the SowIncidentLandingPageUtils (i.e. UX Client Script Include). 

When I click on the View all button it renders correctly but when I click the blue or yellow colour on the tasks assigned to my team report it isn't rendering the list view correctly.

imranrasheed_0-1705564207813.png

 


SowIncidentLandingPageUtils:

function include({imports}) {
let serviceDeskLandingPageUtilsSNC = imports['sn_sow_inc.SowIncidentLandingPageUtilsSNC']();
class ServiceDeskLandingPageUtils extends serviceDeskLandingPageUtilsSNC {

static async getVisualizationConfig(helpers, mode) {
const evamDef = this.getEvamDef();
const visualizationConfig = [

{
"id": "my_approvals",
"tableName": "sysapproval_approver",
"tableDisplayValue": "My Approvals",
"myWorkQuery": "approverDYNAMIC90d1921e5f510100a9ad2572f2b477fe",
"myTeamQuery": "approverDYNAMIC54635e965f510100a9ad2572f2b4774c",
"listView": 'sow_landing_page',
"header": mode == 'your_work' ? await helpers.translate("Approvals assigned to you") : await helpers.translate("Approvals assigned to your team"),
"groupByField": "state",

"evamId": "e3a014759337711083a1b61efaba104e",
"updated_on": "^ORDERBYDESCsys_updated_on",
},

{
"id": "catalog_tasks",
"tableName": "sc_task",
"tableDisplayValue": "Catalog Task",
"myWorkQuery": "active=true^assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe",
"myTeamQuery": "active=true^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744",
"listView": 'sow_landing_page',
"header": mode == 'your_work' ? await helpers.translate("Catalog tasks assigned to you") : await helpers.translate("Catalog tasks assigned to your team"),
"groupByField": "state",
"evamId": evamDef["catalogTaskEvamDefinitionId"],
"updated_on": "^ORDERBYDESCsys_updated_on",
}

];
return visualizationConfig;
}

}
return ServiceDeskLandingPageUtils;
}

Evam definition:

imranrasheed_0-1705562334054.pngimranrasheed_1-1705562367869.png

 

 

imranrasheed_3-1705562448598.png

When I click on view all, it seems to work fine. But when I click on the dashboard charts, it doesn't reflect in the list view with the tickets.

1 ACCEPTED SOLUTION

Hi @imran rasheed 

 

I completely built it from scratch in My PDI. Find the updatesets attached, try to import them in a fresh PDI of version > Vancouver.

 

Please mark my answer helpful and accept as a solution if it helped 👍✔️

Thanks,
Anvesh

View solution in original post

4 REPLIES 4

imran rasheed
Tera Contributor

@AnveshKumar M Any inputs on this?

AnveshKumar M
Tera Sage
Tera Sage

Hi @imran rasheed 

 

Try this script, I just changed the myTeamQuery to this one,

"myTeamQuery": "approverDYNAMIC0f63961e5f510100a9ad2572f2b47745",

 

SowIncidentLandingPageUtils:

function include({imports}) {
let serviceDeskLandingPageUtilsSNC = imports['sn_sow_inc.SowIncidentLandingPageUtilsSNC']();
class ServiceDeskLandingPageUtils extends serviceDeskLandingPageUtilsSNC {

static async getVisualizationConfig(helpers, mode) {
const evamDef = this.getEvamDef();
const visualizationConfig = [

{
"id": "my_approvals",
"tableName": "sysapproval_approver",
"tableDisplayValue": "My Approvals",
"myWorkQuery": "approverDYNAMIC90d1921e5f510100a9ad2572f2b477fe",
"myTeamQuery": "approverDYNAMIC0f63961e5f510100a9ad2572f2b47745",
"listView": 'sow_landing_page',
"header": mode == 'your_work' ? await helpers.translate("Approvals assigned to you") : await helpers.translate("Approvals assigned to your team"),
"groupByField": "state",

"evamId": "e3a014759337711083a1b61efaba104e",
"updated_on": "^ORDERBYDESCsys_updated_on",
},

{
"id": "catalog_tasks",
"tableName": "sc_task",
"tableDisplayValue": "Catalog Task",
"myWorkQuery": "active=true^assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe",
"myTeamQuery": "active=true^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744",
"listView": 'sow_landing_page',
"header": mode == 'your_work' ? await helpers.translate("Catalog tasks assigned to you") : await helpers.translate("Catalog tasks assigned to your team"),
"groupByField": "state",
"evamId": evamDef["catalogTaskEvamDefinitionId"],
"updated_on": "^ORDERBYDESCsys_updated_on",
}

];
return visualizationConfig;
}

}
return ServiceDeskLandingPageUtils;
}

 

Please mark my answer helpful and accept as a solution if it helped 👍✔️

Thanks,
Anvesh

Hi Anvesh,

 

It still looks the same. When I click on the dashboard, it doesn't reflect on the list under. But when I click on view all, it does. Which particular part help with this interaction? Is it with this script?

Hi @imran rasheed 

 

I completely built it from scratch in My PDI. Find the updatesets attached, try to import them in a fresh PDI of version > Vancouver.

 

Please mark my answer helpful and accept as a solution if it helped 👍✔️

Thanks,
Anvesh