Deep dive: Timesheets

From Resco's Wiki
(Redirected from Deepdive: Timesheets)
Jump to navigation Jump to search
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: