- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
In ServiceNow, I'm working on the below widgets:
At the moment, when I click on any of the 4 bottom widgets, the numbers are shown based on the field they are grouped by. However, when I click on any of the widgets, they open all of the records from that table. The widgets are based on a database view.
I was just wondering if anyone knows how I can update the widgets so that if a user clicks on any of them, they open the actual number of records reflected on the widget?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I've found the answer I'm looking for. I applied the following code for event tracker:
/**
* @Param {params} params
* @Param {api} params.api
* @Param {any} params.event
*/
function evaluateEvent({api, event}) {
var query = event.payload.params.query || "";
query += "^GROUPBYspm_u_parent";
return {
route: "list",
fields: {
listTitle: event.payload.title,
table: event.payload.params.table
},
params: {
listView: "Business_Application",
query: query
},
redirect: null,
passiveNavigation: null,
title: event.payload.title,
multiInstField: null,
targetRoute: null,
external: null,
navigationOptions: null
};
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
ahoy @matthew_hughes,
those are not widgets, but rather reports (data visualisation), no?
So you are saying that if you click on "Key Software model: 35" it redirects you to the table and display all the records rather than the 35?
✂-----Cutting-out-the---✦AI-noise✦---All-replies-written-and-vouched-for-by-GlideFather---
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I've found the answer I'm looking for. I applied the following code for event tracker:
/**
* @Param {params} params
* @Param {api} params.api
* @Param {any} params.event
*/
function evaluateEvent({api, event}) {
var query = event.payload.params.query || "";
query += "^GROUPBYspm_u_parent";
return {
route: "list",
fields: {
listTitle: event.payload.title,
table: event.payload.params.table
},
params: {
listView: "Business_Application",
query: query
},
redirect: null,
passiveNavigation: null,
title: event.payload.title,
multiInstField: null,
targetRoute: null,
external: null,
navigationOptions: null
};
}