RITM total duration calculation

GBS
Tera Contributor

I'm using the Before Insert and Update BR to calculate the RITM total duration for Closed Complete RITMs, but the scripts below work only for RITMs with approvals, not for those without.

 

GBS_0-1769658325953.png
GBS_1-1769658371775.png

The RITM, which has a duration of 55 seconds, has the approval on RITM, and 0seconds doesn't have any approval

GBS_2-1769658558319.png

 

 

7 REPLIES 7

@GBS 

it means the BR condition is not getting satisfied

Why not just have this condition

-> Before Update AND State Changes to 3

Also are you sure when RITM has approval the state of RITM gets changed to 3 so that BR will satisfy?

AnkurBawiskar_0-1769664688810.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Can you help me with the adjusted script and condition

@GBS 

I already shared it above

Might be when closed_at is updated the state is not 3 and hence your BR is not triggering

is that OOTB BR which is setting closed_at also setting state as 3?

Before Update

Condition: State Changes To 3 AND current.closed_at != ''

Script: same as earlier

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader