Post

3 followers Follow
0
Avatar

GetSumOfTimesheetReportHoursForGivenPeriod() to include filter on Overtime hours

Is it possible to use the GetSumOfTimesheetReportHoursForGivenPeriod() function to also filter on Timesheets that are not overtime and only overtime?

 

Darren Answered

Please sign in to leave a comment.

1 comment

0
Avatar

Hello Chris,

It is not possible to make this function filter by any Timesheet fields.

As I workaround, may I suggest that you create two Custom Fields on User entity to store these sums - one for overtime hours and one for non-overtime hours.

The fields would have to be of Duration type >> Field value is based on a formula of: Relations Summary >> Summary Type: Sum >> Relation: $ReportedTimesheets.Duration >> Filter Related Items:

Use this one for non-overtime hours: TargetObject.Overtime = False && TargetObject.ReportedDate > Date(2017, 4, 1) && TargetObject.ReportedDate < Date(2017, 5, 1)

Use this one for overtime hours: TargetObject.Overtime = True && TargetObject.ReportedDate > Date(2017, 4, 1) && TargetObject.ReportedDate < Date(2017, 5, 1)

Dates can be changed into something else.

Please let me know if this answers your question.

 

Roland Pumputis 0 votes
Comment actions Permalink