pesikwane

A Simple Time Sheet Solution - Part 2

Blog Post created by pesikwane on May 2, 2017

Greetings again!!!

Before anything, I would like to thank my long time friend; Yaaseen Sadulla for producing the instrumental I used in this intro!!

 

 

As promised, here's part 2 of my Time sheet blog series. In this part I've included a breakdown on how the solution has been put together:

 

The Requirement

The Projects team would like a Time sheet solution that:

  • Allows the project team to control the number of weeks that employees can submit overdue time sheets
  • Allow the project team to manage:
    • Projects (Project Name, Category)
    • Employees which can submit Time sheets and also how many Time sheets each employee has submitted
  • Consolidate all submitted Time sheets into a single SharePoint list for reporting
  • Allow managers to easily approve submitted time sheets
  • Allow managers to reject time sheets, notify, and send them back to the Employee in Draft mode for amendment
  • Allow Employees to save their Time sheets as a draft, so that they are able to work on it later

The Solution

The proposed solution will consist of the following technologies:

  • SharePoint
  • Nintex® Workflow
  • Nintex® Forms

Lists & Libraries

The solution will consist of a standard Team Site Template including the following custom SharePoint lists:

#

Title

Description

1.

Employees

A list containing all the Employees who are authorised to submit a Time sheet

2.

Projects

A list containing all projects that Employees can bill time against

3.

Time sheets

A list storing all submitted Time sheets

4.

Time sheet Reports

A list storing a consolidated view of approved Time sheets

5.

Week Ending

A list storing all the Week Ending days for the year

 

Employees

The Employees list has the following SharePoint Configuration:

Column

Type

Notes

Initials

Single line of text

 

Modified

Date and Time

System Generated Column

Created

Date and Time

System Generated Column

Full Names

Person or Group

Allow selection of People Only

Time sheets

Lookup

Count Related Lookup to Employees

Created By

Person or Group

System Generated Column

Modified By

Person or Group

System Generated Column

 

Projects

The Projects list has the following SharePoint Configuration

Column

Type

Notes

Project Name

Single line of text

 

Modified

Date and Time

System Generated Column

Created

Date and Time

System Generated Column

Category

Choice

Choices:

 

Administration

Crestan Corporate Office

Crestan Head Office

ACME

Leave

Public Holidays

Training

ProjectNameCategory

Calculated

=Category&" - "&[Project Name]

Created By

Person or Group

System Generated

Modified By

Person or Group

System Generated

 

Time sheets

The Time sheets list has the following SharePoint Configuration

Content Type

Scope

Notes

Time sheet

Site Collection

Default Content Type

 

Time sheet Content Type

The Time sheet list makes use of the Time sheet Content Type with the following configuration:

Column

Type

Notes

Created

Date and Time

System Generated Column

Title

Single line of text

 

Employee

Lookup

Lookup from Employees

In this column:

Initials

EmployeeID

Single line of text

 

Mon

Number

Min: 0
Max: 12

Number of decimal places:
1

Tue

Number

Min: 0
Max: 12

Number of decimal places:
1

Wed

Number

Min: 0
Max: 12

Number of decimal places:
1

Thu

Number

Min: 0
Max: 12

Number of decimal places:
1

Fri

Number

Min: 0
Max: 12

Number of decimal places:
1

Sat

Number

Min: 0
Max: 12

Number of decimal places:
1

Sun

Number

Min: 0
Max: 12

Number of decimal places:
1

Total Hours

Calculated

=SUM(Mon,Tue,Wed,Thu,Fri,Sat,Sun)

LineItems

Multiple lines of text

Plain text

Timesheet Status

Choice

Choices:

 

Draft

Submitted

Approved

Work Date

Date and Time

 

 

If you would like to view more information on the form configuration, you can refer to part 3 of my blog.  

Time sheet Reports

The Time sheet reports list has the following SharePoint Configuration

Column

Type

Notes

Title

Single line of text

 

Modified

Date and Time

System Generated Column

Created

Date and Time

System Generated Column

Mon

Number

Min: 0
Max: 12

Number of decimal places:
1

Tue

Number

Min: 0
Max: 12

Number of decimal places:
1

Wed

Number

Min: 0
Max: 12

Number of decimal places:
1

Thu

Number

Min: 0
Max: 12

Number of decimal places:
1

Fri

Number

Min: 0
Max: 12

Number of decimal places:
1

Sat

Number

Min: 0
Max: 12

Number of decimal places:
1

Sun

Number

Min: 0
Max: 12

Number of decimal places:
1

Employee Initials

Lookup

Lookup to Employees

Week Ending

Date and Time

 

Project

Lookup

Lookup to Projects
ProjectNameCategory

Project Name

Lookup

Lookup to Projects
Project Name

Total Hours Worked

Calculated

=Mon+Tue+Wed+Thu+Fri+Sat+Sun

Month

Calculated

=TEXT([Week Ending],"MMMM")

Year

Calculated

=TEXT([Week Ending],"YYYY")

 

Week Ending

The Week Ending list has the following SharePoint Configuration

Column

Type

Notes

Title

Single line of text

 

Modified

Date and Time

System Generated Column

Created

Date and Time

System Generated Column

WeekNumber

Number

Number of decimal places:
0

WeekEnding

Date and Time

Min: 0
Max: 12

Number of decimal places:
1

Month

Choice

Choices:

Jan

Feb

Mar

Apr

May

Jun

Jul

Aug

Sep

Oct

Nov

Dec

WeekStart

Date and Time

Date Only

Created By

Date and Time

System Generated Column

Modified By

Date and Time

System Generated Column

Work Date

Date and Time

 

 


 

Workflows

This solution consists of the following workflow configuration:

Time sheet Approval

List Name

Workflow Start Conditions

Time sheets

Start when items are created and Time sheet Status Equals Submitted

 

Start when items are modified and Time sheet Status Equals Submitted

 

Overview

Timesheet

Figure 1 Timesheet Approval Workflow


User Defined Actions

This solution makes use of the following User Defined Actions:

Get Form Detail Rows

Scope

Description

Toolbox Group

Used in

Site Collection

This UDA is built to make it easier to parse the XML Data in a Repeating Section on a Nintex® Form via Nintex® Workflow. It allows workflow designers to retrieve a collection of information out of a repeating section

Operations

Time sheet Approval

 

Note: This UDA supports a maximum of 8 columns in a repeating table.

UDA Configuration

This UDA makes use of the following input and output parameters:

Name

Type

Direction

Collection1

Collection

Output

Collection2

Collection

Output

Collection3

Collection

Output

Collection4

Collection

Output

Collection5

Collection

Output

Collection6

Collection

Output

Collection7

Collection

Output

Collection8

Collection

Output

Column1

Text

Input

Column2

Text

Input

Column3

Text

Input

Column4

Text

Input

Column5

Text

Input

Column6

Text

Input

Column7

Text

Input

Column8

Text

Input

SourceElement

Text

Input

SourceField

Text

Input

 

Time sheet Form

The solution makes use of the following Nintex® Form(s):

Time sheet

Scope

Content type

Form variables

Total # of Rules

Site

Time sheet

1

11

 

You can follow up more on A Simple Time Sheet Solution - Part 3 (The Nintex Form)  for more details around the form configuration.

Repeating Section Overview

 

Repeating Section Overview

Name

Connected to (Column)

Site

LineItems

 

Timesheets Repeating Section

This repeating section makes it easier to read the XML in the LineItems (which is a Multiple lines of text [Plain text] ) which this control is bound to; for example, take a look at the XML sample below(i.e. do you notice anything familiar??):

 

 

As you can see, having descriptive names defined in Nintex Forms; for each of the controls in the repeating section makes it much easier to understand the XML.

Deploying this solution

Step 1:

Download Time_sheet.zip file below. Extract the files, when these are extracted you should see the following files:

 

File Name

Type of file / Description

Get_Form_Detail_Rows.uda

Nintex User Defined Action

TimesheetForm.xml

Nintex Forms

Timesheet_Approval.nwf

Nintex Workflow
Timesheet2016.wspSharePoint Site Template

 

Step 2:

Import the  Get_Form_Detail_Rows.uda into your target SharePoint Environment.

Step 3:

Upload and activate the Timesheet2016.wsp file into your target SharePoint Environment and create your Time sheet site based on the template:

 

Step 4:

In your newly created Time sheet site, navigate to Time sheets list and import the Time sheet Form and publish

Step 5:

Import the Time sheet Approval Workflow into the Time sheets list, reconfigure the 2 UDA actions, republish and overwrite the existing workflow:

 

 

And that's it! I would like to thank you all for your patience, time (for reading this blog), and i really hope this helps some of you guys out there!

 

Cheers!

Continue to Part 3 (The Nintex Form)

Attachments

Outcomes