Export scores of formula indicator.

tsoct
Tera Guru

Hi all.

Is there any way I can export the score of formula indicator?

I am looking to create a scheduled job that sends the score of formula indicator via email.

 

Thanks!

1 ACCEPTED SOLUTION

Adam Stout
ServiceNow Employee
ServiceNow Employee

Score start and end give you the first and last date of the period (for daily, this is the same, for monthly, this is the first day of the month and the last).  You can then get the day of the week from this date decide to show it or NULL it out.

res = {{Number of open incidents}};
if(score_end.getDayOfWeekLocalTime() >= 6)
{
  res = null;
}
res;

find_real_file.png

View solution in original post

10 REPLIES 10

Adam Stout
ServiceNow Employee
ServiceNow Employee

I'm sure you could do this using the ScoreCard API.  You may also want to look at Schedule the export of an indicator to PDF.  Depending on your needs, simple Thresholds (which send notifications) may work as well (I have one that notifies me when the open incident count is a or more so I get it every day).

Although there are ways to do this, generally speaking, we discouraging exporting the data since you lose the real-time nature (since it is the value when the email was sent) and the security (as the email can be forwarded).  I would inquire about why the desired audience can't look at the scorecard in the mobile app or on a dashboard. 

Hi Adam,

Thanks for the reply. Will definitely consider the API.

The purpose i do this is to exclude weekend from the formula indicator. > extract the data and reload to a physical table. Then calculate the average.

Do you have any better idea to achieve this? (to exclude weekend from formula indicator)

Adam Stout
ServiceNow Employee
ServiceNow Employee

Take a look at this article:  https://community.servicenow.com/community?id=community_blog&sys_id=1f0d2ea5dbd0dbc01dcaf3231f961947

Formulas have access to score_start and score_end.  You can pull the day of the week from that and null out the results (if that is what you are looking for).

Thanks Adam. 

My formula indicators might be complicated as the final score was calculated from (automated indicator 1 * weighting 1) +( automated indicator 2 * weighting 2 )+ ( automated indicator 3 * weighting 3 ) etc....

Would you mind to guide me how can I apply the score_start and score_end to the formula indicator?

Thanks!