Report on the absence of data? (noncompliance)

SK74
Kilo Contributor

A couple examples of noncompliance: 

- Who hasn't logged any timecards this week?

- Who logged less than 40 hours in timecadrs this week, including those that didn't log any time at all? 

- Which projects do not have status reports this week?

Hopefully these examples illustrate my challenge--I need to report on records not existing.  For my first question  Im figuring I start with the User table for rows and then week number would be column and I could see total hours (or null, or zero) in each cell (see example)?  Welcome to other layout ideas to get the desired outcome.  I can't start with Time cards because C (in example below) woudln't even show up in a report based on timecards because s/he has none.

NameWeek of 28 April 2019 Week of 5 May 2019
A4040
B4037
C--

  So hopeful you can help! I went to multiple reporting sessions and the Genius Bar last week at Knowledge and no one could solve my question!

1 ACCEPTED SOLUTION

Adam Stout
ServiceNow Employee
ServiceNow Employee

The first and third questions are straight forward with a Related List Condition on sys_user (RLC on time cards) and on pm_project (RLC on status report).  See this article for more example of that: https://community.servicenow.com/community?id=community_blog&sys_id=bd0eaa2ddbd0dbc01dcaf3231f96199e

As for the missing hours, I think there is some functionality to do this in Madrid.  If you aren't there yet, you may need a job that summarizes hours submitted/approved per user per week then report on that.  Not a simple report, but still possible without too much work.

View solution in original post

8 REPLIES 8

Not exactly.  Finding a user with 3 time cards totaling 35 hours (less than 40 hours for the week) is a very different problem to solve.  RLCs only use counts (not SUM) so you need a different approach.

I wouldn't look at time cards for this as they only show time for 1 specific activity.  Looking at the time sheet record would give you the total.  But if the report only shows data from the main table, I'm not sure of the benefit in this specific use case.

SK74
Kilo Contributor

Agree with you in that there are 2 different questions with 2 different resolutions:

1.  0 timecards I solved with the RLC and set "Time Card ->User Equal to 0"  This shows me only the guilty parties that didn't submit any time.

2. <40 hours I've done with the Timesheet and total hours field. Because we have timesheets automatically created each week (intentionally), and because I can't RLC only uses counts (as Adam said), I can't use RLC.  So, the same people guilty people in #1 (having 0 timecards) also show up in #2 (<40h/timesheet).

Adam Stout
ServiceNow Employee
ServiceNow Employee

If you are auto-generating timesheets weekly, then targeting where submitted time < 40 makes a lot of sense.  You need some process that aggregates the submitted time so you can just pull the records.

It seems like in the worst case, you would just need a report on time sheets where time < 40 and a separate report identifying users that should have a time sheet that do not for the week.