- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 03:43 AM
Hi Can you Help me on this one. Im trying to solve some computation with regards getting the value of the following fields but in the last part all i can see is NaN. is theres a way on how can i use it or how to apply it on the PA Formula.
I first tried it on the background script so that i can see the value once it runs.
Will share some of my background script code that i perform
var gr = new GlideRecord('incident');
gr.addQuery('number','INC0967969');
gr.query();
while (gr.next()){
//created date
var xy = gr.sys_created_on;
//resolved date
var xx = gr.resolved_at;
//updates value field
var xz = gr.sys_mod_count;
//computation for the created and resolved date
var zx = gs.dateDiff(xy, xx);
//trying to get the value from the value of zx and divide it to the value of updates value
var zy = zx / xz
gs.print(zy);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 06:07 PM
This item is already completed. I find a solution on this. I just created a Metric Definition and Validate the following in the Metric Instance. And aligned it to my PA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 03:50 AM
Are you collecting your mod count in your data collection? I believe there are already indicators providing the time a ticket is open, so you can just use that one to divide with your mod count, although I am absolutely unsure on the requirement that causes you to create it. How long a ticket is open, says nothing about the number of updates or vice versa. I can update a ticket 20 times within a minute and close it, or I can leave it open for months, without a single update. What is the outcome of your formula going to tell you?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 04:00 AM
when trying to the background script its undefined.
The following criteria that should i need to be is
Duration from created date to resolved date) / (number of updates on the ticket)
which is Created Value and Resolved Value / Updates Value. since im tracking form my Performance Analytics. If i breakdown my Indicators i have a value from the Created Value and Resolve Value which displays me about 42H average. and on the Updates Value is 5minutes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 06:07 PM
This item is already completed. I find a solution on this. I just created a Metric Definition and Validate the following in the Metric Instance. And aligned it to my PA