Is it possible to get the previous.value in a Metric Definition?

ron_tavares
ServiceNow Employee
ServiceNow Employee

I have been tasked with creating a Metric on the Incident table that creates a Metric Instance when the Priority *changes from* a P5. Unfortunately, the Metric Script does not recognize previous.priority.   Only current.priority.   This is ran on the server side, so I suppose I could do a Glide Query on that record to pull the priority from the DB record, but I am pretty sure it will just return the new value anyway.   I searched this on the community, but couldn't find a solution.   Other than adding a field on the Incident form with a Business Rule to capture the old priority whenever the Priority changes.   But I was hoping there was an easier way.

Thanks in advance,

.ron

1 ACCEPTED SOLUTION

Michael Fry1
Kilo Patron

Right, not through Metrics script as it only uses current, but you can't use a business rule to create the Metric and use previous in the BR. Here's an example of how to do that: Re: Is there a way to report on audits in a way that is efficient (or a way to report on user action...


View solution in original post

2 REPLIES 2

Michael Fry1
Kilo Patron

Right, not through Metrics script as it only uses current, but you can't use a business rule to create the Metric and use previous in the BR. Here's an example of how to do that: Re: Is there a way to report on audits in a way that is efficient (or a way to report on user action...


Hi Mike,


Thank you very much for posting your response and article.   This worked perfectly!


.ron