Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

RITM calendar_duration shows 0 Seconds and Function Field fails despite visible Closed dates

gustavoreye
Kilo Contributor

Hi everyone,

I am trying to build a dashboard in Platform Analytics to filter Requested Items (RITM) that took between 1 and 2 days to close. However, I am facing an issue where the duration fields are empty or zero, preventing me from filtering the data.

I need create a simple indicator/report for RITMs where the duration is between 1-2 days. But for all my closed RITMs, the OOB field calendar_duration shows "0 Seconds". The business_duration field is also empty.

What I have tried so far:

  1. Visual Validation: In the List View, I can see dates populated in both the Opened and Closed columns. The State is "Closed Complete" (Active = false).

  2. Dictionary Check: I verified the dictionary entries for opened_at and closed_at. Both exist and are type glide_date_time.

  3. Function Field Attempt: I tried to create a new Function Field in the dictionary to calculate the value on the fly without using scripts.

    • Definition: glide_function:datediff(opened_at, closed_at)

    • Result: It still returns "0 Seconds" for all rows.

  4. Alternative Function Field: I suspected closed_at might be null in the backend, so I tried creating a Function Field using glide_function:datediff(opened_at, sys_updated_on). This also resulted in "0 Seconds" or did not calculate as expected.

0 REPLIES 0