Vulnerable Item Age Calculation Based on State

rohitgotefode3
Tera Contributor

Hi Team,

 

I need to implement a logic where the Age field stops calculating time when the state changes to Deferred and resumes when the state changes back to any other value.

Has anyone implemented something similar? Would a Business Rule be the best approach, or should I consider a Scheduled Job? Any insights or sample scripts would be helpful.

 

Thanks in advance!

Let me know if you need more refinements! 😊

1 REPLY 1

Community Alums
Not applicable

Hi @rohitgotefode3 ,

The below link will help you to understand the current behavior :

Vulnerable item age calculation and display

Also, to answer your question , you can run a scheduled job to make the calculation happen.

And there is a function associated with the field that runs the below script: glidefunction:datediff(now(), last_opened)
You could see this defined here:
https://instance_name.service-now.com/nav_to.do?uri=sys_dictionary.do?sys_id=e80b839adbe054107f3c265...