Jump to content

Deep dive: Timesheets: Difference between revisions

From Resco's Wiki
m remove <dl><dd> wrapping around video embeds. This breaks the video player.
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Wikipedia|Timesheet}} {{WIP}}
{{Wikipedia|Timesheet}} {{Deep TOC}}
Timesheets are a method for tracking the amount of a worker's time spent on each job. The default Resco projects don't include timesheets out-of-the-box. This article describes a simple way of adding timesheets to your organization. It assumes a good working knowledge of Resco and Dynamics ecosystem as well as a certain level of autonomy in designing mobile projects. The main focus is to describe several user experience improvements in more detail, beyond the rudimentary forms and views.
Timesheets are a method for tracking the amount of a worker's time spent on each job. The default Resco projects don't include timesheets out-of-the-box. This article describes a simple way of adding timesheets to your organization. It assumes a good working knowledge of Resco and Dynamics ecosystem as well as a certain level of autonomy in designing mobile projects. The main focus is to describe several user experience improvements in more detail, beyond the rudimentary forms and views.


Line 5: Line 5:


You have several options for how to use this and related resources.
You have several options for how to use this and related resources.
* The [TBD blog] introduces the business context and describes how the video is organized.
 
* The [https://www.youtube.com/watch?v=Y0c2zMgvt-k video] walks you through the usage of timesheets in the back office and the mobile app. Later it also describes the Woodford customization highlights.
{{Badge|Blog}} The [https://www.resco.net/blog/use-resco-and-ms-dynamics-to-configure-timesheets/  blog] introduces the business context and describes how the video is organized.  
* This wiki article summarizes the Woodford configuration steps from the video. They should be easily transferable to other projects and use cases.
 
{{Badge|Webinar|YouTube}} The [https://www.youtube.com/watch?v=Y0c2zMgvt-k video] walks you through the usage of timesheets in the back office and the mobile app. Later it also describes the Woodford customization highlights.  
 
{{Badge|Wiki}} This wiki article summarizes the Woodford configuration steps from the video. They should be easily transferable to other projects and use cases.


== About this solution ==
== About this solution ==
Line 60: Line 63:
#* One for canceled
#* One for canceled
# Use the '''Row''' selector on the '''Properties''' pane to switch between rows. Use an appropriately colored image for each row.
# Use the '''Row''' selector on the '''Properties''' pane to switch between rows. Use an appropriately colored image for each row.
# Click '''[[Row Script]]''' and enter a simple rule that selects the right row depending on the status reason of the record.<br>[[File:Row script rule timesheet entry.png|600px]]
# Click '''[[Row Script]]''' and enter a simple rule that selects the right row depending on the status reason of the record.<br>[[File:Row script rule timesheet entry.png|alt=Row script rule timesheet entry example|600px]]


Demo:
Demo:


: {{#ev:youtube|https://www.youtube.com/watch?v=Y0c2zMgvt-k|||||start=1165}}
{{#ev:youtube|https://www.youtube.com/watch?v=Y0c2zMgvt-k|||||start=1165}}


=== All day button ===
=== All day button ===
Line 76: Line 79:
# Click '''Add Button''' to the button to the form.  
# Click '''Add Button''' to the button to the form.  
# On the '''Properties''' pane, as '''Click Text''', enter "All day".
# On the '''Properties''' pane, as '''Click Text''', enter "All day".
# Click '''Button Click''' and add the following rule:<br>[[File:Allday button rule timesheet entry.png|600px]]
# Click '''Button Click''' and add the following rule:<br>[[File:Allday button rule timesheet entry.png|alt=Allday button rule timesheet entry example|600px]]


Demo:
Demo:


TBD_EMBED_VIDEO
{{#ev:youtube|https://www.youtube.com/watch?v=Y0c2zMgvt-k|||||start=1283}}


=== Clone timesheet entries ===
=== Clone timesheet entries ===
Line 92: Line 95:
# Click '''Buttons''', then click '''New Command''' to create a new custom command.
# Click '''Buttons''', then click '''New Command''' to create a new custom command.
# Enter '''Name''' (internal button name) and '''Label''' (what is displayed in the app), then save and close the Row Buttons screen.
# Enter '''Name''' (internal button name) and '''Label''' (what is displayed in the app), then save and close the Row Buttons screen.
# Click '''Button Click''' and enter the following rule:<br>[[File:Timesheet clone button rule.png|600px]]
# Click '''Button Click''' and enter the following rule:<br>[[File:Timesheet clone button rule.png|alt=Timesheet clone button rule example|600px]]


Demo:
Demo:


TBD_EMBED_VIDEO
{{#ev:youtube|https://www.youtube.com/watch?v=Y0c2zMgvt-k|||||start=1398}}


=== View timesheet entries in the calendar ===
=== View timesheet entries in the calendar ===
Line 109: Line 112:
# Create or edit a calendar.
# Create or edit a calendar.
# On the '''Views''' tab, click '''Add Entity''' and select Timesheet Entry.
# On the '''Views''' tab, click '''Add Entity''' and select Timesheet Entry.
# On the '''Rules''' tab, select the Timesheet Entry entity and click '''Edit Rule''':<br>[[File:Timesheet entry calendar rule.png|600px]]
# On the '''Rules''' tab, select the Timesheet Entry entity and click '''Edit Rule''':<br>[[File:Timesheet entry calendar rule.png|alt=Timesheet entry calendar rule example|600px]]


Demo:
Demo:


TBD_EMBED_VIDEO
{{#ev:youtube|https://www.youtube.com/watch?v=Y0c2zMgvt-k|||||start=1540}}


=== Timesheet submit confirmation ===
=== Timesheet submit confirmation ===
Line 123: Line 126:
# Click '''Show UI''' to display the list of views, forms, and charts for this entity.
# Click '''Show UI''' to display the list of views, forms, and charts for this entity.
# Edit the default form.
# Edit the default form.
# Click '''On Execute''' and enter the following rule:<br>[[File:Timesheet message box rule.png|600px]]
# Click '''On Execute''' and enter the following rule:<br>[[File:Timesheet message box rule.png|alt=Timesheet message box rule example|600px]]


Demo:
Demo:


TBD_EMBED_VIDEO
{{#ev:youtube|https://www.youtube.com/watch?v=Y0c2zMgvt-k|||||start=1653}}


=== Aggregate values ===
=== Aggregate values ===


Goal: Calculate weekly aggregates
Goal: Calculate weekly aggregates
<!--
 
Solution:  
Solution:  
# Edit the app project in Woodford and select the '''Timesheet''' entity from the '''Project''' menu.
# Edit the app project in Woodford and select the '''Timesheet''' entity from the '''Project''' menu.
# Click '''Show UI''' to display the list of views, forms, and charts for this entity.
# Click '''Show UI''' to display the list of views, forms, and charts for this entity.
# Edit the default form.
# Edit the default form. This form should include an associated list of timesheet entries.
 
# Select the associated list and click '''Properties'''. Make sure that '''Trigger OnChange event''' is enabled for this list, then close the properties.
 
# Click '''On Change''' and enter the following rule:<br>[[File:Timesheet calculate aggregates.png|alt=Timesheet calculate aggregates example|600px]]
In Resco it is also possible to calculate the aggregate values of the specific fields.
# This is the FetchXML filter defined in the second line of the rule:<br>[[File:Timesheet filter.png|alt=Timesheet calculate aggregates example:Timesheet filter]]
In Dynamics this functionality is called the rollup fields.
And for example, on the timesheet form, there's the results section, which consists of three fields - total hours, total overtime hours, and total billable hours.
The values of these fields are automatically calculated in the background using the rules based on the values from the associated timesheet entries, listed here in this entries section.  
So let's see how the so-called rollup fields are defined in Woodford.
Open the Inspections mobile project again and find ‘Timesheet’ entity in the left menu.
Here it is, and let's open the form called default.
Now the basic idea is, that if there's a new timesheet entry, then some specific ‘on change’ rule should be executed.
So before we go to the ‘on change’ rule, let's make sure that this associated tab is correctly defined.
Hit the properties button and go to the properties tab.
The check box ‘Trigger on change event’ has to be checked.
As soon as its checked - any change in the associated data or associated timesheet entries, will trigger the on change event.
So let's see how the ‘on change’ rule is defined.
Let me click on the ‘on change’ button, this is what it looks like.
First, we need to make sure that we check whether there is any change in the associate app.
So if there is any Child record, timesheet entry record, or change record.
If yes, then the next step is to do the calculation.  
So that's why there is a ‘load aggregate’ function used here.
So we want to do the calculation on the child record, we want to set the specific records from these entities, so we have to define FetchXML filter.
It's very simple - we have to select all the timesheet entries that are associated with this specific timesheet and also the status reason is not ‘canceled’. So it's either opened or approved.
We have the correct records from the timesheet entry entity, and then we need to select the corresponding field from the list.
In this case, it's scheduled duration minutes. And lastly, we have to select the correct aggregate function, in this case, I will select sum function.
Because this calculation or roll up calculation is doing the calculation in minutes, in the next step we have to convert this number into hours.
So let's divide it by 60 and that's it.  
This is how the simple calculation, the load, aggregate, or roll up field calculation can be done using the rules in the Woodford customization tool.


-->
Demo:
Demo:


TBD_EMBED_VIDEO
{{#ev:youtube|https://www.youtube.com/watch?v=Y0c2zMgvt-k|||||start=1805}}

Latest revision as of 13:38, 19 December 2025

Wikipedia logo
Wikipedia has an article on a similar subject:

Timesheets are a method for tracking the amount of a worker's time spent on each job. The default Resco projects don't include timesheets out-of-the-box. This article describes a simple way of adding timesheets to your organization. It assumes a good working knowledge of Resco and Dynamics ecosystem as well as a certain level of autonomy in designing mobile projects. The main focus is to describe several user experience improvements in more detail, beyond the rudimentary forms and views.

How to use this resource

You have several options for how to use this and related resources.

Blog The blog introduces the business context and describes how the video is organized.

YouTube The video walks you through the usage of timesheets in the back office and the mobile app. Later it also describes the Woodford customization highlights.

Wiki This wiki article summarizes the Woodford configuration steps from the video. They should be easily transferable to other projects and use cases.

About this solution

Technology used
  • Resco mobile app
  • Woodford
  • Microsoft Dynamics 365/Dataverse
  • Power App
  • Power Automate
Custom tables (entities) used
  • Timesheet
  • Back-office manager creates a new timesheet ("Open").
  • Mobile worker submits the completed timesheet in the app ("Submitted").
  • Back-office manager reviews and approves it ("Approved").
  • Timesheet Entry
  • Each timesheet consists of multiple timesheet entries. Entries are created by the mobile worker ("Open") and approved by the manager ("Approved").
  • Project
  • Each timesheet is assigned to a specific project. Projects can be active or inactive.
  • Project Category
  • Each project is assigned to a specific project category. Categories can be active or inactive.
Standard (system) tables used
  • User (employee)
  • Account (customer)

MVP

Describing how to build the minimum viable product is out of the scope of this article.

  • For this demonstration, we have prepared a Dynamics solution that includes all the custom entities, views, and forms on the backend side (Dynamics). If you are interested in this part, contact Resco sales for more information.
  • Regarding the mobile portion, it is built in Woodford and requires a basic knowledge of Woodford:
    • Enable the custom entities in Woodford.
    • Create forms and views for the new entities.
If you want to learn how to create forms and views, check Resco Academy, for example the Woodford Basics course.

UX improvements

In this section, we describe several optional additions that improve the user experience of mobile users.

Color code timesheet entries

Goal: Visually distinguish between timesheet entries depending on their status.

Solution:

  1. Edit the app project in Woodford and select the Timesheet Entry entity from the Project menu.
  2. Click Show UI to display the list of views, forms, and charts for this entity.
  3. Edit the view "All entries".
  4. Clone the default row two times to create three rows:
    • One for open
    • One for closed
    • One for canceled
  5. Use the Row selector on the Properties pane to switch between rows. Use an appropriately colored image for each row.
  6. Click Row Script and enter a simple rule that selects the right row depending on the status reason of the record.
    Row script rule timesheet entry example

Demo:

All day button

Goal: Create the "All day" button on the timesheet entry form.

Solution:

  1. Edit the app project in Woodford and select the Timesheet Entry entity from the Project menu.
  2. Click Show UI to display the list of views, forms, and charts for this entity.
  3. Edit the form.
  4. Click Add Button to the button to the form.
  5. On the Properties pane, as Click Text, enter "All day".
  6. Click Button Click and add the following rule:
    Allday button rule timesheet entry example

Demo:

Clone timesheet entries

Goal: Add Clone button to Timesheet Entries view.

Solution:

  1. Edit the app project in Woodford and select the Timesheet Entry entity from the Project menu.
  2. Click Show UI to display the list of views, forms, and charts for this entity.
  3. Edit the view "All entries".
  4. Click Buttons, then click New Command to create a new custom command.
  5. Enter Name (internal button name) and Label (what is displayed in the app), then save and close the Row Buttons screen.
  6. Click Button Click and enter the following rule:
    Timesheet clone button rule example

Demo:

View timesheet entries in the calendar

Goal: Add timesheet entries to calendar. Make sure that entries use different color depending on the status.

Solution:

  1. Edit the app project in Woodford and select the Timesheet Entry entity from the Project menu.
  2. Click Show UI to display the list of views, forms, and charts for this entity.
  3. Create a new public view for calendar. When editing the view, make sure that the date fields for start time and end time are correctly defined.
  4. Then, select Calendar from the Project menu.
  5. Create or edit a calendar.
  6. On the Views tab, click Add Entity and select Timesheet Entry.
  7. On the Rules tab, select the Timesheet Entry entity and click Edit Rule:
    Timesheet entry calendar rule example

Demo:

Timesheet submit confirmation

Goal: Add a confirmation message box when submitting timesheets for approval.

Solution:

  1. Edit the app project in Woodford and select the Timesheet entity from the Project menu.
  2. Click Show UI to display the list of views, forms, and charts for this entity.
  3. Edit the default form.
  4. Click On Execute and enter the following rule:
    Timesheet message box rule example

Demo:

Aggregate values

Goal: Calculate weekly aggregates

Solution:

  1. Edit the app project in Woodford and select the Timesheet entity from the Project menu.
  2. Click Show UI to display the list of views, forms, and charts for this entity.
  3. Edit the default form. This form should include an associated list of timesheet entries.
  4. Select the associated list and click Properties. Make sure that Trigger OnChange event is enabled for this list, then close the properties.
  5. Click On Change and enter the following rule:
    Timesheet calculate aggregates example
  6. This is the FetchXML filter defined in the second line of the rule:
    Timesheet calculate aggregates example:Timesheet filter

Demo: