Script for distinct count in automated indiactor in peromance analytics
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
We have two tables: Division and Activity. The Division data is being used within the Activity table as a list-type field (List Collector).
To determine the number of divisions associated with each activity, we implemented the following approach:
- Created a Performance Analytics automated indicator
- Added a script to calculate the count of divisions selected in the list field
function count() {
var divsion_id = current.sys_id;
var activity = new GlideRecord("x_cenll_strategi_0_activity");
activity.addEncodedQuery("divisionLIKE" + divsion_id);
activity.query();
if (activity.next()) {
divsion_id;
}
}
count();
but script is not working
0 REPLIES 0