The CreatorCon Call for Content is officially open! Get started here.

Alternate to using the "Target" option of a Formula Indicator ?

Rohit8
Tera Expert

Hello there,

I am currently building a widget with multiple indicators. I want to display the target line for one of those indicators. The Indicator Target option doesn't seem to be that flexible. It will appear as "Target" on the widget/chart, I didn't find any option to rename it to something closer to the Indicator it is referring to. It seems to have certain other limitations (can't change the line color, it appears as the last one on the chart). Also, I don't want to make that indicator as a primary one on the chart.

Is there an option to just create a sort of empty formula (or automated) indicator with only a static value like — 70 (the target) to show the same value for whatever time series I choose. Then I can just add it as another widget indicator to the dashboard with the options available to me for renaming it, changing the order or color etc.

Thank you.

1 ACCEPTED SOLUTION

Adam Stout
ServiceNow Employee
ServiceNow Employee

I forgot, formulas require a non-null indicator (even if you don't use it).   Add any indicator that has a score for that day (I often use # of open incidents),   then below that have the last line be:



70;


View solution in original post

8 REPLIES 8

Hello again,



So our Target% has now been revised (effective Dec '17) from 70% to 80% .



Is there a way to edit that existing formula indicator to keep that 70% line visible for historic data (till Nov '17) and start another line of 80% from Dec '17, without having to create another formula indicator, hence another widget indicator.



Currently my Formula field has:



{{Empty Automated Indicator for Target)}}


70



I did edit the job collection dates of the automated indicator above to only display data till Nov 30th, which it does. And then I created another Empty automated indicator with the date starting from Dec 1st. Then I tried with this (and few other combinations) in my formula field:



{{Empty Automated Indicator for Target)}}


70


{{Empty Automated Indicator for New Target)}}


80



But then it doesn't show any score at all in scorecard (and the dashboard). Any ideas about how can we tweak this to work ?



Thanks a lot.


Adam Stout
ServiceNow Employee
ServiceNow Employee

Formula indicators have access to score_end and score_start.



So you can do something like this:



new GlideDateTime("2017-12-01").compareTo(score_start);



I believe your formula would look something like this:



if(new GlideDateTime("2017-12-01").compareTo(score_start) == 1) // before December


{


  {{Empty Automated Indicator for Target}}


} else {


  {{Empty Automated Indicator for New Target)}}


}



w GlideDateTime("2017-12-01").compareTo(score_start);new GlideDateTime("2017-12-01").compareTo(score_start);


Thanks a lot for the prompt assistance, Adam.



Much appreciated.


Dennis R
Tera Guru

That's clever. I actually tried that at one point, and I ran into two issues:


  • It shows the indicator on the legend, which was kind of clunky, and
  • When I moved my cursor around the target line, it kept snapping to it and showing the static value (70), unless I carefully tried to make sure it was pointing at the data set line instead.


Your mileage may vary, though. By all means, give it a shot and see if you can tweak it to work for your needs.


--Dennis R