0% found this document useful (0 votes)
1K views163 pages

PT120 CT120 Database Schema Essentials: Training Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views163 pages

PT120 CT120 Database Schema Essentials: Training Manual

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 163

PT120 CT120 Database Schema Essentials

Training Manual
WorkForce Time and Attendance

LEGAL NOTICES
Copyright © 2018
WorkForce Software, LLC
All Rights Reserved.
WorkForce Software
38705 Seven Mile Road
Livonia, MI 48152
United States
workforcesoftware.com
[email protected]
+1 877 493 6723
Copyright and trade secret laws protect the information in this manual. Access to this material is provided only under license or
as part of an evaluation of the WorkForce Software, LLC solution specifically authorized by WorkForce Software, LLC. In no
other case are you permitted access to this information. Nor are you permitted to disclose this information to any third party. If
you have been provided this manual under any other circumstances, you must contact WorkForce Software, LLC at +1 877 493
6723 to arrange to have this material returned immediately.
This document was last updated on January 4, 2019.
Version 17.3

Page 3 © Copyright WorkForce Software, LLC


WorkForce Time and Attendance Table of Contents

Table of Contents
Table of Contents .................................................................................................................................... 5
Formats & Conventions ......................................................................................................................... 10
How to Contact Us............................................................................................................................. 11
Database Schema .................................................................................................................................. 12
1. Database Structure ........................................................................................................................ 13
Overall Database Structure ............................................................................................................ 13
Using the Data Dictionary .............................................................................................................. 15
Standard Data Model ..................................................................................................................... 16
Structured Query Language ........................................................................................................... 18
Relational Databases...................................................................................................................... 19
How to Use the Relationship Graphs: ............................................................................................. 19
Audit Table Structure ..................................................................................................................... 21
2. Employee and Assignment Tables and Views ................................................................................. 22
Effective Dating Methodology........................................................................................................ 23
Employee to Assignment Relationship ........................................................................................... 28
Employee and Assignment Table and View Relationships ............................................................... 31
Tables and Views Related to Employees......................................................................................... 32
Tables and Views Related to Assignment ....................................................................................... 36
Lesson 2 Exercises.......................................................................................................................... 41
Lesson 2 Review............................................................................................................................. 42
3. Pay Period Tables........................................................................................................................... 43
Pay Period Versioning .................................................................................................................... 44
Tables Related to Pay Period.......................................................................................................... 47
Lesson 3 Exercises.......................................................................................................................... 50
Lesson 3 Review............................................................................................................................. 51
4. Timesheet Tables and Views .......................................................................................................... 52
Amended Timesheets .................................................................................................................... 53
EPV, Calc EPV and Last EPV ............................................................................................................ 56

© Copyright WorkForce Software, LLC Page 5


Table of Contents

Tables and Views Related to Timesheets ........................................................................................ 62


Tables Related to Line Approvals ................................................................................................... 71
Tables Related to Off Cycle ............................................................................................................ 75
Definition Tables and Views Related to Timesheets........................................................................ 76
Tables Related to Exceptions.......................................................................................................... 78
Lesson 4 Exercises.......................................................................................................................... 79
Lesson 4 Review............................................................................................................................. 80
5. Accrual Management Tables .................................................................................................. 81
Tables related to Accrual Management .......................................................................................... 84
Tables Related to Time Off Requests .............................................................................................. 86
Lesson 5 Exercises.......................................................................................................................... 89
Lesson 5 Review............................................................................................................................. 90
6. Schedule Tables and View ...................................................................................................... 91
Schedule Templates vs. Schedule Cycles ........................................................................................ 91
Tables and a View Related to Schedule .......................................................................................... 93
Lesson 6 Exercises.......................................................................................................................... 98
Lesson 6 Review............................................................................................................................. 99
7. Data Collection Devices Tables and View .............................................................................. 100
Data Collection Device Types ....................................................................................................... 101
Data Collection Device Table and View Relationships ................................................................... 105
Tables and View Related to Data Collection Devices..................................................................... 106
Lesson 7 Exercises........................................................................................................................ 110
Lesson 7 Review........................................................................................................................... 111
8. Helpful System Tables and View ........................................................................................... 112
Tables Related to Application Users ............................................................................................. 114
How to Use Tables Related to System Values ............................................................................... 117
Tables Related to System Values .................................................................................................. 123
How to Display the Text Value for a System Constant .................................................................. 125
Master Dates Table and Custom Database Functions ................................................................... 126
Setting up and using database functions ...................................................................................... 129

Page 6 © Copyright WorkForce Software, LLC


Lesson 8 Exercises........................................................................................................................ 131
Lesson 8 Review........................................................................................................................... 133
SQL Commands ............................................................................................................................... 134
SELECT/FROM .............................................................................................................................. 134
DISTINCT...................................................................................................................................... 134
WHERE/AND/OR .......................................................................................................................... 134
IN/BETWEEN/LIKE/%.................................................................................................................... 135
NOT ............................................................................................................................................. 135
ORDER BY .................................................................................................................................... 135
AVG/COUNT/MIN/MAX/SUM ...................................................................................................... 136
UPPER/LOWER............................................................................................................................. 136
GROUP BY.................................................................................................................................... 136
HAVING ....................................................................................................................................... 137
UPDATE ....................................................................................................................................... 137
INSERT INTO ................................................................................................................................ 137
DELETE......................................................................................................................................... 137
SQL Operators ................................................................................................................................. 139
How to Join Multiple Tables............................................................................................................. 140
Inner Join..................................................................................................................................... 140
LEFT OUTER JOIN ......................................................................................................................... 140
RIGHT OUTER JOIN....................................................................................................................... 140
FULL OUTER JOIN ......................................................................................................................... 141
Cartesian Product ........................................................................................................................ 141
How to Alias Tables and Columns .................................................................................................... 141
How to Add Comments.................................................................................................................... 142
Appendix B: Absence Compliance Tracker Tables................................................................................. 143
Tables Related to Absence Compliance ........................................................................................ 143
Absence Compliance Table and View Relationships...................................................................... 152
Appendix C: Relationship Tables .......................................................................................................... 153

© Copyright WorkForce Software, LLC Page 7


Table of Contents

Page 8 © Copyright WorkForce Software, LLC


WorkForce Time and Attendance

Course Information
Course Purpose: This course is an introduction to Database Schema. This course does
not cover all the tables in the database. This course provides a
foundation to database schema and builds upon that foundational
knowledge.
Duration: 3 virtual sessions, 4 hours in length
Target Audience: Existing WorkForce users, employees and partners who are
responsible for creating new customized reports or modifying existing
WorkForce reports.
Prerequisites: Experience with Microsoft SQL query-writing or Oracle SQL query-
writing, Microsoft Access databases or other experience with
database architecture and relationships.

WorkForce uses DB Visualizer. Students can use any query tool that
they are familiar with. The free version of DB Visualizer does not
include IntelliSense.
System Information: WorkForce Time & Attendance version 18.2 is used.

© Copyright WorkForce Software, LLC Page 9


WorkForce Time and Attendance

Formats & Conventions


Important
Any additional suggestions, tips and important notes will be placed in this box to
draw your attention.

Practice
Let’s Practice:
Using the information provided in this lesson, please complete Exercise X-X
(Lesson # - Exercise #).

Example
For Example:
A relative example of use or method can be displayed here.

Notes
Notes:
Special notes related to the topic.

Tips
Best Practices Tips:
Information about best practices when using your software.

Bold Text: Any text in Bold refers to some key information.

Italic Text: Any text in Italics indicates a reference to another topic, lesson, or guide.

Bold Blue Text: Any text that is Bold & Blue details the steps to open an WorkForce screen.

Page 10 © Copyright WorkForce Software


WorkForce Time and Attendance

How to Contact Us
Phone Support North America: +1 877 493 6723
Customer Support Portal:
o WorkForce Suite: https://workforcesoftware.force.com/customers/login
o WorkForce Forecasting and Scheduling: http://support.workplacesystems.com/
Website: http://workforcesoftware.com

© Copyright WorkForce Software, LLC Page 11


WorkForce Time and Attendance

Database Schema
This module includes the following key sections:

1. Database Structure
2. Employee and Assignment Tables
3. Pay Period Tables
4. Timesheet Tables and Views
5. Accrual Management Tables
6. Schedule Table and View
7. Data Collection Devices Tables
8. Helpful System Tables and View Index

Note:
For a refresher/introduction into SQL writing basics please review Appendix A.

Page 12 © Copyright WorkForce Software


WorkForce Time and Attendance

1. Database Structure
This lesson includes the following key sections:
• Overall Database Structure
• Using the Data Dictionary
• Standard Data Model
• Audit Table Structure

Overall Database Structure


Facts about the database structure:
• Approximately 650 Tables
• Approximately 100 Views
• 0 Stored Procedures
• Supported with SQL Server 2012 and Oracle 11g and 12c

There are no primary key and foreign key constraints defined in the database to
maintain scalability. The primary key constraint is implemented through unique
indexes and foreign key constraints are managed by the application. The primary
key and foreign key relationships will be defined in the lessons that follow.

© Copyright WorkForce Software, LLC Page 13


WorkForce Time and Attendance–Database Schema

Every table and Standard Data Model view in the database has the following system columns:

COLUMN NAME DESCRIPTION


LAST_MODIFICATION_DTTM The date/time associated with the last
update of the row.
LAST_MODIFICATION_USER A foreign key to the APP_USER who last
modified the row. If no one has modified the
row, this will have a value of 0.
SYSTEM_RECORD_ID A unique identifier for the row.
SYSTEM_TIMESTAMP The date/time associated with the insertion
of the row.
SYSTEM_UPDATE_COUNTER An integer which iterates by +1 every time a
row is updated which prevents updates from
overwriting each other.
System columns common to all database tables and Standard Data Model views.

Every policy table in the database has the following system columns:

COLUMN NAME DESCRIPTION


LAST_CHANGED_LABEL The release number of the template policies.
LAST_CHANGED_DTTM The date/time the policy was last upgraded.
REPLACE_ON_UPGRADE If a user has modified a template policy, they
can flag whether the policy should be
upgraded with the next release of template
policies.
POLICY_UPGRADE_LOG Automated comments entered during a
policy upgrade.
System columns common to all policy tables.

Page 14 © Copyright WorkForce Software


WorkForce Time and Attendance

Using the Data Dictionary


The lessons in this guide cover the tables, views and columns most often used for reporting. A
more complete reference of the available tables and Standard Data Model views can be found
in the Data Dictionary. The Data Dictionary contains information about all non-“Z” audit tables
in the WorkForce T&A database.

How to Access the Data Dictionary:


1. Login to WorkForce Time and Attendance
2. From the Dashboard, click Launch Admin Client
3. Click WorkForce Software Documentation
4. Click Data Dictionary

The landing page of the Data Dictionary lists all the tables and Standard Data Model views in alphabetical order.

© Copyright WorkForce Software, LLC Page 15


WorkForce Time and Attendance–Database Schema

After selecting the table or view name, each available column displays.

Standard Data Model


The WorkForce Time and Attendance Standard Data Model introduces a new “translation layer”
between the database and the application. Using the Standard Data Model eliminates the need
to use generic fields in reports, formulas, and JavaScript. Commonly used generic fields such as
other text and other number are replaced by named fields that are defined by the
configuration. For example, employee. original_hire_date instead of employee.emp_date1.

Page 16 © Copyright WorkForce Software


WorkForce Time and Attendance

New “translation” layer.

A library of standard fields is available with templates and you can define your own fields to be
used in configuration. A data element policy is used to create a named user defined field. For
example, “Project” can be defined as an LD field on an employee record. System generated
documentation is available for all named fields defined in an implementation and is accessible
from the WorkForce Software Documentation page.

© Copyright WorkForce Software, LLC Page 17


WorkForce Time and Attendance–Database Schema

How to Access the Standard Data Model API:


1. Login to WorkForce Time and Attendance
2. From the Dashboard, click Launch Admin Client
3. Click WorkForce Software Documentation
4. Click Data Element Mappings

The landing page of the Standard Data Model API lists the aliases in alphabetical order and can be filtered.

Structured Query Language


Structured Query Language (SQL) is a database computer language designed for managing data in a
relational database. Its scope includes data query, data update, schema creation, schema modification
and data access control. It is the most widely used language for relational databases.
Although SQL can be used across multiple database types, there are subtle variations in the language
which must be considered in different databases. From an WT&A perspective, most SQL statements are
built to be database agnostic since WorkForce Software supports customers with various database
installations. This means that the SQL statement must be written in such a way that it will function with
all supported database types. However, if you are using SQL for your own personal queries or functions,
it is okay to use database specific syntax.

Page 18 © Copyright WorkForce Software


WorkForce Time and Attendance

Relational Databases
A relational database management system is a one that is based on a relational model. Most popular
commercial and open source databases use this methodology. A relational database presents the data
to the user as “relations,” most commonly as a collection of tables and within those tables are columns
and rows of data.
A relational database also strives to achieve “normalization of data.” Normalization is a systematic way
of ensuring that a database structure is suitable for general purpose querying and is free of undesirable
characteristics that could lead to loss of data integrity.
One of the ways normalization might be achieved is by implementing primary keys. A primary key is a
single unique identifier for data in a table. For example, the EMPLOYEE column in the
EMPLOYEE_MASTER table in WT&A is a primary key that represents an employee that has been
imported into the database. In other tables, when EMPLOYEE is an existing column (such as in the
EMPLOYEE table), it is a foreign key, meaning that it is a referential constraint between the two tables.
In essence, because the key exists in both tables, it can be used as a means of connecting them to gather
information. The relationship has the following graphical representation:

EMPLOYEE_
MASTER Legend

1 to 1 or Many

1 to 0, 1 or Many
EMPLOYEE
1 or Many to 0, 1 or Many

1 or Many to 1 or Many

EMPLOYEE

How to Use the Relationship Graphs:


Each chapter will include a Table/View Relationships graph to show the primary- foreign key pairs. The
following is an example of how to use the graph to write queries.

© Copyright WorkForce Software, LLC Page 19


WorkForce Time and Attendance–Database Schema

The description of key fields for the tables/views, are in subsequent tables listed beneath each graph for
each section. A complete list of just the relationship graphs is also available in Appendix C for
convenience.

Page 20 © Copyright WorkForce Software


WorkForce Time and Attendance

Audit Table Structure


Every table in the database has a corresponding audit table with the same column structure as
the parent table. The tables and the Standard Data Model views based on audit tables are
identified by starting with the prefix Z_. Every audit table or view has the following two
additional columns:

COLUMN NAME DESCRIPTION


OPERATION_ID A foreign key which links to the AUDIT_OPERATION table.
ACTION_TYPE Identifies the action associated with the audit entry. The three possible
values include the following:
• Insert: When a new row is added to the table.
• Update: When an existing row is changed in the table.
• Delete: When an existing row is removed from the table.
Audit table/view structure.

The AUDIT_OPERATION table contains a row which corresponds to each record in an audit
table. This table contains the foreign key TRANSACTION_ID which links to the AUDIT_MASTER
table. The AUDIT_MASTER table stores information related to the “who” and “when” of each
audit record.

Any Audit AUDIT_ AUDIT_


OPERATION_ID TRANSACTION_ID
Table/View OPERATION MASTER

Audit table relationships

Not every table is automatically set up to be audited. There is a list of automatically audited
tables and if you wish for any table to be added or removed from that audit list or create a new
list for auditing it can be done in the Policy Editor under All Policies > Policy Records > Setup >
Audit Tables. Please refer to the WorkForce Time and Attendance Installation and
Administration Guide for more information.

© Copyright WorkForce Software, LLC Page 21


WorkForce Time and Attendance–Database Schema

2. Employee and Assignment Tables and Views


This chapter includes the following key sections:

• Tables and views related to Employees


• Tables and views related to Assignments
• Effective Dating Methodology
• Employee to Assignment Relationship
• Assignment Groups and Security
• Employee and Assignment Table and View Relationships

Page 22 © Copyright WorkForce Software


WorkForce Time and Attendance

Effective Dating Methodology


Effective dates allow for multiple records to exist for an entity in the same table instead of
having to use the audit tables to obtain past information. The two most commonly used views
which reference tables using effective dates are EMPLOYEE and ASGNMT. The first time an
employee or assignment is imported or created, the application assigns default values to these
columns.

Default values for the initial EMPLOYEE record:


• EFF_DT: 01/01/1900 (the “beginning of time”)
• END_EFF_DT: 12/31/3000 (the “end of time”)

Default values for the initial ASGNMT records:


• EFF_DT: 01/01/1900 (the “beginning of time”)
• END_EFF_DT: one day prior to the ORIGINAL_ASSIGNMENT_BEGIN_DATE
• The status of this assignment is terminated

• EFF_DT: the ORIGINAL_ASSIGNMENT_BEGIN_DATE


• END_EFF_DT: 12/31/3000 (the “end of time”)
• The status of this assignment is active

These values change whenever an attribute of the record changes either during an import or by
manual update through the application. The previous record is not deleted; rather a new record
with new effective dates is created. An example of a change that would incur a new record
might be a name change:

FIRST_NAME LAST_NAME EFF_DT END_EFF_DT END_EFF_DT


(Pre-Change) (Post-Change)
Betty Allen 01/01/1900 12/31/3000 04/30/2009
Betty Smith 05/01/2009 12/31/3000 n/a
Effective dated records depicting a surname change.

© Copyright WorkForce Software, LLC Page 23


WorkForce Time and Attendance–Database Schema

In this example, a new record was created when Betty Allen changed her name on 05/01/2009
and the old record was given a new end effective date. There should never be an overlap or a
gap between the END_EFF_DT on the old record and the EFF_DT on the new record.

Assignment Status
Assignment record status fields:

• Represent employee’s relationship with the company.


• Change over time as employee is hired, terminated, and rehired.
• Relevant fields:
o Assignment record, effective date
o Assignment record, end effective date
o Assignment record, status code 1 field
o Assignment record, soft terminated checkbox
• Additional employee record fields may exist for use in calculations.
o HR status
o Hire date (Employee Date 1)
o Termination Date (Employee Date 3)
o Rehire Date (Employee Date 4)
• Fields may vary across versions and configurations.

Types of termination:
Soft termination
o Employee has left the position.
o Timesheet remains active for system-defined period.
o Allows administrators to make retroactive changes as needed (for example, to correct
leave balances) without having to rehire the employee.

Page 24 © Copyright WorkForce Software


WorkForce Time and Attendance

Shows timesheet still amendable.

Hard termination
o Occurs after system-specified period of time (for example, 90 days).
o Handled via a schedule script
o No further retroactive changes allowed.

No further changes can be applied to the timesheet.

© Copyright WorkForce Software, LLC Page 25


WorkForce Time and Attendance–Database Schema

Action Effective Date End Effective Status Code 1 Soft Terminated


Date
Before Hire 1/1/1900 2/3/2012 T F

Hire 2/4/2012 7/1/2015 A F

Soft Terminate 7/2/2015 8/31/2015 A T

Hard Terminate 9/1/2015 7/31/2016 T T

Rehire 8/1/2016 12/31/3000 A F

Page 26 © Copyright WorkForce Software


WorkForce Time and Attendance

Frequently Asked Question


When writing a query, how do you ensure you’re only including one record?
There are two ways to construct your SQL to limit to one record:
• If you want to only display the most current record:
SQL SERVER: getdate() between eff_dt and end_eff_dt + 1
ORACLE: sysdate between eff_dt and end_eff_dt + 1
CRYSTAL REPORTS: {?CURRENT_DATE_SQL} between eff_dt and end_eff_dt
• If you want to display the record most relevant to the time:
Timesheet Relevant: work_dt between eff_dt and end_eff_dt
Accrual Relevant: work_dt between eff_dt and end_eff_dt
Schedule Relevant: work_dt between eff_dt and end_eff_dt

Any date or date/time column can be placed between eff_dt and end_eff_dt in
order to obtain one record per employee or assignment. The most common uses
just happen to all have the same column name.

Notes:
Adding “+1” after the end_eff_dt is necessary whenever comparing a date with a
timestamp to the effective dates, such as when using getdate() or sysdate.

Notice above that the “+1” is included when comparing getdate() and sysdate, but
it is not necessary when comparing {?CURRENT_DATE_SQL} or work_dt

Best Practices Tips:


Check for active employees, soft terminations, and current dates when writing
queries to limit the amount of data returned.

© Copyright WorkForce Software, LLC Page 27


WorkForce Time and Attendance–Database Schema

Employee to Assignment Relationship


The WorkForce Time and Attendance application bases all calculations and security on an
assignment-based model. In most configurations, one employee equals one assignment, but it
is possible that an employee could be represented by multiple assignments.

Single, Multiple, and Split Assignments


In an environment, employees may have a single assignment, multiple assignments, or split
assignments.

Single Assignment
• This is the most common employee-to-assignment relationship. In a single assignment
configuration, each employee has only one assignment. This means that for every
EMPLOYEE, one and only one ASGNMT exists.
• The assignment changes over time as the employee’s job or employment status changes.

Multiple Assignments
• Each employee has one assignment per job they perform (“component”), plus an
additional “aggregate” assignment.
• Aggregate plus one or more components can be active at a given time.
• New assignments are created and terminated as the employee takes on different
positions.
• Timesheet calculations (for example, overtime premiums) encompass time worked on
all assignments.
• Typical use case: a school may employee a person as a bus driver and a cafeteria worker
concurrently. A multiple assignment configuration may be necessary if the employee
works for one employer, but two different managers. A classic example of this might be
a university student who works at several places on campus:

Page 28 © Copyright WorkForce Software


WorkForce Time and Attendance

Student

Job: Cafeteria Job: Tutor Job: Library


Manager A Manager B Manager C

Diagram of classic multiple assignment configuration.

Split Assignments
• An employee may have more than one assignment.
• Only one assignment is active at any given time. Assignments do not overlap.
• Assignment splits when employee moves from one job to another where some aspect of
one job is not compatible with the other (for example, from a policy profile with a
Monday-Sunday pay period to one with a Sunday-Saturday pay period).

Single Multiple Split


Assignment Assignment Assignment
Employee Employee
Employee
Aggregate
Assignment
Terminated
Assignment
Component
Assignment (Active)
Assignment
Component Active Assignment
Assignment (Active)

© Copyright WorkForce Software, LLC Page 29


WorkForce Time and Attendance–Database Schema

For More Information: See Understanding Multiple Assignments: Key Concepts in the Policy
Configuration Guide.

In this example, the Student is only receiving one paycheck from the Employer, but has three different
managers who need to review and approve their timesheets. The student would be given three different
ASGNMT keys in the application, one for each timesheet/manager combination. Those ASGNMT keys
would relate to an AGGREGATE_ASGNMT which would figure in the calculations of the entire paycheck.

Assignment Groups and Security


Each ASGNMT key is configured to exist in one or more assignment groups. Each ASNMT_GRP is
delegated to one or more users of the application. When the user is signed into the application,
the user only has access to the assignments that have been delegated to them. This ensures
security by not allowing unauthorized individuals to see data related to assignments that have
not been delegated to them.
Most delegations occur automatically through the Manager to Assignment relationship defined
in the Employee Import. However, for super users, such as the Payroll Admin, authority may be
delegated manually.
A manager may also delegate his/her authority in cases where the manager might be on
vacation to another manager to be able to perform his/her actions. Only groups currently
delegated to that manager are available for re-delegation to another user.

All manager-level reporting must include a parameter for Assignment Group to


enforce this security. Because of this, all SQL related to reports must include
joins to the ASGNMT_GRP_DETAIL table.

Page 30 © Copyright WorkForce Software


WorkForce Time and Attendance

Employee and Assignment Table and View Relationships

EMPLOYEE_ EMPLOYEE_
PHOTO_ID
MASTER PHOTO

EMPLOYEE

EMPLOYEE

EMPLOYEE

ASGNMT_
MASTER

ASGNMT

ASGNMT

ASGNMT

ASGNMT_GR
P_
DETAIL

ASGNMT_GRP

ASGNMT_GR
P

© Copyright WorkForce Software, LLC Page 31


WorkForce Time and Attendance–Database Schema

Tables and Views Related to Employees


EMPLOYEE_MASTER
This table acts as a control table in the database, housing one record for each employee who
has been imported into the database.

COLUMN NAME DESCRIPTION


EMPLOYEE The primary key that identifies a single
employee in the database.
EMAIL_ADDRESS The email address of the employee. This is
not the only table where this information is
stored.
PHOTO_ID A foreign key representing the employee
photo in the database.
EMPLOYEE_MASTER table.

Page 32 © Copyright WorkForce Software


WorkForce Time and Attendance

EMPLOYEE_PHOTO
A transactional table which stores photos for employees.

COLUMN NAME DESCRIPTION


DOCUMENT_CONTENTS The photo in binary format.
DOCUMENT_CONTENTS_MEDIUM The photo in binary format in a medium size
(96 x 96 pixels).
DOCUMENT_CONTENTS_SMALL The photo in binary format in a small size (48
x 48 pixels).
PHOTO_ID The primary key representing the photo.
EMPLOYEE_PHOTO table.

EMPLOYEE
If the WorkForce Time and Attendance application uses a “multiple assignment” configuration,
then it is most likely that these attributes will be stored at the assignment level instead of the
employee level. In many cases, whether a column is populated with data depends on the type
of employee import used and the information passed to WorkForce Time and Attendance
through that import, e.g., SuccessFactors.

COLUMN NAME DESCRIPTION


ACCRUAL_HIRE_DATE The hire date referenced for accruals for the
employee record.
ACT_FIFTY_EMPLOYEES_IN_75_MILES Used for ACT to indicate if there are over 50
employees within a 75-mile radius of the
location of the employee.
CHOICE_ID:
ACT_EMPLOYEES_DISTANCE_RESPONSE
ACT_COMPANY If the company is set, then the policy is only
used for employees with the matching
company field.
ACT_EMPLOYEE_GROUP If the company is not empty, then this field
can further restrict the employees to which
the policy is applied. If set, a policy is applied
only to employees with the matching
employee group field.
ACT_HIRE_DATE Used for all ACT calculations related to an
employee’s hire date.

© Copyright WorkForce Software, LLC Page 33


WorkForce Time and Attendance–Database Schema

ACT_LOCATION_CODE A foreign key to ACT_LOCATION_CODE


identifying the region in which the employee
works.
AGGREGATE_FTE_PCT A percentage associated with the employee’s
full-time equivalency.
AGGREGATE_STD_DAILY_HOURS The number of hours the employee works in a
standard day.
AGGREGATE_STD_PERIOD_HOURS The number of hours the employee works in a
standard period.
AGGREGATE_STD_WEEKLY_HOURS The number of hours the employee works in a
standard week.
BIRTH_DATE The Birth Date of the employee.
BUSINESS_PHONE The business phone number associated with
an employee.
DISPLAY_EMPLOYEE The internal employee ID.
EFF_DT The effective date of the record.
EMP_DATE1 through EMP_DATE15 * Configurable date type data associated with
the employee. These columns are commonly
referenced by data elements.
EMPLOYEE The primary key that identifies a single
employee in the database.
END_EFF_DT The end effective date of the record.
EXTERNAL_HR_ID The HR ID from an external system
FIRST_NAME The first name of the employee.
GENDER The gender of the employee.
HOME_ADDRESS_CITY The city portion of the employee’s home
address.
HOME_ADDRESS_COUNTRY The country portion of the employee’s home
address.
HOME_ADDRESS_LINE_1 The first line of the home street address of
the employee.
HOME_ADDRESS_LINE_2 The second line of the home street address of
the employee.
HOME_ADDRESS_LINE_3 The third line of the home street address of
the employee.
HOME_ADDRESS_POSTAL_CODE The postal code portion of the employee’s
home address.
HOME_ADDRESS_STATE_PROVINCE The state or province portion of the
employee’s home address.
HOME_COUNTRY_CODE The country code of the country
corresponding to the employee’s home
address.

Page 34 © Copyright WorkForce Software


WorkForce Time and Attendance

HOME_PHONE The home phone number associated with the


employee.
HR_STATUS_CODE External HR status code.
IMPORTED_BADGE_ID The badge ID of the employee.
LAST_NAME The last name of the employee.
LATEST_HIRE_DATE If the employee has been re-hired, the most
recent hire date.
LD1 through LD20 Configurable labor distribution associated
with the employee, capable of storing all data
types except date or date/time. These
columns are commonly referenced by data
elements.
LEAVE_CODE The leave status associated with the
employee record.
LEAVE_START_DATE The date associated with the leave code.
MANAGER_INDICATOR A Boolean character representing whether or
not the employee is a manager. When ‘T’, the
employee is a manager.
MANAGER_MATCH_FIELD For a supervisor, the match value for the
value stored on the employee assignment of
their direct report(s).
MIDDLE_NAME The middle name of the employee.
MOBILE_PHONE The mobile phone number of the employee.
ORIGINAL_HIRE_DATE The Hire Date for the employee record.
OTHER_NUMBER1 through Configurable number type data associated
OTHER_NUMBER25 * with the employee. These columns are
commonly referenced by data elements.
OTHER_STRING1 through OTHER_STRING25 Configurable string type data associated with
* the employee. These columns are commonly
referenced by data elements.
SENIORITY_DATE The Seniority Date for the employee record.
TERMINATION_DATE The Termination Date for the employee
record.
EMPLOYEE view.

* A set of columns only available in the Employee view when Compatibility Mode is enabled for
backward compatibility with configurations created prior to the introduction of the Standard
Data Model.

© Copyright WorkForce Software, LLC Page 35


WorkForce Time and Attendance–Database Schema

Tables and Views Related to Assignment


ASGNMT_MASTER
This view includes the relationship between EMPLOYEE and ASGNMT but does not include any
specific assignment information.

COLUMN NAME DESCRIPTION


AGGREGATE_ASGNMT In a multiple assignment scenario, this is the
master assignment key.
ASGNMT The primary key that identifies a single
assignment in the database.
ASGNMT_TYPE The type of assignment.
CHOICE_ID: ASGNMT_TYPE
ASSIGNMENT_DESCRIPTION A description of the assignment.
CURRENT_PERIOD_BEGIN The current pay period begin date of the
assignment.
CURRENT_PERIOD_END The current pay period end date of the
assignment.
EMPLOYEE A foreign key representing a single employee
in the database.
ASGNMT_MASTER view.

Page 36 © Copyright WorkForce Software


WorkForce Time and Attendance

ASGNMT
This view includes all assignment level information. In many cases, whether a column is
populated with data depends on the type of employee import used and the information passed
to WorkForce Time and Attendance through that import, e.g., SuccessFactors.

There are many of the same columns in EMPLOYEE and ASGNMT. This section
highlights the different columns that can be found in ASGNMT followed by the
common columns. Employee attributes are usually included in one view or the
other, not in both, depending on the type of configuration.

COLUMN NAME DESCRIPTION


ASGNMT A foreign key that identifies a single assignment in the
database.
ASSIGNMENT_STATUS The primary status of the assignment. The possible
values are:
• A = Active
• T = Terminated
BASE_PAY_RATE The base rate of pay of the assignment.
BASE_PAY_UNIT The unit associated with the base rate of pay of the
assignment.
COMPANY_ID The company ID of the assignment.
COST_CENTER The cost center of the assignment.
DEPARTMENT_ID The department ID of the assignment.
DISTRICT_ID The district ID of the assignment.
DIVISION_ID The division ID of the assignment.
EMPLOYMENT_TYPE The employment type of the assignment.
FLSA_STATUS A ‘yes’ (Y) or ‘no’ (N) indicator of the FLSA status of
the assignment
FULLTIME_PARTTIME The type of the assignment, either full time (FT) or
part time (PT).
JOB_CODE The job code of the assignment.
JOB_LEVEL The job level of the assignment.
JOB_TITLE The job title of the assignment.
LOCATION_ID The location ID of the assignment.
PAY_CURRENCY_CODE The currency associated with the pay for the
assignment.
PAY_GRADE The pay grade of the assignment.
PAY_TYPE The pay type of the assignment, either salary (S) or
hourly (H).

© Copyright WorkForce Software, LLC Page 37


WorkForce Time and Attendance–Database Schema

PAYROLL_EMP_ID The payroll employee ID of the assignment.


PAYROLL_SYSTEM_ID The payroll system ID of the assignment.
POLICY_PROFILE The policy profile of which the assignment is a part.
PRIMARY_ASGNMT A Boolean character representing whether it is a
primary assignment.
REGION_ID The region of the assignment.
SCHEDULE_TEMPLATE A foreign key representing the default schedule
template for the assignment.
SOFT_TERMINATED A Boolean character representing whether it is a soft
terminated assignment. When ‘T’, the assignment
will be considered terminated by calculations but the
timesheets are still processed.
TIME_SHEET_APPROVER_MATCH_ID For an employee, the match value for the value
stored on the employee assignment of their
supervisor.
TIME_ZONE The time zone in which employee is located.
UNION_CODE The union code of the assignment.
ASGNMT View.

Page 38 © Copyright WorkForce Software


WorkForce Time and Attendance

COLUMN NAME DESCRIPTION


ASSIGNMENT_ACCRUAL_BEGIN_DATE The hire date referenced for accruals for the
assignment.
ASSIGNMENT_END_DATE This is commonly the Termination Date of the
assignment.
ASSIGNMENT_FTE_PCT A percentage associated with the employee’s full-
time equivalency for the assignment.
ASSIGNMENT_SENIORITY_DATE The seniority date of the assignment.
ASSIGNMENT_STD_DAILY_HOURS The number of hours the employee works in a
standard day for the assignment.
ASSIGNMENT_STD_PERIOD_HOURS The number of hours the employee works in a
standard period for the assignment.
ASSIGNMENT_STD_WEEKLY_HOURS The number of hours the employee works in a
standard week for the assignment.
BUSINESS_ADDRESS_CITY The city portion of the assignment’s address.
BUSINESS_ADDRESS_COUNTRY The country portion of the assignment’s address.
BUSINESS_ADDRESS_LINE_1 The first line of the street address of the
assignment.
BUSINESS_ADDRESS_LINE_2 The second line of the street address of the
assignment.
BUSINESS_ADDRESS_LINE_3 The third line of the street address of the
assignment.
BUSINESS_ADDRESS_POSTAL_CODE The postal code portion of the assignment’s
address.
BUSINESS_ADDRESS_STATE_PROV The state or province portion of the employee’s
home address.
EFF_DT The effective date of the record.
EMP_DATE1 through EMP_DATE15 * Configurable date type data associated with the
assignment. These columns are commonly
referenced by data elements.
END_EFF_DT The end effective date of the record.
HR_STATUS_CODE The HR status code of the assignment
IMPORTED_BADGE_ID The imported badge ID of the assignment.
LATEST_ASSIGNMENT_BEGIN_DATE The most recent hire date of the assignment.
LD1 through LD20 Configurable labor distribution associated with the
assignment, capable of storing all data types except
date or date/time. These columns are commonly
referenced by data elements.
ORIGINAL_ASSIGNMENT_BEGIN_DATE This is commonly the Hire Date for the assignment.
OTHER_NUMBER1 through Configurable number type data associated with the
OTHER_NUMBER25 * assignment. These columns are commonly
referenced by data elements.

© Copyright WorkForce Software, LLC Page 39


WorkForce Time and Attendance–Database Schema

OTHER_STRING1 through Configurable string type data associated with the


OTHER_STRING25 * assignment. These columns are commonly
referenced by data elements.
Columns in common with the EMPLOYEE view.

* A set of columns only available in the view when Compatibility Mode is enabled for backward
compatibility with configurations created prior to the introduction of the Standard Data Model.

ASGNMT_GRP_DETAIL
This table defines which assignments are in which assignment groups. An assignment can
belong to more than one assignment group.

COLUMN NAME DESCRIPTION


ASGNMT A foreign key representing a single assignment in the database.
ASGNMT_GRP A foreign key representing a single assignment group in the
database.
ASGNMT_GRP_DETAIL table.

ASGNMT_GRP
A view of the definition table for each of the assignment groups in the application.

COLUMN NAME DESCRIPTION


ASGNMT_GRP The primary key representing a single assignment group in the
database.
FILTER_1_COL_VALUE If the assignment group is related to a manager, this typically
represents that manager’s DISPLAY_EMPLOYEE value.
DESCRIPTION The text description of the assignment group.
ASGNMT_GRP view.

Page 40 © Copyright WorkForce Software


WorkForce Time and Attendance

Lesson 2 Exercises

Let’s Practice
Exercise 1: Query Writing – Employee Contact Information
Design a query that will return the following information for all employees:
• Employee ID
• Employee Name (First & Last)
• Employee Address
• Employee City
• Employee State
• Employee Postal Code
• Employee Phone Number
• Employee Email Address

Let’s Practice
Exercise 2: Query Writing – Assignment Group Detail
Design a query that will return the following columns to display a list
of all assignment groups and their members:
• Assignment Group Description
• Assignment Description (multiple assignment configurations only)
• Employee ID
• Employee Name (First & Last)

© Copyright WorkForce Software, LLC Page 41


WorkForce Time and Attendance–Database Schema

Lesson 2 Review
1. What is the primary function of the EMPLOYEE_MASTER table?

2. What is the default EFF_DT and END_EFF_DT assigned to each employee record that uses effective
dating?

3. What column in the EMPLOYEE view denotes the Employee ID?


a. EMPLOYEE
b. ASGNMT
c. DISPLAY_EMPLOYEE
d. OTHER_STRING1

4. What does LD stand for?

5. True or False: If Manager A is signed into the application, they automatically have access to approve
timesheets for Manager B.

Page 42 © Copyright WorkForce Software


WorkForce Time and Attendance

3. Pay Period Tables


This chapter includes the following key sections:
• Tables related to Pay Period
• Pay Period Versioning
• The importance of EMPLOYEE_PERIOD_VERSION
• Pay Period Tables Relationships

© Copyright WorkForce Software, LLC Page 43


WorkForce Time and Attendance–Database Schema

Pay Period Versioning


Versioning is important in relation to pay periods because a pay period may be amended after
it has been processed and closed in the application. Every pay period starts with a
VERSION_NUMBER = 0. When a pay period is first created, there will be 1 row in
EMPLOYEE_PERIODS for the EMPLOYEE and each of their assignments and 1 row in
EMPLOYEE_PERIOD_VERSIONS for the EMPLOYEE_PERIOD.
The VERSION_NUMBER will increment by 1 for each time the pay period is amended. All pay
periods will remain in this state. The only scenario where the VERSION_NUMBER will increment
above 1 is during an amended pay period scenario. In that scenario, when the amended pay
period is processed and closed again, the VERSION_NUMBER will change from 0 to 2. The
VERSION_NUMBER will increment by 1 for each time the pay period is amended.

Sequence of Events
1. Pay Period is Created VERSION_NUMBER = 0
2. Pay Period is Closed VERSION_NUMBER = 1
3. Pay Period is Re-Opened1 VERSION_NUMBER = 0
4. Pay Period is Re-Closed VERSION_NUMBER = 2
5. Pay Period is Re-Opened1 VERSION_NUMBER = 0
6. Pay Period is Re-Closed VERSION_NUMBER = 3

1
When the Pay Period is re-opened, a new EMPLOYEE_PERIOD_VERSION key is generated for the same
EMPLOYEE_PERIOD and the PRIOR_EMP_PERIOD_VERSION is populated with the old
EMPLOYEE_PERIOD_VERSION. The original EMPLOYEE_PERIOD_VERSION for an EMPLOYEE_PERIOD will always
have a VERSION_NUMBER = 1 when it is closed.

Page 44 © Copyright WorkForce Software


WorkForce Time and Attendance

The Importance of EMPLOYEE_PERIOD_VERSION


The EMPLOYEE_PERIOD_VERSION primary key that is generated in the
EMPLOYEE_PERIOD_VERSIONS table is one of the most important keys in the database. It acts
as the key to “unlocking” all the data stored in the Timesheet, Schedule and Accrual
Management tables and views. They do not store any actual Employee attribute columns, but
rather store only the EMPLOYEE_PERIOD_VERSION key.

EMPLOYEE

EMPLOYEE

V_ASGNMT_
PERIODS

EMPLOYEE_PERIOD_VERSION

SCHEDULE_
BANK_OUTP
TIME_SHEET_ TIME_SHEET_ GENERATION SCHEDULE_
UT_
DETAIL OUTPUT _ DETAIL
SUMMARY
DTL
Relationships to EMPLOYEE_PERIOD_VERSION key.

It is important to query data based on this key because amendments are possible for each pay
period.

© Copyright WorkForce Software, LLC Page 45


WorkForce Time and Attendance–Database Schema

Pay Period Schema Relationships

ASGNMT_
EMPLOYEE EMPLOYEE ASGNMT ASGNMT
MASTER

EMPLOYEE ASGNMT

EMPLOYEE_
PERIODS

EMPLOYEE_PERIOD

EMPLOYEE_
PERIOD_
VERSIONS

Diagram of Pay Period tables relationships.

Page 46 © Copyright WorkForce Software


WorkForce Time and Attendance

Tables Related to Pay Period


EMPLOYEE_PERIODS
A row is generated in this table for every EMPLOYEE for every ASGNMT and pay period.
COLUMN NAME DESCRIPTION
ASGNMT A foreign key representing a single
assignment in the database.
CALC_EMP_PERIOD_VERSION The calculated employee period version for
the employee period.
EMPLOYEE A foreign key representing a single employee
in the database.
EMPLOYEE_PERIOD The primary key associated with
employee/assignment /pay period
combination.
LAST_EMP_PERIOD_VERSION The most recently created employee period
version for the employee period.
PP_BEGIN The start date of the pay period.
PP_END The end date of the pay period.
EMPLOYEE_PERIODS table.

EP EPV VERSION # PRIOR EPV


Employee Period Key (Time Period) Employee Period Version Key

123 456 01 NULL

123 789 02 456

123 946 03 789


Visual Explanation of Employee Period versioning.

Using the Prior EPV, if it is NULL it's original, if it is not NULL, then we know it is an amended EP.

"and epv.PRIOR_EMP_PERIOD_VERSION is not NULL" – This statement is referencing how to query


for only amendments.

"and ep.pp_end between e.eff_dt and e.end_eff_dt" – This statement is using ep.pp_end to get the
employee that is effective on that date.
ep.PP_END Cost Center

2/4/2012 123

5/5/2012 456

12/5/2012 456

© Copyright WorkForce Software, LLC Page 47


WorkForce Time and Attendance–Database Schema

EMPLOYEE_PERIOD_VERSIONS
To track the versions of each EMPLOYEE_PERIOD.
COLUMN NAME DESCRIPTION
CALC_CHANGE_SET A foreign key representing the calculated set
of pay period data.
EMPLOYEE_PERIOD A foreign key representing the
employee/assignment /pay period
combination.
EMPLOYEE_PERIOD_VERSION The primary key associated with the version
of the EMPLOYEE_PERIOD.
PRIOR_EMP_PERIOD_VERSION A foreign key representing the prior
EMPLOYEE_PERIOD_VERSION in relation to
an amended pay period.
VERSION_NUMBER The version of the pay period.
EMPLOYEE_PERIOD_VERSIONS table.

View: V_ASGNMT_PERIODS
A comprehensive view of the major primary keys and columns found in the following tables:

• ASGNMT_MASTER
• ASGNMT
• EMPLOYEE_PERIODS
• EMPLOYEE_PERIOD_VERSIONS

The view is comprised of the following columns:

• ASGNMT
• ASGNMT_TYPE
• ASSIGNMENT_DESCRIPTION
• CALC_CHANGE_SET
• CURRENT_PERIOD_BEGIN
• CURRENT_PERIOD_END
• DESCRIPTION (for backward compatibility)
• EMPLOYEE
• EMPLOYEE_PERIOD
• EMPLOYEE_PERIOD_VERSION
• POLICY_PROFILE
• PP_BEGIN
• PP_END

Page 48 © Copyright WorkForce Software


WorkForce Time and Attendance

• PRIOR_EMP_PERIOD_VERSION
• VERSION_NUMBER

The view V_ASGNMT_PERIODS is often a good starting point for a SQL statement
involving the employee_period_version relationship.

© Copyright WorkForce Software, LLC Page 49


WorkForce Time and Attendance–Database Schema

Lesson 3 Exercises

Let’s Practice
Exercise 1: Query Writing – Pay Periods per Employee
Design a query that will return the following columns:
• Employee ID
• Employee Name (First & Last)
• Assignment Description (multiple assignment configurations only)
• Pay Period Begin
• Pay Period End

Let’s Practice
Exercise 2: Query Writing – Finding Amended Pay Periods
Design a query that will identify employees that have an amended pay period
returning the following columns:
• Employee ID
• Employee Name (First & Last)
• Assignment Description (multiple assignment configurations only)
• Pay Period End
• Version Number

Page 50 © Copyright WorkForce Software


WorkForce Time and Attendance

Lesson 3 Review
1. What is the key to “unlocking” most transactional tables in the database?
a) EMPLOYEE
b) EMPLOYEE_PERIOD_VERSION
c) EMPLOYEE_PERIOD
d) ASGNMT

2. What is the name of the view that can be used as a starting point for most SQL statements involving
transactional tables?

3. True or False: Each EMPLOYEE_PERIOD has one and only one EMPLOYEE_PERIOD_VERSION.

4. What will be the VERSION_NUMBER of a pay period that has been amended 3 times?
a) 1
b) 2
c) 3
d) 4

5. True or False: In a single-assignment environment, there is one record for each employee for each
pay period in the EMPLOYEE_PERIODS table. What about in a multiple-assignment environment?

© Copyright WorkForce Software, LLC Page 51


WorkForce Time and Attendance–Database Schema

4. Timesheet Tables and Views


This lesson includes the following key sections:

• Tables and Views Related to Timesheets


• Definition Tables and Views Related to Timesheets
• Tables related to Exceptions
• Tables related to Line Approvals
• Tables related to Off Cycle
• Amended Timesheets
• Employee Period Version vs. Calc and Last Employee Period Version
• Timesheet Table and View Relationships
• Line Approval Tables Relationships
• Off Cycle Tables Relationships

Page 52 © Copyright WorkForce Software


WorkForce Time and Attendance

Amended Timesheets
Amended Timesheets feature allows employees and/or managers to correct erroneous prior
timesheet information. When a timesheet is amended, the original version is not deleted and
replaced with a new version, as illustrated in Pay Period Versioning.
Once a timesheet has been locked, calculated and closed, no further changes can be made to it.
Instead, when an amendment occurs, a new version of the timesheet is created, and edits are
made to that version.
Any data entered on an amended timesheet is not handled until the new version is approved by
the manager. This lesson will show the end to end process of an amended timesheet.

The Scenario
1. The employee originally entered 9 Regular hours in Week 1, in this scenario hours over 8
are reclassified as Overtime.
2. The employee changes those 9 Regular hours to 8 Vacation hours.
3. The employee only has 20 hours of available Vacation at start of Week 1.

Initial Values on the Timesheet

The record that is being amended is highlighted in yellow

© Copyright WorkForce Software, LLC Page 53


WorkForce Time and Attendance–Database Schema

What happens to Time Sheet Output for Amended Timesheets?

Records in TIME_SHEET_OUTPUT after the amendment for Week 1

After the Amendment is approved, TSO table will show new records where the Regular and
Overtime hours are "reversed" from Week 1 and Vacation with 8 hours is "newly" added. Then
the new hours are all recalculated.

Records in TIME_SHEET_OUTPUT after the amendment for Week 2

Page 54 © Copyright WorkForce Software


WorkForce Time and Attendance

This causes a ripple effect into Week 2, which previously used 16 hours of the 20 available
Vacation Hours. So, after the amendment changes from Week 1, only 4 Vacation hours are
available for Jun 12th causing the remaining 4 hours requested to be reclassified as “Unpaid.”

Records in TIME_SHEET_OUTPUT for Week 3

Finally, notice that the CALC_CHANGE_SET “1000000003” was assigned to the previous record
changes; this means they will get processed as part of Week 3’s payroll period processing even
though those records are not part of the current pay period.

© Copyright WorkForce Software, LLC Page 55


WorkForce Time and Attendance–Database Schema

EPV, Calc EPV and Last EPV


When using employee_period_version (EPV) as the join, there is the possibility of multiple
versions of data in the results. There are two alternate join paths shown below. Use of either of
these two joins will only return data for a single employee period version.

employee_periods.calc_emp_period_version = (table or view).employee_period_version

employee_periods.last_emp_period_version = (table or view).employee_period_version

When using the employee periods table calc_emp_period_version column to join to the
employee_period_version column, the results will be limited to:
1. The initial version for the pay period, if there are no amendments for the pay period
2. If an amendment(s) exists for the pay period:
a. The most recently approved amendment
b. The prior version for the pay period, if the amendment has not been approved

Pay Now

When using the employee periods table last_emp_period_version column to join to the
employee_period_version column, the results will be limited to only the most recently created
version for the pay period.
To explore the first of these two join options, for the following sample pay period, an employee
has amended his or her timesheet changing “out” time for 3/31/2009. This change is
highlighted in yellow. This amendment has not been approved or processed. As such, note the
version number is 0 and not 2. The differences in the results based on the join column used can
be observed.

Page 56 © Copyright WorkForce Software


WorkForce Time and Attendance

A sample pay period with one processed original version and an open unapproved amendment

The following results are from TIME_SHEET_DETAIL using the employee_period_version join.
Note the results include both the original and the amended version of the employee time.

v_asgnmt_periods.employee_period_version = time_sheet_detail.employee_period_version

The results when joining to the view, v_asgnmt_periods, using EPV

Whenever you use V_ASGNMT_PERIODS, because the view includes


employee_period_versions, a query using it will generally return more rows than one; since
there can be multiple versions of a pay period.
To have the same number of records returned by each of those queries, (when not outputting
version information) you can check the prior_emp_period_version is null - that will always
return the original version for a pay period.

Alternatively, use one of the following:


employee_periods.calc_emp_period_version = (table or view).employee_period_version --
Returns the original, or latest approved amendment version

© Copyright WorkForce Software, LLC Page 57


WorkForce Time and Attendance–Database Schema

employee_periods.last_emp_period_version = (table or view).employee_period_version --


Returns the latest created version (not necessarily approved)

The following results are from TIME_SHEET_DETAIL using calc_emp_period_version (Calc EPV)
as the join. In this instance, the results include only the original version of the employee time
(version 1) since the amendment has not been approved. Until the amendment is approved,
the calc_emp_period_version column will contain the employee_period_version key
corresponding to the previous version.

employee_periods.calc_emp_period_version = time_sheet_detail.employee_period_version

Using Calc EPV returns a different result set

As the amended version, version 0 was not yet approved, the following are the results from
TIME_SHEET_DETAIL using last_emp_period_version (Last EPV) as the join. In this instance, the
results include only the most recently created version of the employee time (version 0).

employee_periods.last_emp_period_version = time_sheet_detail.employee_period_version

Using Last EPV returns a different result set.

If version_number is not included in the results when using


employee_period_version as the join, the results can be ambiguous or
inaccurate, depending on the usage.

Page 58 © Copyright WorkForce Software


WorkForce Time and Attendance

Timesheet Table and View Relationships


It should use CEPV, LEPV in this diagram:

EPV = EMPLOYEE_PERIOD_VERSION

CEPV = CALC_EMP_PERIOD_VERSION

LEPV = LAST_EMP_PERIOD_VERSION

© Copyright WorkForce Software, LLC Page 59


WorkForce Time and Attendance–Database Schema

Line Approval Table and View Relationships

ASGNMT_
EMPLOYEE EMPLOYEE
MASTER

EMPLOYEE EMPLOYEE ASGNMT

V_ASGNMT_ EMPLOYEE_
PERIODS PERIODS

EPV CEPV or LEPV

LINE_APPRO TIME_SHEET_
DETAIL_RECORD_ID
VAL_EVENT DETAIL

DETAIL_RECORD
EPV
_ID = DETAIL_ID

TIME_SHEET_
DETAIL_MAT
CH_VAL
APP_USER
MATCH_POLICY
MATCH_VALUE

ROUTING_TA
BLE

APPROVER_ID

APP_USER
EPV = EMPLOYEE_PERIOD_VERSION

CEPV = CALC_EMP_PERIOD_VERSION APP_USER


LEPV = LAST_EMP_PERIOD_VERSION

Page 60 © Copyright WorkForce Software


WorkForce Time and Attendance

Off Cycle Table and View Relationships

© Copyright WorkForce Software, LLC Page 61


WorkForce Time and Attendance–Database Schema

Tables and Views Related to Timesheets


TIME_SHEET
A view of the transactional table where one row is created for each timesheet for each
EMPLOYEE_PERIOD_VERSION.

COLUMN NAME DESCRIPTION


CUR_APPROVAL_LEVEL The current approval level of the entire timesheet.
• 0: Open
• 1: Employee Approved
• 2-97: Manager Approved

• 99: Locked
• 100: Closed
CUR_MGR_APPROVAL_LEVEL The current level of management approval.
EMPLOYEE_APPROVAL A Boolean field indicating whether the employee approved
the timesheet.
EMPLOYEE_PERIOD_VERSION A foreign key representing the version of the employee
period.
TIME_SHEET_COMMENTS Any timesheet level comments entered by the user.
TIME_SHEET view.

Page 62 © Copyright WorkForce Software


WorkForce Time and Attendance

APPROVAL_EVENT
The who, what, and when of each approval that occurs in the application.

COLUMN NAME DESCRIPTION


APPROVAL_LEVEL The approval level associated with the event
(see the previous view).
COMMENTS Any comments associated with the event.
EMPLOYEE_PERIOD_VERSION A foreign key representing the version of the
employee period.
EVENT_DTTM The date/time of the event.
EVENT_TYPE The type of event.
CHOICE_ID: APPROVAL_EVENT_TYPE
EVENT_USER The APP_USER associated with who created
the event.
NEW_APPROVAL_LEVEL The approval level after the event took place.
SEND_EMAIL A Boolean column indicating whether to send
an email for the event.
TARGET_USER The APP_USER who is next in the chain of
events.
APPROVAL_EVENT table.

© Copyright WorkForce Software, LLC Page 63


WorkForce Time and Attendance–Database Schema

TIME_SHEET_DETAIL
The employee entered time slices on a timesheet. This view shows exactly what the employee
entered and no calculations are done.

COLUMN NAME DESCRIPTION


ACT_CASE A foreign key representing the absence case.
AMOUNT If the time slices are associated with a dollar
amount instead of hours.
RATE The base pay rate associated with the time slice.
COMMENTS The time slice level comments entered by a user.
DATA_SOURCE Identifies the source of the time slice.
CHOICE_ID: TX_DATA_SOURCE
DETAIL_RECORD_ID A unique identifier for the time slice.
EMPLOYEE_PERIOD_VERSION A foreign key representing the version of the
employee period.
END_DTTM The end date/time of the time slice.
END_DTTM_DST_FALLBACK A Boolean column indicating whether the end
date/time of the time slice occurred during the
daylight savings fallback period.
HOURS The elapsed hours associated with the time slice.
Note: In TIME_SHEET_DETAIL, if a Start Time and
End Time are entered, the HOURS column will not be
calculated.
IN_SWIPE_CLIENT_IP_ADDRESS Client IP Address of the “in” swipe.
IN_SWIPE_ID A foreign key representing the swipe transaction
associated with “in” time.
IN_SWIPE_LATITUDE Latitude of the “in” punching location.
IN_SWIPE_LONGITUDE Longitude of the “in” punching location.
IN_SWIPE_OFFLINE_WEBCLOCK A Boolean field indicating whether the swipe is from
an offline WebClock.
IN_SWIPE_PHOTO_ID ID of swipe photo taken by the data collection
device at the time of the “in” swipe.
LD1 through LD10 Any labor distribution associated with the time
slice.
LINE_APPROVAL_LEVEL The original line approval level before the event (0-
99).
ORIGINAL_IN_SWIPE_DTTM Set at swipe creation time and remains unchanged
afterwards. Useful for tracking any manual
modifications to the swipe time.

Page 64 © Copyright WorkForce Software


WorkForce Time and Attendance

COLUMN NAME DESCRIPTION


ORIGINAL_IN_SWIPE_DTTM_DST_FB A Boolean column indicating whether the original
“in” swipe creation date/time occurred during the
daylight savings fallback period.
ORIGINAL_OUT_SWIPE_DTTM DATE- Set at swipe creation time and remains unchanged
TIME afterwards. Useful for tracking any manual
modifications to the swipe time.
ORIGINAL_OUT_SWIPE_DTTM_DST_FB A Boolean column indicating whether the original
“out” swipe creation date/time occurred during the
daylight savings fallback period.
OUT_SWIPE_CLIENT_IP_ADDRESS Client IP address of the “out” swipe.
OUT_SWIPE_ID A foreign key representing the swipe transaction
associated with “out” time.
OUT_SWIPE_LATITUDE Latitude of the “out” punching location.
OUT_SWIPE_LONGITUDE Longitude of the “out” punching location.
OUT_SWIPE_OFFLINE_WEBCLOCK A Boolean field indicating whether the swipe is from
an offline WebClock.
OUT_SWIPE_PHOTO_ID ID of swipe photo taken by the data collection
device at the time of the “out” swipe.
PAY_CODE A foreign key representing the pay code associated
with the time slice.
PAY_CURRENCY_CODE The currency associated with the pay.
START_DTTM The start date/time of the time slice.
START_DTTM_DST_FALLBACK A Boolean column indicating whether the start
date/time of the time slice occurred during the
daylight savings fallback period.
TIME_OFF_REQUEST The TIME_OFF_REQEST if the time slice is
associated with time off.
WORK_DT The date the time slice took place.
TIME_SHEET_DETAIL view.

© Copyright WorkForce Software, LLC Page 65


WorkForce Time and Attendance–Database Schema

TIME_SHEET_DETAIL_SPLIT
The calculated time slices using configuration rules based on the records in
TIME_SHEET_DETAIL.

There are many of the same columns in TIME_SHEET_DETAIL and


TIME_SHEET_DETAIL_SPLIT. The following highlights the additional columns in
TIME_SHEET_DETAIL_SPLIT and is followed by the columns that are in common.

COLUMN NAME DESCRIPTION


BANK If the time slice affects accrual management,
the name of the BANK.
CALC_BOOLEAN1 through CALC_BOOLEAN10 Configurable Boolean data type columns.
CALC_DATE1 through CALC_DATE10 Configurable date data type columns.
CALC_DATETIME1 through Configurable date/time data type columns.
CALC_DATETIME10
CALC_STRING1 through CALC_STRING10 Configurable string data type columns.
CALC_VALUE1 through CALC_VALUE10 Configurable integer data type columns.
ORIGINAL_PAY_CODE A foreign key representing the pay code
associated with the original time slice from
TIME_SHEET_DETAIL.
PARENT_ID The DETAIL_RECORD_ID from the
TIME_SHEET_DETAIL view.
TIME_SHEET_DETAIL_SPLIT view.

COLUMN NAME DESCRIPTION


ACT_CASE A foreign key representing the absence case.
AMOUNT If the time slice is associated with a dollar amount
instead of hours.
RATE The base pay rate associated with the time slice.
COMMENTS The time slice level comments entered by a user.
EMPLOYEE_PERIOD_VERSION A foreign key representing the version of the employee
period.
END_DTTM The end date/time of the time slice.
END_DTTM_DST_FALLBACK A Boolean column indicating whether the end date/time
of the time slice occurred during the daylight savings
fallback period.
HOURS The elapsed hours associated with the time slice.

Page 66 © Copyright WorkForce Software


WorkForce Time and Attendance

COLUMN NAME DESCRIPTION


IN_SWIPE_CLIENT_IP_ADDRESS Client IP Address of the “in” swipe.
IN_SWIPE_ID A foreign key representing the swipe transaction
associated with “in” time.
IN_SWIPE_LATITUDE Latitude of the “in” punching location.
IN_SWIPE_LONGITUDE Longitude of the “in” punching location.
IN_SWIPE_OFFLINE_WEBCLOCK A Boolean field indicating whether the swipe is from an
offline WebClock.
IN_SWIPE_PHOTO_ID ID of swipe photo taken by the data collection device at
the time of the “in” swipe.
LD1 through LD10 Any labor distribution associated with the time slice.
LINE_APPROVAL_LEVEL The original line approval level before the event (0-99).
OUT_SWIPE_CLIENT_IP_ADDRESS Client IP Address of the “out” swipe.
OUT_SWIPE_ID A foreign key representing the swipe transaction
associated with “out” time.
OUT_SWIPE_LATITUDE Latitude of the “out” punching location.
OUT_SWIPE_LONGITUDE Longitude of the “out” punching location.
OUT_SWIPE_OFFLINE_WEBCLOCK A Boolean field indicating whether the swipe is from an
offline WebClock.
OUT_SWIPE_PHOTO_ID ID of swipe photo taken by the data collection device at
the time of the “out” swipe.
PAY_CODE A foreign key representing the pay code associated with
the time slice.
PAY_CURRENCY_CODE The currency associated with the pay.
START_DTTM The start date/time of the time slice.
START_DTTM_DST_FALLBACK A Boolean column indicating whether the start date/time
of the time slice occurred during the daylight savings
fallback period.
TIME_OFF_REQUEST The TIME_OFF_REQEST if the time slice is associated
with time off.
WORK_DT The date the time slice took place.
Columns in common with TIME_SHEET_DETAIL view.

© Copyright WorkForce Software, LLC Page 67


WorkForce Time and Attendance–Database Schema

TIME_SHEET_OUTPUT
The final calculation destination for timesheet values, containing the information that is used to
calculate pay checks or exports to external systems.

There are many of the same columns in TIME_SHEET_DETAIL_SPLIT and


TIME_SHEET_OUTPUT. The following highlights the additional columns in
TIME_SHEET_OUTPUT and is followed by the columns that are in common.

COLUMN NAME DESCRIPTION


ASGNMT A foreign key representing a single assignment in the
database.
ASGNMT_DESCRIPTION The description associated with the ASGNMT.
CALC_CHANGE_SET A foreign key representing the calculated set of pay period
data.
DISPLAY_EMPLOYEE A foreign key representing the internal Employee ID.
EMPLOYEE A foreign key representing a single employee in the
database.
GROSS_PAY The calculated amount of pay for the time slice.
PPEND The pay period end associated with the time slice.
TRANSACTION_TYPE The type of transaction.
CHOICE_ID: TSO_TRANSACTION_TYPE
• 10: New – added through an amendment
• 20: Reversed – reversed through an amendment
• 30: Normal – entered on the original version
• 40: Recalculated – entered on the amendment

When using the employee_period_version column to join to


this view, only transaction types 10, 20 and 30 should be
included in the results.
When using the calc_emp_period_version or
last_emp_period_version columns to join to this view, only
transaction types 30 and 40 should be included in the
results.
calc_emp_period_version - use 30 and 40, this will give all
the hours on the original time sheet or all hours on
Amended.
TIME_SHEET_OUTPUT view.

Page 68 © Copyright WorkForce Software


WorkForce Time and Attendance

COLUMN NAME DESCRIPTION


ACT_CASE A foreign key representing the absence case.
AMOUNT If the time slice is associated with a dollar amount
instead of hours.
BASE_PAY_RATE The base pay rate associated with the time slice.
COMMENTS The time slice level comments entered by a user.
EMPLOYEE_PERIOD_VERSION A foreign key representing the version of the employee
period.
END_DTTM The end date/time of the time slice.
END_DTTM_DST_FALLBACK A Boolean column indicating whether the end date/time
of the time slice occurred during the daylight savings
fallback period.
HOURS The elapsed hours associated with the time slice.
LD1 through LD10 Any labor distribution associated with the time slice.
LINE_APPROVAL_LEVEL The original line approval level before the event (0-99).
PAY_CODE A foreign key representing the pay code associated with
the time slice.
PAY_CURRENCY_CODE The currency associated with the pay.
START_DTTM The start date/time of the time slice.
START_DTTM_DST_FALLBACK A Boolean column indicating whether the start date/time
of the time slice occurred during the daylight savings
fallback period.
WORK_DT The date the time slice took place.
Columns in common with TIME_SHEET_DETAIL_SPLIT view.

© Copyright WorkForce Software, LLC Page 69


WorkForce Time and Attendance–Database Schema

CALC_CHANGE_SET
Identifier for the calculated set of pay period data. The CALC_CHANGE_SET key is not generated
until after the lock or the lock and calculate job has been run during pay period processing. It
enables the application to identify all records that should be processed as part of the pay
period, including records from amended timesheets that may have a different pay period end
date.

COLUMN NAME DESCRIPTION


ASGNMT A foreign key representing a single
assignment in the database.
CALC_CHANGE_SET The primary key associated with the
calculated set of pay period data.
DEST_EMP_PERIOD_VERSION A foreign key representing the destination of
the calculated data.
EMPLOYEE A foreign key representing a single employee
in the database.
CALC_CHANGE_SET table.

Page 70 © Copyright WorkForce Software


WorkForce Time and Attendance

Tables Related to Line Approvals


LINE_APPROVAL_EVENT
The events and details related to line approvals.

There are many of the same columns in TIME_SHEET_DETAIL and


LINE_APPROVAL_EVENT as TIME_SHEET_DETAIL is the source for this
information. The following highlights the additional columns in
LINE_APPROVAL_EVENT and is followed by the common columns.

COLUMN NAME DESCRIPTION


COMMENTS Comments pertaining to the record.
EMPLOYEE_PERIOD_VERSION A foreign key representing the version of the employee
period.
NEW_LINE_APPROVAL_LEVEL The line approval level after the event (0-99).
LINE_EVENT_DTTM The date/time of the line approval event record.
LINE_EVENT_TYPE The type of the line approval event.
CHOICE_ID: LINE_APPROVAL_EVENT_TYPE
LINE_EVENT_USER The APP_USER associated with who created the event.
DETAIL_RECORD_ID The DETAIL_RECORD_ID from the TIME_SHEET_DETAIL
view.
LINE_APPROVAL_EVENT table

© Copyright WorkForce Software, LLC Page 71


WorkForce Time and Attendance–Database Schema

COLUMN NAME DESCRIPTION


AMOUNT If the time slice is associated with an amount instead of
hours.
COMMENTS The time slice level comments entered by a user.
EMPLOYEE_PERIOD_VERSION A foreign key representing the version of the employee
period.
END_DTTM The end date/time of the time slice.
END_DTTM_DST_FALLBACK A Boolean column indicating whether the end date/time of
the time slice occurred during the daylight savings fallback
period.
HOURS The elapsed hours associated with the time slice.
LD1 through LD10 Any labor distribution associated with the time slice.
LINE_APPROVAL_LEVEL The original line approval level before the event (0-99).
PAY_CODE A foreign key representing the pay code associated with
the time slice.
START_DTTM The start date/time of the time slice.
START_DTTM_DST_FALLBACK A Boolean column indicating whether the start date/time
of the time slice occurred during the daylight savings
fallback period.
TIME_OFF_REQUEST The TIME_OFF_REQEST if the time slice is associated with
time off.
WORK_DT The date the time slice took place.
Columns in common with TIME_SHEET_DETAIL view

Page 72 © Copyright WorkForce Software


WorkForce Time and Attendance

ROUTING_TABLE
The definition of the routing information used to determine which lines to display to the user.

COLUMN NAME DESCRIPTION


APPROVER_ID The APP_USER of the approver.
DESCRIPTION The description of the record.
LINE_ROLE The line role for the user.
MATCH_POLICY The policy ID of the match policy linked to the record.
MATCH_VALUE The calculated value of the TIME_SHEET_DETAIL match value.
MAX_APPROVAL_LEVEL The maximum approval level available to the approver.
MIN_APPROVAL_LEVEL The minimum approval level available to the approver.
NEXT_APPROVAL_LEVEL The approval level of the row if the approver approves the row.
REJECT_APPROVAL_LEVEL The approval level of the row if the approver rejects the row.
RIGHT_TYPE An indicator if the approver is a primary or a backup.
CHOICE_ID: RIGHT_TYPE
ROUTING_TABLE table.

TIME_SHEET_DETAIL_MATCH_VAL
Ties the TIME_SHEET_DETAIL and ROUTING_TABLE information together for line access.
Records only exist for open or amended timesheets.

There are many of the same columns in TIME_SHEET_DETAIL and


LINE_APPROVAL_EVENT as TIME_SHEET_DETAIL is the source for this
information. The following highlights the additional columns in
LINE_APPROVAL_EVENT and is followed by the common columns.

COLUMN NAME DESCRIPTION


DETAIL_ID The DETAIL_RECORD_ID from the TIME_SHEET_DETAIL view.
TIME_SHEET_DETAIL_MATCH_VAL table

© Copyright WorkForce Software, LLC Page 73


WorkForce Time and Attendance–Database Schema

COLUMN NAME DESCRIPTION


MATCH_POLICY The policy ID of the match policy linked to the record.
MATCH_VALUE The calculated value of the TIME_SHEET_DETAIL match value.
Columns in common with ROUTING_TABLE table.

Page 74 © Copyright WorkForce Software


WorkForce Time and Attendance

Tables Related to Off Cycle


OFF_CYCLE_REQUEST
off-cycle information for an employee assignment. Each record represents an off-cycle request
which can span current and/or past periods with approved amendments.
COLUMN NAME DESCRIPTION
ASGNMT A foreign key representing a single assignment in the database.
CALC_CHANGE_SET A foreign key representing the calculated set of pay period data.
OFF_CYCLE_BATCH_ID A foreign key representing the off-cycle export batch request.
OFF_CYCLE_ID The primary key associated with the off-cycle request.
PPEND_PAID The end date of the pay period in which the off-cycle request will
be paid.
REQUEST_DT The date the off-cycle request was initiated.
STATUS The status of the off-cycle processing.
CHOICE_ID: OFF_CYCLE_REQUEST_STATUS
TARGET_EPV A foreign key representing the version of the employee period.
OFF_CYCLE_REQUEST table

OFF_CYCLE_EXPORT_BATCH
Off-cycle export details including the type of payroll export used.
COLUMN NAME DESCRIPTION
ADP_EXPORT Set if the export type = ‘ADP_EXPORT’
ASGNMT_GRP A foreign key representing a single assignment group in the
database.
BATCH_STATUS The status of the export batch.
CHOICE_ID: OFF_CYCLE_BATCH_STATUS
CLOSED_DT The date when the export batch was closed.
COMMENTS Comments about the export batch.
CREATION_DT The date the export batch was created.
DESCRIPTION The description of the export batch.
EXPORT_TYPE The type of export used to pay the export batch.
CHOICE_ID: OFF_CYCLE_EXPORT_TYPE
GENERIC_EXPORT_POLICY Set if the export type = ‘GENERIC_EXPORT’
OFF_CYCLE_BATCH_ID The primary key associated with the export batch.
ORACLE_EXPORT_POLICY Set if the export type = ‘ORACLE_PAYROLL_EXPORT’
OFF_CYCLE_EXPORT_BATCH table

© Copyright WorkForce Software, LLC Page 75


WorkForce Time and Attendance–Database Schema

Definition Tables and Views Related to Timesheets


PAY_CODE
A definition table for all possible pay codes in the application.

COLUMN NAME DESCRIPTION


PAY_CODE The primary key representing the pay code.
SHORT_DESCRIPTION The text description of the pay code.
PAY_CODE table

LD1 through LD100


Views of the definition tables for all the possible labor distribution associated with the
Timesheet tables. The tables may additionally be used for other purposes such as staging tables
for imports and exports; it is dependent on the configuration. The LD views do not define Labor
Distribution from the EMPLOYEE and ASGNMT views.

COLUMN NAME DESCRIPTION


DESCRIPTION The text description of the Labor Distribution code.
EFF_DT The effective date of the record.
END_EFF_DT The end effective date of the record.
LD1 The primary key associated with the Labor Distribution.
LD2 through LD10 Configurable labor distribution, capable of storing all data
types except date or date/time.
OTHER_BOOLEAN1 through Configurable Boolean data type columns.
OTHER_BOOLEAN10
OTHER_DATE1 through Configurable date data type columns.
OTHER_DATE10
OTHER_DATETIME1 through Configurable date/time data type columns.
OTHER_DATETIME10
OTHER_NUMBER1 through Configurable number type columns.
OTHER_NUMBER10
OTHER_STRING1 through Configurable string type data columns.
OTHER_STRING10
LD1 through LD100 views

Page 76 © Copyright WorkForce Software


WorkForce Time and Attendance

WFS_SYS_CURRENCY_INFO
A definition table of information for all supported currencies in the application.

COLUMN NAME DESCRIPTION


CURRENCY_CODE The three-letter code of the currency.
CURRENCY_SYMBOL The symbol used with the corresponding currency.
LOCALE_ID The country code and locale to which the record
details apply.
WFS_SYS_CURRENCY_INFO table

© Copyright WorkForce Software, LLC Page 77


WorkForce Time and Attendance–Database Schema

Tables Related to Exceptions


TIME_SHEET_EXCEPTION
All information related to exceptions that occur on a timesheet.
COLUMN NAME DESCRIPTION
EMPLOYEE_PERIOD_VERSION A foreign key representing the version of the employee
period.
EXCEPTION_CODE A foreign key representing the exception code that was
triggered.
EXCEPTION_DATE The date the exception was triggered (not the day of the
exception).
EXCEPTION_ID The primary key of the exception.
EXCEPTION_RULE The rule that triggered the exception.
MESSAGE_REPORT The actual message displayed to the user.
SCHEDULE_DETAIL_RECORD_ID If the exception is associated with a schedule record, the
DETAIL_RECORD_ID from the SCHEDULE_DETAIL view.
SEVERITY_REPORT The severity level of the exception.
CHOICE_ID: EXCEPTION_SEVERITY
TIME_SHEET_DETAIL_RECORD_ID If the exception is associated with a time slice, the
DETAIL_RECORD_ID from the TIME_SHEET_DETAIL view.
TIME_SHEET_DETAIL_SPLIT_ID If the exception is associated with a time slice, the
DETAIL_RECORD_ID from the TIME_SHEET_DETAIL_SPLIT
view.
TIME_SHEET_EXCEPTION table

EXCEPTION_CODE
A definition table for all possible exceptions that can occur in the application.

COLUMN NAME DESCRIPTION


EXCEPTION_CODE The primary key associated with the
exception code.
SHORT_DESCRIPTION The text description of the exception code.
EXCEPTION_CODE table

Page 78 © Copyright WorkForce Software


WorkForce Time and Attendance

Lesson 4 Exercises

Let’s Practice
Exercise 1: Query Writing – Employee Timesheet Information
Design a query that will return the following columns:
• Employee ID
• Employee Name (First & Last)
• Assignment Description (multiple assignment configurations only)
• Work Date
• Start Time
• End Time
• Pay Code Description
• Hours
• Pay

Let’s Practice
Exercise 2: Query Writing – Employee Timesheet Exceptions
Design a query that will return the following columns:
• Employee ID
• Employee Name (First & Last)
• Assignment Description (multiple assignment configurations only)
• Exception Date
• Exception Code
• Exception Message

© Copyright WorkForce Software, LLC Page 79


WorkForce Time and Attendance–Database Schema

Lesson 4 Review
1. True or False: The CALC_CHANGE_SET key is created before the calculate job is run.

2. What column is the key in every LD view?


a) Description
b) LD2
c) LD1
d) The corresponding LD column to the view
e) LD4

3. What view would you query against to find exactly what the employee entered on their
timesheet?

4. What is the meaning of each of these transaction types from TIME_SHEET_OUTPUT?


a) 10—
b) 20—
c) 30—

5. What is the meaning of each of these approval levels from TIME_SHEET?


a) 0—
b) 1—
c) 45—
d) 99—
e) 100—

6. True or False: The APPROVAL_EVENT table only holds information pertaining to the
approval of timesheets.

Page 80 © Copyright WorkForce Software


WorkForce Time and Attendance

5. Accrual Management Tables


This chapter includes the following key sections:
• Tables related to Accrual Management
• How to find the Current Balance
• Tables related to Time Off Requests
• Accrual Management Tables Relationships
• Time Off Request Tables Relationships

© Copyright WorkForce Software, LLC Page 81


WorkForce Time and Attendance–Database Schema

Accrual Management Table and View Relationships

EMPLOYEE

EMPLOYEE

ASGNMT_
MASTER

EMPLOYEE ASGNMT

CEPV EMPLOYEE_ CEPV


= EPV PERIODS = EPV

BANK_
BANK_
OUTPUT_
OUTPUT
SUMMARY

BANK BANK BANK

CEPV =
CALC_EMP_PERIOD_VERSION
EPV = EMPLOYEE_PERIOD_VERSION

Page 82 © Copyright WorkForce Software


WorkForce Time and Attendance

Time Off Request Table and View Relationships

ASGNMT_
EMPLOYEE EMPLOYEE
MASTER

EMPLOYEE
EMPLOYEE
TIME_OFF_
REQUEST ASGNMT

TIME_OFF_REQUEST TIME_OFF_REQUEST

TIME_OFF_ TIME_OFF_
REQUEST_ REQUEST_
DETAIL EVENT

TIME_OFF_REQUEST TIME_OFF_REQUEST

TIME_SHEET_ SCHEDULE_
DETAIL DETAIL

© Copyright WorkForce Software, LLC Page 83


WorkForce Time and Attendance–Database Schema

Tables related to Accrual Management


BANK
A definition table of all the possible accrual banks an employee can use. There may also be
banks that the system uses “behind the scenes” that will never be visible to an employee.

COLUMN NAME DESCRIPTION


BANK The primary key associated with the accrual bank.
SHORT_DESCRIPTION The text description of the accrual bank.
BANK table

BANK_OUTPUT
A transactional table which stores all details about activity which affects bank balances. The
actual balance is not stored in this table, only the detailed activity.

COLUMN NAME DESCRIPTION


ACCRUED The amount accrued during the event, if any.
ACT_CASE A foreign key representing the absence case.
BANK A foreign key representing the bank affected by the event.
CLEARED The amount cleared during the event, if any.
EMPLOYEE_PERIOD_VERSION A foreign key representing the version of the employee
period.
EVENT_DATE The date the event took place.
EVENT_ORDER Used to sequence the events for a specific EVENT_DATE.
EVENT_TYPE The type of event.
CHOICE_ID: BANK_EVENT_TYPE
IMPORTED The amount imported during the event, if any.
PAY_CODE A foreign key representing the pay code associated with
the event.
TERMINATED The amount terminated during the event, if any.
TIME_OFF_REQUEST A foreign key representing the time off request for a usage
event.
TRANSFERRED The amount transferred during the event, if any.
USED The amount used during the event, if any.
BANK_OUTPUT table

Page 84 © Copyright WorkForce Software


WorkForce Time and Attendance

BANK_OUTPUT_SUMMARY
A transactional table which stores all details about bank balances. One row is inserted into this
table at the beginning of each pay period to keep track of the balance. Additional rows are
inserted if there is any activity during the period.

COLUMN NAME DESCRIPTION


ACCRUED The amount accrued during the event, if any.
BALANCE The ending balance of the bank, after the event took place.
BANK A foreign key representing the bank affected by the event.
CLEARED The amount cleared during the event, if any.
EMPLOYEE_PERIOD_VERSION A foreign key representing the version of the employee
period.
INITIAL_BALANCE The beginning balance of the bank, before the event took
place.
TERMINATED The amount terminated during the event, if any.
TRANSFERRED The amount transferred during the event, if any.
USED The amount used during the event, if any.
WORK_DT The date the event took place.
BANK_OUTPUT_SUMMARY table

How to find the Current Balance


The BANK_OUTPUT_SUMMARY table does not contain a row for every day in the pay period. To
find the most current balance, the maximum work date needs to be obtained. To do this, utilize
the SQL below.
select ep.employee, bos.bank, bos.balance

from bank_output_summary bos,

employee_periods ep

where bos.employee_period_version = ep.calc_emp_period_version

and sysdate between ep.pp_begin and ep.pp_end + 1

and bos.work_dt = (

select max(bos2.work_dt)

from bank_output_summary bos2

where bos.bank = bos2.bank

and bos2.employee_period_version = ep.calc_emp_period_version

and bos2.work_dt <= sysdate

© Copyright WorkForce Software, LLC Page 85


WorkForce Time and Attendance–Database Schema

Tables Related to Time Off Requests


TIME_OFF_REQUEST
A transactional table which stores high-level information about a time off request.
COLUMN NAME DESCRIPTION
ACT_CASE A foreign key representing the absence case.
ASGNMT A foreign key that identifies a single
assignment in the database.
ATTACHMENT_COUNT The number of attachments for this request.
COMMENTS Any comments entered by the user about the
request.
DESCRIPTION A description of the record.
EMPLOYEE A foreign key representing a single employee
in the database.
END_DATE The end date of the request.
HOURS_REQUESTED The total hours requested off, across all detail
records.
REQUEST_MADE_AT The date and time when the request was
made.
START_DATE The start date of the request.
STATUS The current status of the request.
CHOICE_ID: TIME_OFF_REQUEST_STATUS
TIME_OFF_REQUEST The primary key representing the request.
TIME_OFF_REQUEST table

Page 86 © Copyright WorkForce Software


WorkForce Time and Attendance

TIME_OFF_REQUEST_DETAIL
A transactional table which stores detailed information about a time off request. The
information generated in this table is moved to the appropriate schedule and/or timesheet
tables/views once a time off request is approved.

There are many of the same columns in TIME_OFF_REQUEST_DETAIL that are in


both SCHEDULE_DETAIL and TIME_SHEET_DETAIL. The following highlights the
columns which are unique to this table and is followed by the common columns.

COLUMN NAME DESCRIPTION


SCHEDULE_DETAIL_RECORD_ID A foreign key relating to DETAIL_RECORD_ID in the
SCHEDULE_DETAIL view.
TIME_SHEET_DETAIL_RECORD_ID A foreign key relating to DETAIL_RECORD_ID in the
TIME_SHEET_DETAIL view.
TIME_OFF_REQUEST_DETAIL table

COLUMN NAME DESCRIPTION


COMMENTS The time slice level comments entered by a user.
END_DTTM The end date/time of the time slice.
END_DTTM_DST_FALLBACK A Boolean column indicating whether the end
date/time of the time slice occurred during the daylight
savings fallback period.
HOURS The elapsed hours associated with the time slice.
LD1 through LD10 Any labor distribution associated with the time slice.
PAY_CODE A foreign key representing the pay code associated
with the time slice.
START_DTTM The start date/time of the time slice.
START_DTTM_DST_FALLBACK A Boolean column indicating whether the start
date/time of the time slice occurred during the daylight
savings fallback period.
TIME_OFF_REQUEST A foreign key representing the time off request if the
time slice is associated with time off.
WORK_DT The date the time slice took place.
Columns in column with TIME_SHEET_DETAIL and SCHEDULE_DETAIL

© Copyright WorkForce Software, LLC Page 87


WorkForce Time and Attendance–Database Schema

TIME_OFF_REQUEST_EVENT
A transactional table which tracks the status changes of a time off request.

COLUMN NAME DESCRIPTION


EVENT_COMMENTS Any comments entered by the user who initiated the
event.
EVENT_DTTM The date and time when the event took place.
EVENT_USER A foreign key to APP_USER which identifies who
initiated the event.
STATUS The status associated with the event.
CHOICE_ID: TIME_OFF_REQUEST_STATUS
TIME_OFF_REQUEST A foreign key representing the request.
TIME_OFF_REQUEST_EVENT table

Page 88 © Copyright WorkForce Software


WorkForce Time and Attendance

Lesson 5 Exercises

Let’s Practice
Exercise 1: Query Writing – Employee Accrual Activity
Design a query that will return the following columns:
• Employee ID
• Employee Name (First & Last)
• Assignment Description (multiple assignment configurations only)
• Bank Description
• Activity Date
• Accrued Hours
• Used Hours

Let’s Practice
Exercise 2: Query Writing – Employee Time Off Requests
Design a query that will return the following columns:
• Employee ID
• Employee Name (First & Last)
• Assignment Description (multiple assignment configurations only)
• Work Date
• Pay Code
• Hours

© Copyright WorkForce Software, LLC Page 89


WorkForce Time and Attendance–Database Schema

Lesson 5 Review
1. What is the difference between BANK_OUTPUT and BANK_OUTPUT_SUMMARY?

2. True or False: The BANK_OUTPUT_SUMMARY table has a row for every day in the pay
period.

3. What column from TIME_OFF_REQUEST stores when the request was made?
a) START_DATE
b) END_DATE
c) SYSTEM_TIMESTAMP
d) REQUEST_MADE_AT
e) It is not stored in this table

4. What is the purpose of the TIME_OFF_REQUEST_EVENT table?

Page 90 © Copyright WorkForce Software


WorkForce Time and Attendance

6. Schedule Tables and View


This chapter includes the following key sections:
• Schedule Templates vs. Schedule Cycles
• Tables and View Related to Schedule
• Schedule Table and View Relationships

This section references WorkForce Time and Attendance Scheduling. This section does not
cover aspects of WorkForce Forecasting and Scheduling or Advanced Scheduler.

Schedule Templates vs. Schedule Cycles


Schedule Template
• A single template that represents a single pay period.
• The template can be assigned to an employee and be utilized to generate the employee’s
schedule for any length of time.

Schedule Cycle
• A collection of schedule templates that represent a period of time.
• The cycle can be assigned to an employee and be utilized to generate the employee’s
schedule for the length of the cycle.

© Copyright WorkForce Software, LLC Page 91


WorkForce Time and Attendance–Database Schema

Schedule Table and View Relationships

EMPLOYEE

EMPLOYEE

ASGNMT_
MASTER

EMPLOYEE ASGNMT
Calc EPV =
CALC_EMP_PERIOD_VERSION
EMPLOYEE_ EPV = EMPLOYEE_PERIOD_VERSION
PERIODS
Calc EPV Calc EPV
= EPV = EPV

SCHEDULE_
SCHEDULE_
GENERATION EPV
DETAIL
_DTL

SCHEDULE_
GENERATED_FROM_TEMPLATE
CYCLE
= SCHEDULE_TEMPLATE
= ID

SCHEDULE_ SCHEDULE_
TEMPLATE CYCLE

SCHEDULE_TEMPLATE ID

SCHEDULE_ SCHEDULE_
HOURS_FORMULA
TEMPLATE_ FORMULA CYCLE_
= FORMULA
DETAIL DETAIL

Page 92 © Copyright WorkForce Software


WorkForce Time and Attendance

Tables and a View Related to Schedule


SCHEDULE_TEMPLATE
A definition table of all schedule templates that have been defined in the Policy Editor.

COLUMN NAME DESCRIPTION


BIWEEKLY A Boolean field indicating whether the
schedule template is for a biweekly
schedule.
EFF_DT The effective date of the current record.
END_EFF_DT The end effective date of the current record.
HIDE_FROM_SCHEDULE_SCREEN A Boolean field indicating whether to show
the schedule template on the schedule
assignment screen.
SCHEDULE_TEMPLATE A primary key which represents the schedule
template.
SHORT_DESCRIPTION The text description of the schedule
template.
WEEK_START The display start of week.
CHOICE_ID: DAY_OF_WEEK
SCHEDULE_TEMPLATE table

© Copyright WorkForce Software, LLC Page 93


WorkForce Time and Attendance–Database Schema

SCHEDULE_TEMPLATE_DETAIL
A definition table which details each of the schedule templates that have been defined in the
Policy Editor.

There are many of the same columns in SCHEDULE_TEMPLATE_DETAIL that are in


SCHEDULE_DETAIL. The columns which are unique to this table are highlighted
below and followed by the common columns.

COLUMN NAME DESCRIPTION


DAY_NUMBER The number of the day represented by the record.

Valid Values are 1 – 7 for weekly and 1 – 14 for bi-weekly


templates. 1 is for Sunday, 2 is Monday and so on. 7 is
Saturday. For bi-weekly templates, 8 is Sunday of second week,
9 is Monday and so on.

END_DAY_NUMBER The number of the last day of the entire template.


END_TM A template for the shift end time of the record.
SCHEDULE_TEMPLATE A foreign key representing the schedule template.
START_DAY_NUMBER The number of the first day of the entire template.
START_TM A template for the shift start time of the record.
SCHEDULE_TEMPLATE_DETAIL table

COLUMN NAME DESCRIPTION


AMOUNT If the time slice is associated with
an amount instead of hours.
COMMENTS The time slice level comments.
HOURS_FORMULA A foreign key representing the
hours formula for the elapsed
hours associated with the time
slice.
LD1 through LD10 Any labor distribution associated
with the time slice.
PAY_CODE A foreign key representing the pay
code associated with the time
slice.
Columns in common with SCHEDULE_DETAIL

Page 94 © Copyright WorkForce Software


WorkForce Time and Attendance

FORMULA
A table of user defined formulas.

COLUMN NAME DESCRIPTION


EFF_DT The effective date of the record.
END_EFF_DT The end effective date of the record.
FORMULA A primary key which represents the formula.
FORMULA_TEXT The text representation of the formula.
FORMULA table

SCHEDULE_CYCLE
A definition table of all schedule cycles that have been defined in the Policy Editor.

COLUMN NAME DESCRIPTION


HIDE_FROM_SCHEDULE_SCREEN A Boolean field indicating whether to show the schedule
cycle on the schedule assignment screen.
ID A primary key which represents the schedule cycle.
SHORT_DESCRIPTION The text description of the schedule cycle.
SCHEDULE_CYCLE table

SCHEDULE_CYCLE_DETAIL
A definition table which details each of the schedule cycles that have been defined in the Policy
Editor.

COLUMN NAME DESCRIPTION


ID A foreign key representing the schedule cycle.
SEQUENCE The sequence week of the schedule cycle.
SCHEDULE_TEMPLATE A foreign key representing the schedule template to be
utilized for that week in the sequence.
SCHEDULE_CYCLE_DETAIL table

© Copyright WorkForce Software, LLC Page 95


WorkForce Time and Attendance–Database Schema

SCHEDULE_GENERATION_DTL
A transactional table which stores high-level information related to an employee’s schedule for
each pay period.

COLUMN NAME DESCRIPTION


EMPLOYEE_PERIOD_VERSION A foreign key representing the version of the employee
period.
EFF_DT The effective date of the record.
END_EFF_DT The end effective date of the record.
GENERATED_FROM_TEMPLATE A foreign key representing the schedule template used
to generate the schedule.
SCHEDULE_CYCLE A foreign key representing the SCHEDULE_CYCLE.ID.
SCHEDULE_CYCLE_SEQUENCE The sequence template of the schedule cycle.
SCHEDULE_GENERATION_SOURCE The source of the schedule.
CHOICE_ID: SCHED_GEN_SOURCE
Choice Label Constant
Value
4 Schedule Sched_gen_source_SCHEDULE_CYCLE
Cycle
6 Schedule Sched_gen_source_SCHEDULE_DISABLED
Disabled
1 Schedule Sched_gen_source_SCHEDULE_TEMPLATE
Template
8 Advanced Sched_gen_source_ADVANCED_SCHEDULER
Scheduler

SCHEDULE_GENERATION_DTL table

Page 96 © Copyright WorkForce Software


WorkForce Time and Attendance

SCHEDULE_DETAIL
A view of the transactional table which stores all detailed records about an employee’s
schedule.

There are many of the same columns in SCHEDULE_TEMPLATE_DETAIL that are in


SCHEDULE_DETAIL. The columns which are unique to this table are highlighted
below and followed by the common columns.

COLUMN NAME DESCRIPTION


AMOUNT If the time slice is associated with an amount instead of
hours.
COMMENTS The time slice level comments.
EMPLOYEE_PERIOD_VERSION A foreign key representing the version of the employee
period.
END_DTTM The end date/time of the time slice.
END_DTTM_DST_FALLBACK A Boolean column indicating whether the end date/time
of the time slice occurred during the daylight savings
fallback period.
HOURS The elapsed hours associated with the time slice.
LD1 through LD10 Any labor distribution associated with the time slice.
PAY_CODE A foreign key representing the pay code associated with
the time slice.
START_DTTM The start date/time of the time slice.
START_DTTM_DST_FALLBACK A Boolean column indicating whether the start date/time
of the time slice occurred during the daylight savings
fallback period.
TIME_OFF_REQUEST The TIME_OFF_REQEST if the time slice is associated with
time off.
WORK_DT The date the time slice took place.
Columns in common with TIME_SHEET_DETAIL.

© Copyright WorkForce Software, LLC Page 97


WorkForce Time and Attendance–Database Schema

Lesson 6 Exercises

Let’s Practice
Exercise 1: Query Writing – Employee Schedule Information
Design a query that will return the following columns:
• Employee ID
• Employee Name (First & Last)
• Assignment Description (multiple assignment configurations only)
• Scheduled Work Date
• Scheduled Start Time
• Scheduled End Time
• Scheduled Pay Code Description
• Scheduled Hours

Let’s Practice
Exercise 2: Query Writing – Schedule Template Usage
Design a query that will return the following columns:
• Pay Period End
• Schedule Template Description
• Count of Employees using Schedule Template

Page 98 © Copyright WorkForce Software


WorkForce Time and Attendance

Lesson 6 Review
1. What is the difference between a schedule template and a schedule cycle?

2. True or False: Querying the SCHEDULE_TEMPLATE_DETAIL table will give you employee specific
schedule information.

3. How can you tell which template in a schedule cycle the employee is currently in?

4. Where can you view the details of a schedule template or schedule cycle other than the database
table?

© Copyright WorkForce Software, LLC Page 99


WorkForce Time and Attendance–Database Schema

7. Data Collection Devices Tables and View


This chapter includes the following key sections:
• Tables and View Related to Data Collection Devices
• Data Collection Device Types
• Data Collection Device Table and View Relationships

Page 100 © Copyright WorkForce Software


WorkForce Time and Attendance

Data Collection Device Types


1. WebClock
• Requires no special equipment, included with the software
• Configuration is necessary to use the feature
• All WebClock transactions are stored in SWIPE with a CLOCK_ID like WEBCLOCK

WorkForce T&A 1000, 2000, 2100, 2200, 3000, 4000, 5000 & WorkForce T&A
Hand Recognition Terminal

WorkForce T&A 1000 Terminal WorkForce T&A 2000 Terminal WorkForce T&A 2100 Severe Duty
Terminal

WorkForce T&A 3000 Self-Service


WorkForce T&A 2200 Terminal Terminal WorkForce T&A 4000 Series

WorkForce T&A Hand Recognition


Terminal WorkForce T&A 5000

© Copyright WorkForce Software, LLC Page 101


WorkForce Time and Attendance–Database Schema

• Requires special equipment and configuration

• Only successful transactions (those where the employee completes identification,


verification and data collection steps at the terminal) are imported from a terminal
controller device into the SWIPE_IMPORT_STAGING_TABLE table. There is a scheduled
script (SWIPE_IMPORT) that feeds transactions to swipe processing to be posted onto
TIME_SHEET_DETAIL if successful. When using release 2.6 or later of the terminal software,
the staging table is no longer used. Swipes are stored in near real time in SWIPE and
TIME_SHEET_DETAIL.

• Before version 15.x, there used to be a scheduled job run every x minutes to import swipe
data. Upon release 15.x and higher, a web service runs and imports swipe data real time.
Badge updates still require a scripted job to be run. Badge Update - HR system has badge
update where there is an interface (used to be a strip query) now under run job will update
the badge table.

• The result of processing transactions is recorded on SWIPE.

• Information about the devices themselves is not stored in the WorkForce T&A database,
only in the terminal controller device. Some terminal information is recorded to the
transaction and may be optionally written to TIME_SHEET_DETAIL in the same manner as
labor distribution data.

• Employee badge information is stored in the BADGE table and badges are grouped together
in the BADGE_GROUP table. The BADGE table contains a list of active badge records to be
distribute to the terminal controller.

A BADGE_IMPORT scheduled script populates the BADGE table

Notes:
As of version 18.3, the swipe table is included in the Clean Table policy. Records in
the table are kept for 366 days by default

Page 102 © Copyright WorkForce Software


WorkForce Time and Attendance

2. WorkForce T&A Mobile

WorkForce T&A Mobile

• HTML5-based web application for Android, Apple and BlackBerry 10 devices

• Transactions are fed directly to swipe processing to be posted on TIME_SHEET_DETAIL just


like WebClock transactions

The result of processing transactions is recorded in SWIPE

© Copyright WorkForce Software, LLC Page 103


WorkForce Time and Attendance–Database Schema

3. USB Fingerprint Devices

WorkForce T&A USB Fingerprint Device

• Requires special equipment and configuration


• Template information is stored in the BIOMETRIC_TEMPLATE table
• Usage information is stored in the BIOMETRICS table
• This device is used for authentication in to the application and is not associated with specific
time slices.
• Data Collection Devices Fingerprinting Biometrics are used for verification, not
identification.

4. WorkForce T&A Interactive Voice Response (IVR)

WorkForce T&A Interactive Voice Response

• Requires special equipment and configuration


• IVR transactions are transmitted via web services (IVR_TRANSACTIONS) or for new
customers (E2G_extendedPunch) fed from a CSV file via scheduled script (IVR_IMPORT) to
swipe processing to be written to TIME_SHEET_DETAIL.

The result of processing IVR transactions is recorded in SWIPE

Page 104 © Copyright WorkForce Software


WorkForce Time and Attendance

Data Collection Device Table and View Relationships

© Copyright WorkForce Software, LLC Page 105


WorkForce Time and Attendance–Database Schema

Tables and View Related to Data Collection Devices


SWIPE
A view of the transactional table which records all transactions made by an employee at a data
collection device.

COLUMN NAME DESCRIPTION


ASGNMT A foreign key representing the assignment associated with
the transaction.
AUTHENTICATION_MODE Authentication Mode
Choice ID: WEBCLIENT_AUTHENTICATION_MODE
BADGE_GROUP A foreign key representing the badge group of the
employee.
BIOMETRICS_RESULT Biometric verification result – “Y” for success, “N” for
failed, null for not performed.
CLIENT_IP_ADDRESS The IP address of the client.
CLOCK_ID An identifier representing the clock utilized for the
transaction.
CREW_SHIFT_ID The ID of the shift associated with the swipe (for Crew
purposes only)
EMPLOYEE A foreign key representing a single employee in the
database.
ESTIMATED_SWIPE_TIME For offline WebClock swipes. The estimated timestamp of
the swipe as provided by the client.
EVENT_DTTM The date and time the transaction took place.
EVENT_DTTM_DST_FALLBACK A Boolean column indicating whether the swipe occurred
during the daylight savings fallback period.
EVENT_TYPE The type of transaction.
• 2: “IN” transaction
• 3: “OUT” transaction
• 4: “TRANSFER” transaction
• 5: “AUTO” transaction
EXCEPTION_CODE A foreign key representing the exception code that was
triggered.
EXCEPTION_MESSAGE The message displayed to the user at the time of the
exception.
GROUP_WEBCLOCK_MANAGER Identifies the manager who performed group punch if this
swipe source is “GROUP_WEBCLOCK”. Will be null
otherwise.

Page 106 © Copyright WorkForce Software


WorkForce Time and Attendance

ID_FIELD A foreign key representing the assignment associated with


the transaction.
LATITUDE Latitude of the punching location associated with an
WorkForce T&A Mobile.
LD1 through LD10 Any labor distribution associated with the transaction.
LONGITUDE Longitude of the punching location associated with an
WorkForce T&A Mobile.
OVERRRIDE_EXCEPTIONS Whether this punch was posted with the option to override
exceptions
PROCESS_RESULT The end result of the transaction getting processed.
CHOICE_ID: SWIPE_PROCESS_RESULT
SWIPE_ID The primary key associated with the transaction.
SWIPE_SOURCE The source of the swipe.
CHOICE ID: SWIPE_SOURCE
TIME_ZONE For WebClock swipes. The time zone of the EVENT_DTTM.
SWIPE view

© Copyright WorkForce Software, LLC Page 107


WorkForce Time and Attendance–Database Schema

BADGE
A transactional table which stores information relating each employee to a specific badge.

COLUMN NAME DESCRIPTION


APP_USER A foreign key representing the application user.
BADGE The ID of the badge (string).
BADGE_GROUP A foreign key representing the badge group that of the
employee.
BADGE_NUMBER The badge number assigned to the employee (numeric).
EFF_DTTM The effective date of the badge.
EMPLOYEE A foreign key representing a single employee in the
database.
END_EFF_DTTM The end effective date of the badge.
BADGE table

BADGE_GROUP
A transactional table which aggregates badges into groups which can then be assigned to
specific data collection devices.

COLUMN NAME DESCRIPTION


BADGE_GROUP The primary key representing the badge group.
SHORT_DESCRIPTION A text description of the badge group.
BADGE_GROUP table

Page 108 © Copyright WorkForce Software


WorkForce Time and Attendance

BIOMETRIC_TEMPLATE
Fingerprint devices.

COLUMN NAME DESCRIPTION


APP_USER A foreign key representing the application user.
SYSTEM_TIMESTAMP Record timestamp for modifications
SYSTEM_UPDATE_COUNTER Counter of record updates
DATA_SOURCE Identifies the system where the user was last enrolled.
CHOICE_ID:
BIOMETRIC_DATA_SOURCE
ENROLLED_AT_GMT The date and time in GMT when the user enrolled.
FINGER_NAME The name of the enrolled finger.
CHOICE_ID: BIOMETRIC_FINGER_NAMES
TEMPLATE The actual template of the employee’s fingerprint.
TEMPLATE_AUTHOR Who created the template?
CHOICE ID: SUPPORTED_TEMPLATE_AUTHOR
FIRMWARE_VERSION Firmware version of the hardware which created the
template
ENROLLER_EMPLOYEE Foreign key to Employee table
IS_AUTO True if this template actually specifies employee being
auto-enrolled, false otherwise
IS_DUMMY True if this template is simulated, false otherwise
BIOMETRIC_TEMPLATE table

© Copyright WorkForce Software, LLC Page 109


WorkForce Time and Attendance–Database Schema

Lesson 7 Exercises

Let’s Practice
Exercise 1: Query Writing – Employee Swipes
Design a query that will return the following columns:
• Employee ID
• Employee Name (First & Last)
• Assignment Description (multiple assignment configurations only)
• Employee Badge Number
• Swipe Type
• Swipe Date/Time

Notes:
Some employees may not have a Badge number. What SQL query writing method
can you use to ensure this query returns data, even if there is no badge ID?

Let’s Practice
Exercise 2: Query Writing – Comparing Swipes to Timesheet Entries
Design a query that will return the following columns for “in” swipes only:
• Employee ID
• Employee Name (First & Last)
• Assignment Description (multiple assignment configurations only)
• Swipe Type
• Swipe Date/Time
• Timesheet Date/Time

Page 110 © Copyright WorkForce Software


WorkForce Time and Attendance

Lesson 7 Review

1. True or False: All data collection devices store transactions in SWIPE.

5. What is the definition of each of these event types from SWIPE?


a) 2=
b) 3=
c) 4=
d) 5=

6. What is the CLOCK_ID if the transaction is related to a WebClock?


a) CLOCK_1
b) __WEBCLOCK__
c) INTERNET
d) W_CLOCK
e) CLOCK_2

7. True or False: The exact time from SWIPE is transferred to the timesheet.

© Copyright WorkForce Software, LLC Page 111


WorkForce Time and Attendance–Database Schema

8. Helpful System Tables and View


This lesson includes the following key sections:

• Tables and View Related to Application Users


• Application Users Table and View Relationships
• How to Use Tables Related to System Values
• Tables Related to System Values
• Master Dates Table and Related Function

Page 112 © Copyright WorkForce Software


WorkForce Time and Attendance

Application Users Table and View Relationships

© Copyright WorkForce Software, LLC Page 113


WorkForce Time and Attendance–Database Schema

Tables Related to Application Users


APP_USER
A view of the definition table for all the users that have access to the application.
COLUMN NAME DESCRIPTION
APP_USER The primary key representing the application user.
BO_USER_ID The Login ID which is utilized when using Analytics ad-hoc
reporting.
CITY The city portion of the address of the application user.
COUNTRY_CODE The two letter country code representing the country of the
application user.
EMAIL_ADDRESS The email address of the application user.
EMPLOYEE A foreign key representing a single employee in the database.
FIRST_NAME The first name of the application user.
LAST_LOGIN_DTTM The date/time of the last login of the application user.
LAST_NAME The last name of the application user.
LOCKED_OUT A Boolean field indicating if the user is locked out of the
application.
LOGIN_HISTORY_ID A foreign key representing the last login.
LOGIN_ID The Login ID of the application user.
MAIL_ADDRESS_LINE_1 & The street address of the application user.
MAIL_ADDRESS_LINE_2
MIDDLE_NAME The middle name of the application user.
ORGANIZATIONAL_UNIT The organizational unit of the application user.
PHONE_NUMBER The phone number of the application user.
STATE_PROVINCE The state or province portion of the address of the application
user.
TIME_ZONE The time zone in which the application user is located.
ZIP_POSTAL_CODE The postal code portion of the address of the application user.
APP_USER view

APP_USER_RIGHT
A definition table which defines which roles each application user can utilize in the application.

COLUMN NAME DESCRIPTION


ALLOW_REDELEGATION A Boolean column indicating whether the role can be re-
delegated.

Page 114 © Copyright WorkForce Software


WorkForce Time and Attendance

APP_USER A foreign key representing to which application user the role


belongs.
APP_USER_RIGHT The primary key representing the use role.
ASGNMT_GRP A foreign key representing a single assignment group in the
application.
DELEGATED A Boolean column indicating whether the role was delegated.
DELEGATED_BY A foreign key representing the application user who delegated
the role.
EFF_DT The effective date of the role.
END_EFF_DT The end effective date of the role.
RIGHT_GRP A foreign key representing the role.
APP_USER_RIGHT table

RIGHT_GRP
All the roles available in the application.

COLUMN NAME DESCRIPTION


RIGHT_GRP The primary key representing the role.
SHORT_DESCRIPTION A text description of the role.
RIGHT_GRP table

© Copyright WorkForce Software, LLC Page 115


WorkForce Time and Attendance–Database Schema

RIGHT_GRP_DETAIL
A definition table which defines all the elements of each role.

COLUMN NAME DESCRIPTION


RIGHT_GRP A primary key representing the role.
SYSTEM_FEATURE A foreign key representing the aspect of the role.
RIGHT_GRP_DETAIL table

LOGIN_HISTORY
A transactional table tracking each login to the application.

COLUMN NAME DESCRIPTION


APP_USER A foreign key representing the application
user who logged in.
IP_ADDRESS The IP Address where the login took place.
LAST_LOGIN_TIME The date/time associated with the login.
LOGIN_AS A foreign key representing the login id if the
user logged in as someone other than
themselves.
LOGIN_HISTORY_ID The primary key representing the login.
LOGIN_ID A foreign key representing the login id of the
application user.
LOGIN_SUCCESSFUL A Boolean column representing whether the
login was successful.
REASON A text description for whether the login was
successful.
LOGIN_HISTORY table

Page 116 © Copyright WorkForce Software


WorkForce Time and Attendance

How to Use Tables Related to System Values


Using Policy Sets Instead of Hard-Coding Values
There are many instances where a query may require a specific set of data and hard-coding the
values in the query is often done to accomplish this. For example, writing an SQL statement to
find all absences could look something like this:

select *

from TIME_SHEET_DETAIL

where PAY_CODE in (‘VACATION’, ‘PTO’, ‘JURY’, ‘SICK’)

The WorkForce T&A database allows for the creation of a “set” of policy items which in turn
allows the end-user to avoid hard-coding of values into SQL statements. This is a good idea
because the business requirements might often change and these changes can easily be
maintained in the Policy Editor instead of each SQL statement that might be associated with the
requirement.

© Copyright WorkForce Software, LLC Page 117


WorkForce Time and Attendance–Database Schema

How to Create a Policy Set:


1. Log in to WorkForce T&A
2. On the Dashboard, click Launch Admin Client. The Download Admin Client window appears.
3. Click Start Admin Client. The Login window for the Administrative Module appears.
4. Log into the Administrative Module.
5. Select Policies > Policy Editor. The Policy Editor appears.

Page 118 © Copyright WorkForce Software


WorkForce Time and Attendance

6. In the policy tree, navigate to All Policies > Policy Sets > Pay Codes > Pay Code.

7. Right click pay code and select Add New Pay Code Policy Set.

© Copyright WorkForce Software, LLC Page 119


WorkForce Time and Attendance–Database Schema

8. Create a name and description for the policy set:

9. From the left table, select a policy for the set, and then click the Move to button. The
selected policy appears in the table on the right. Repeat this step for each policy you want
to include in this set.

10. Click the Save button.

Page 120 © Copyright WorkForce Software


WorkForce Time and Attendance

11. The new policy set now appears in the policy tree.

© Copyright WorkForce Software, LLC Page 121


WorkForce Time and Attendance–Database Schema

• Once the policy set exists, it can be referenced in an SQL statement instead of using
hard-coded values.

select *

from TIME_SHEET_DETAIL tsd

where PAY_CODE in (

select RECORD_KEY

from RULE_SET rs,

RULE_SET_DETAIL rsd

where rs.RULE_SET = rsd.RULE_SET

and tsd.WORK_DT between rs.EFF_DT and rs.END_EFF_DT

and rs.RULE_SET = 'NEW_PAY_CODE_SET'

and rs.SOURCE_TABLE = 'PAY_CODE'

By using this method, the policy set can be changed multiple times without having to update
the SQL statement.

Page 122 © Copyright WorkForce Software


WorkForce Time and Attendance

Tables Related to System Values


RULE_SET
A definition table containing all policy sets that have been created in the Policy Editor.

COLUMN NAME DESCRIPTION


EFF_DT The effective date of the policy set.
END_EFF_DT The end effective date of the policy set.
RULE_SET The primary key representing the policy set.
SOURCE_TABLE The policy table which is the source of the policy set.
RULE_SET table

RULE_SET_DETAIL
A definition table containing the components of each policy set that has been created in the
Policy Editor.

COLUMN NAME DESCRIPTION


RECORD_KEY A foreign key representing the primary key from the source
table used to create the policy set.
RULE_SET A foreign key representing the policy set.
SOURCE_TABLE The policy table which is the source of the policy set.
RULE_SET_DETAIL table

V_RULE_SET_DETAIL
A view containing the components of each policy set that has been created in the Policy Editor,
but also contains the ‘END_EFF_DT’ value from the corresponding RULE_SET record.

COLUMN NAME DESCRIPTION


EFF_DT The effective date of the policy set.
END_EFF_DT The end effective date of the policy set.
RECORD_KEY A foreign key representing the primary key from the source
table used to create the policy set.
RULE_SET A foreign key representing the policy set.
SOURCE_TABLE The policy table which is the source of the policy set.
V_RULE_SET_DETAIL table

© Copyright WorkForce Software, LLC Page 123


WorkForce Time and Attendance–Database Schema

V_PAY_CODE_SET_DETAIL
This view exposes membership in Pay Code policy sets. It must be used instead of
RULE_SET_DETAIL or V_RULE_SET_DETAIL if the “Pay Code Collection” feature (available from
version 18.1 onwards) is configured. The recommended best practice for all new queries is to
use this view.

COLUMN NAME DESCRIPTION


EFF_DT The effective date of the policy set.
END_EFF_DT The end effective date of the policy set.
RECORD_KEY A foreign key representing the primary key from the source
table used to create the policy set.
PAY_CODE_COLLECTION For troubleshooting purposes
SOURCE_TABLE The policy table which is the source of the policy set.
RULE_SET The name of the policy set.
V_RULE_SET_DETAIL table

Example use, querying all TIME_SHEET_OUTPUT records whose pay code belongs to the
‘NEW_PAY_CODE_SET'’ pay code set:

select *

from TIME_SHEET_OUTPUT tso

where PAY_CODE in (

select RECORD_KEY

from V_PAY_CODE_SET_DETAIL vpsd,

where tso.WORK_DT between vpsd.EFF_DT and vpsd.END_EFF_DT

and vpsd.RULE_SET = ‘NEW_PAY_CODE_SET'’

Page 124 © Copyright WorkForce Software


WorkForce Time and Attendance

How to Display the Text Value for a System Constant


T&A database has many columns which store a system constant instead of a text description.
For example, when querying the APPROVAL_EVENT table, the EVENT_TYPE column contains a
numeric value instead of a text description:

EMPLOYEE_PERIOD_VERSION EVENT_DTTM EVENT_TYPE EVENT_USER


1222379421 9/2/08 5:47 PM 10 24
1222379424 9/2/08 5:47 PM 10 24
1222379427 9/2/08 5:47 PM 10 24
1222606512 9/8/08 1:06 PM 10 24
1222606517 9/8/08 1:06 PM 10 24
1222606521 9/8/08 1:06 PM 10 24
1222606524 9/8/08 1:06 PM 10 24
A result set with a system constant representing a text description

In order to display the text conversion of this value in an SQL statement, you must perform a
join to the CHOICE_DETAILS table. Using the example from above, the SQL statement would be
changed in the following way:

select ae.EMPLOYEE_PERIOD_VERSION, ae.EVENT_DTTM, cd.CHOICE_LABEL, ae.EVENT_USER

from APPROVAL_EVENT ae,

CHOICE_DETAILS cd

where ae.EVENT_TYPE = cd.CHOICE_VALUE

and cd.CHOICE_ID = 'APPROVAL_EVENT_TYPE'

The results now appear as this:

EMPLOYEE_PERIOD_VERSION EVENT_DTTM CHOICE_LABEL EVENT_USER


1222379421 9/2/08 5:47 PM Approval 24
1222379424 9/2/08 5:47 PM Approval 24
1222379427 9/2/08 5:47 PM Approval 24
1222606512 9/8/08 1:06 PM Approval 24
1222606517 9/8/08 1:06 PM Approval 24
1222606521 9/8/08 1:06 PM Approval 24
1222606524 9/8/08 1:06 PM Approval 24

© Copyright WorkForce Software, LLC Page 125


WorkForce Time and Attendance–Database Schema

The same results, but with the text description instead of the system constant

The correct CHOICE_ID to use in the SQL statement can be found by using the Data Dictionary,
which is discussed in Lesson 2.

CHOICES
A definition table containing all the possible constant values sets in the application.

COLUMN NAME DESCRIPTION


CHOICE_ID The primary key associated with the constant values set.
SHORT_DESCRIPTION A text description of the constant values set.
CHOICES table

CHOICE_DETAILS
A definition table containing the components of each of the constant value sets.

COLUMN NAME DESCRIPTION


CHOICE_ID A foreign key representing the constant values set.
CHOICE_LABEL A text description of the constant value option.
CHOICE_ORDER The order in which the option shows up in the application.
CHOICE_VALUE A foreign key representing the constant value.
CHOICE_DETAILS table

Master Dates Table and Custom Database Functions


The WorkForce T&A database schema includes a table named WFS_DATE which has a row for
every day between 01/01/1900 and 12/30/3000 and a table named WFS_NUMBER which has a
row for every number between 0 and 59. These two tables can be used to create date and time
ranges.
There are three database functions which can be utilized for date manipulation:

WF_ADD_HOUR
Adds hours to any date

Syntax: WF_ADD_HOUR(DATE,INT)

Page 126 © Copyright WorkForce Software


WorkForce Time and Attendance

select WF_ADD_HOUR(WFS_DATE.WFS_DATE, 3)

from WFS_DATE

where WFS_DATE.WFS_DATE = '2009-01-01'

Result: '2009-01-01 03:00:00.0'

WF_TO_DATE
Converts values to date type

Syntax: WF_TO_DATE(INT,INT,INT)

select WF_TO_DATE(2009,1,1)

from SYSTEM_SETUP

Result: '2009-01-01 00:00:00.0'

WFS_STRIP_TIMESTAMP
Converts a datetime value to a date value

Syntax: WFS_STRIP_TIMESTAMP(DATETIME)

select WFS_STRIP_TIMESTAMP(LAST_LOGIN_DTTM)

from APP_USER

Result: 2009-01-26 00:00:00.0

WF_DTTM_WITH_DST_TO_NUMBER
Converts a datetime value based on whether it occurred in the DST repeated hour to a number for
datetime comparisons

Syntax: WF_DTTM_WITH_DST_TO_NUMBER (DATETIME, CHAR)

select WF_DTTM_WITH_DST_TO_NUMBER (START_DTTM, START_DTTM_DST_FALLBACK)

from TIME_SHEET_OUTPUT

© Copyright WorkForce Software, LLC Page 127


WorkForce Time and Attendance–Database Schema

Result: 11511010103000

WF_DST_FALLBACK_NUMBER_TO_DTTM
Converts the number computed by WF_DTTM_WITH_DST_TO_NUMBER to the corresponding
datetime

Syntax: WF_DST_FALLBACK_NUMBER_TO_DTTM (DATETIME)

select WF_DST_FALLBACK_NUMBER_TO_DTTM (11511010103000)

from TIME_SHEET_OUTPUT

Result: 2015-11-01 01:30:00.0

WF_GET_DST_FALLBACK
Converts the number computed by WF_DTTM_WITH_DST_TO_NUMBER to the value of the DST
flag passed to WF_DST_FALLBACK_DTTM_TO_NUMBER

Syntax: WF_GET_DST_FALLBACK (NUMBER)

select WF_GET_DST_FALLBACK (11511010103000)

from TIME_SHEET_OUTPUT

Result: 'T'

In addition to the custom date database functions above, there are two additional custom
database functions which can be utilized to assist in query writing.

WF_NVARCHAR_TO_LONG
Converts nvarchar type to number type

Syntax: WF_NVARCHAR_TO_LONG(NVARCHAR FIELD)

select WF_NVARCHAR_TO_LONG(DISPLAY_EMPLOYEE)

from EMPLOYEE

Page 128 © Copyright WorkForce Software


WorkForce Time and Attendance

Result: 1000001

WF_LONG_TO_NVARCHAR
Converts number type to nvarchar type

Syntax: WF_LONG_TO_NVARCHAR(INT)

select WF_LONG_TO_NVARCHAR(OTHER_NUMBER1)

from EMPLOYEE

Result: '10'

Setting up and using database functions


User accounts with SaaS database access do not have access to execute database functions. As a result, when
customizing a standard report that uses database functions, it is necessary to parameterize the function call so the
necessary SQL can be setup to run in Workforce Time but also permit the report developer to execute the report
using their database access through Crystal Reports. This can be accomplished by following these steps for each
function call in the report:

1. Create a new constant type parameter in the Policy Editor for the database function call. Below is an example for
the wf_dttm_with_dst_to_number function call:

The Constant Value of the parameter should contain the full SQL text for the function call, e.g.,

wf_dttm_with_dst_to_number (tsd.start_dttm, tsd.start_dttm_dst_fallback)

2. Create a corresponding parameter in the custom Crystal Report using the Database Expert:
Parameter Name: CC_WF_DTTM_WITH_DST_TO_NUMBER_VALUE
Prompting Text: Convert DST to Number
Value Type: String
Default Value: 1

© Copyright WorkForce Software, LLC Page 129


WorkForce Time and Attendance–Database Schema

3. Replace the function call in the report query with the new parameter (be careful to leave the alias for the column,
e.g., num_start_dttm):

Change the above highlighted portion to the below highlighted portion:

4. When running the query in Crystal Reports, enter the following values for the parameters related to the function
call:
DBSCHEMA_PREFIX_VALUE: leave this parameter value blank:

CC_WF_DTTM_WITH_DST_TO_NUMBER: select the default value set previously, 1:

These customizations will permit the report to be run in Crystal Reports (without the function call) as well as permit
the function call to execute when the report is run in Workforce Time.

Page 130 © Copyright WorkForce Software


WorkForce Time and Attendance

Lesson 8 Exercises

Let’s Practice
Exercise 1: Query Writing – Login History
Design a query that will return the following columns:
• Employee ID
• Employee Name (First & Last)
• Employee Login ID
• Login Date/Time

We must login as a user who is also an employee in order to see results in this
query.

Let’s Practice
Exercise 2: Query Writing – Using a Policy Set
Design a query that will return the following columns where the exception code is
limited to a specific policy set:
• Employee ID
• Employee Name (First & Last)
• Assignment Description (multiple assignment configurations only)
• Exception Code
• Exception Date

© Copyright WorkForce Software, LLC Page 131


WorkForce Time and Attendance–Database Schema

Let’s Practice
Exercise 3: Query Writing – Displaying the Text Value for a System
Constant
Design a query using the TIME_OFF_REQUEST table which will display the text value
for STATUS instead of the numeric value:
• Employee ID
• Employee Name (First & Last)
• Assignment Description (multiple assignment configurations only)
• Start Date of Time Off
• End Date of Time Off
• Status of Request

Page 132 © Copyright WorkForce Software


WorkForce Time and Attendance

Lesson 8 Review
1. What is the difference between an application user and an employee?

2. In which of these tables would you find the details of a policy set?
a) RULE_SET
b) CHOICE_DETAILS
c) RULE_SET_DETAIL
d) CHOICES
e) APPROVAL_EVENT

3. What is the column to always join to in the CHOICE_DETAILS table?


a) CHOICE_ID
b) CHOICE_VALUE
c) CHOICE_LABEL
d) CHOICE_ORDER
e) CHOICE

© Copyright WorkForce Software, LLC Page 133


WorkForce Time and Attendance–Database Schema

Appendix A: SQL Basics

SQL Commands
SELECT/FROM
Used to obtain data from a single table or multiple tables in a database.
Syntax: SELECT {column_name}, {column_name}, {column_name}
FROM {table_name}
WT&A: SELECT display_employee, first_name, last_name
FROM employee

When multiple columns are listed in the SELECT clause, they should be
delimited with a comma (,). If the desired result is all columns from a
table, then SELECT * FROM {table_name} may be used instead of listing
each column individually.

DISTINCT
Used to obtain distinct data from a single table or multiple tables in a database.
Syntax: SELECT DISTINCT {column_name}
FROM {table_name}
WT&A: SELECT DISTINCT display_employee
FROM employee

WHERE/AND/OR
Used to conditionally obtain data from a single table or multiple tables in a database. After the
first, each condition needs to be preceded by either an ‘AND’ or an ‘OR’ keyword to identify
how they are to be evaluated.
Syntax: SELECT {column_name}, {column_name}, {column_name}
FROM {table_name}
WHERE {condition}
AND {condition}
AND ({condition} OR {condition})
WT&A: SELECT display_employee, first_name, last_name
FROM employee
WHERE status_code1 = 'A'
AND end_eff_dt = '3000-12-31'
AND (last_name = 'Brown' or first_name = 'John')

Page 134 © Copyright WorkForce Software


WorkForce Time and Attendance

When specifying a single character or string of text in an SQL statement,


the text should be enclosed in a pair of single quotes (‘). Numbers can
be referenced without additional formatting.

IN/BETWEEN/LIKE/%
Used to conditionally obtain data from a single table or multiple tables in a database.
Syntax: SELECT {column_name}, {column_name}, {column_name}
FROM {table_name}
WHERE {column_name} IN ({value1},{value2},{value3})
AND {column_name} BETWEEN {value1} and {value2}
AND {column_name} LIKE {value%}
WT&A: SELECT display_employee, first_name, last_name, status_date1
FROM employee
WHERE last_name IN ('Smith','Brown','White')
AND status_date1 BETWEEN '2007-05-01' and '2007-05-31'
AND first_name LIKE '%bet%'

NOT
Used to conditionally obtain data where the evaluated condition is false.
Syntax: SELECT {column_name}, {column_name}, {column_name}
FROM {table_name}
WHERE {column_name} NOT IN ({value1},{value2},{value3})
WT&A: SELECT display_employee, first_name, last_name, status_date1
FROM employee
WHERE last_name NOT IN ('Smith','Brown','White')

ORDER BY
Used to order the results of a select statement
Syntax: SELECT {column_name}, {column_name}, {column_name}
FROM {table_name}
ORDER BY {column_name}
WT&A: SELECT display_employee, first_name, last_name
FROM employee
ORDER BY last_name

To order by multiple columns, list the columns in the desired order, with
each column delimited by a comma (,).

© Copyright WorkForce Software, LLC Page 135


WorkForce Time and Attendance–Database Schema

AVG/COUNT/MIN/MAX/SUM
Mathematical aggregate functions that can be used to obtain calculations on data.
Syntax: SELECT AVG({column_name})
FROM {table_name}
SELECT COUNT({column_name})
FROM {table_name}
SELECT MIN({column_name})
FROM {table_name}
SELECT MAX({column_name})
FROM {table_name}
SELECT SUM({column_name})
FROM {table_name}
WT&A: SELECT AVG(hours)
FROM time_sheet_detail
SELECT COUNT(employee)
FROM employee
SELECT MIN(display_employee)
FROM employee
SELECT MAX(display_employee)
FROM employee
SELECT SUM(hours)
FROM time_sheet_detail

UPPER/LOWER
Used to convert data in a column to either upper or lower case.
Syntax: SELECT UPPER({column_name}), LOWER({column_name})
FROM {table_name}
WT&A: SELECT UPPER(last_name), LOWER(first_name)
FROM employee

GROUP BY
Used to aggregate mathematical functions by certain data elements.
Syntax: SELECT {column_name}, SUM({column_name})
FROM {table_name}
GROUP BY {column_name}

Page 136 © Copyright WorkForce Software


WorkForce Time and Attendance

WT&A: SELECT display_employee, SUM(pay)


FROM time_sheet_output
GROUP BY display_employee

When aggregating by additional columns in an SQL statement, the


columns should be listed, delimited with a comma (,) in the GROUP BY
clause.

HAVING
Used to limit the results of an aggregate statement.
Syntax: SELECT {column_name}, SUM({column_name})
FROM {table_name}
GROUP BY {column_name}
HAVING SUM({column_name}) > {value}
WT&A: SELECT display_employee, SUM(pay)
FROM time_sheet_output
GROUP BY display_employee
HAVING SUM(pay) > 100000

UPDATE
Used to update values in a table. This command should be used with caution.
Syntax: UPDATE {table_name}
SET {column_name} = {new_value}
WHERE {condition}
WT&A: UPDATE employee
SET other_string25 = 'OPERATIONS'
WHERE ld1 = 760

INSERT INTO
Used to insert entire rows into a table. This command should be used with extreme caution.
Syntax: INSERT INTO {table_name} ({column_1},{column_2},…)
VALUES ({value1},{value2},…)

DELETE
Used to delete entire rows from a table. This command should be used with extreme caution.
Syntax: DELETE FROM {table_name}
WHERE {column_name} = {value}

© Copyright WorkForce Software, LLC Page 137


WorkForce Time and Attendance

SQL Operators
The following table of operators can be used when writing an SQL statement:
Table 1: SQL operators

Operator Definition
= Sets values equal to each other.
> Finds values greater than the condition.
>= Finds values greater than or equal to the condition.
< Finds values less than the condition.
<= Finds values less than or equal to the condition.
<> Finds values not equal to each other.
!= Finds values not equal to each other.
IS NULL Finds all values that are null. (NOTE: a blank value is not the same as a NULL value.)
IS NOT NULL Finds all values that are not null. (NOTE: a blank value is not the same as a NULL
value.)
+ Adds values together. In SQL Server, also used as a concatenation operator.
/ Divides values.
* Multiplies values.
- Subtracts values from each other.
|| In Oracle, used as a concatenation operator.

© Copyright WorkForce Software, LLC Page 139


WorkForce Time and Attendance–Database Schema

How to Join Multiple Tables


Often, it is not possible to get all the data you want from a single table. Instead, it is often
necessary to join multiple tables together to get the full picture. There are several different
types of joins that can be done between tables.

INNER JOIN
An inner join connects multiple tables via common columns that exist in all the tables. In an
inner join, the values in the common columns are usually equal to each other.
Syntax: SELECT {table_name1}.{column_name}, {table_name2}.{column_name}
FROM {table_name1}, {table_name2}
WHERE {table_name1}.{column_name} = {table_name2}.{column_name}
WT&A: SELECT employee.display_employee, app_user.email_address
FROM employee, app_user
WHERE employee.employee = app_user.employee

When multiple tables are listed in the FROM clause, they should be
delimited with a comma (,). When a table column of the same name
exists in multiple tables in an SQL statement, the column name must be
prefaced by the specific table name, i.e., {table_name}.{column_name}

LEFT OUTER JOIN


A left outer join connects multiple tables via common columns that exist in all the tables, but if
a value exists in the “left” table and doesn’t exist in the “right” table, the values will still be
displayed. The “left” table is always the first table listed and the “right” table is the second table
listed.
Syntax: SELECT {table_name1}.{column_name}, {table_name2}.{column_name}
FROM {table_name1} LEFT OUTER JOIN {table_name2}
ON {table_name1}.{column_name} = {table_name2}.{column_name}
WT&A: SELECT app_user.login_id, app_user.email_address
FROM app_user LEFT OUTER JOIN employee
ON app_user.employee = employee.employee

RIGHT OUTER JOIN


A right outer join connects multiple tables via common columns that exist in all the tables, but if
a value exists in the “right” table and doesn’t exist in the “left” table, the values will still be
displayed. The “left” table is always the first table listed and the “right” table is the second table
listed.

Page 140 © Copyright WorkForce Software


WorkForce Time and Attendance

Syntax: SELECT {table_name1}.{column_name}, {table_name2}.{column_name}


FROM {table_name1} RIGHT OUTER JOIN {table_name2}
ON {table_name1}.{column_name} = {table_name2}.{column_name}
WT&A: SELECT app_user.login_id, app_user.email_address
FROM app_user RIGHT OUTER JOIN employee
ON app_user.employee = employee.employee

FULL OUTER JOIN


A full outer join connects multiple tables via common columns that exist in all the tables, but
will display results from both tables whether or not there is a match. Where a match does not
exist, a null value will be returned.
Syntax: SELECT {table_name1}.{column_name}, {table_name2}.{column_name}
FROM {table_name1} FULL OUTER JOIN {table_name2}
ON {table_name1}.{column_name} = {table_name2}.{column_name}
WT&A: SELECT app_user.login_id, app_user.email_address
FROM app_user FULL OUTER JOIN employee
ON app_user.employee = employee.employee

CARTESIAN PRODUCT
A Cartesian product is the result of a direct multiplication of data by not specifying a join
between two tables. This is most often a mistake and can result in a “run-away” query that
does not perform well. However, it may be necessary to purposely create a Cartesian product
for certain results.
Syntax: SELECT {table_name1}.{column_name}, {table_name2}.{column_name}
FROM {table_name1}, {table_name2}
WT&A: SELECT wfs_date.wfs_date, employee.display_employee
FROM wfs_date, employee
The results of this query will create a result where every possible value of combinations is
created. For example, the WFS_DATE table always has 402,131 rows. If the EMPLOYEE table
had 100 rows, it will mean that this query will result in 40,213,100 rows because each value will
need to have a combination since no join is specified.

How to Alias Tables and Columns


An alias for a table is an abbreviation for the table which allows “shorthand” to be used in an
SQL statement. This is often easier to write than always having to refer to the full table name.
Syntax: SELECT {table1_alias}.{column_name}, {table2_alias}.{column_name}
FROM {table_name1} {table1_alias}, {table_name2} {table2_alias}

© Copyright WorkForce Software, LLC Page 141


WorkForce Time and Attendance–Database Schema

WHERE {table1_alias}.{column_name} = {table2_alias}.{column_name}


WT&A: SELECT e.display_employee, au.email_address
FROM employee e, app_user au
WHERE e.employee = au.employee
An alias for a column name is a way of renaming a column in the result set so that it makes
more sense to an end-user.
Syntax: SELECT {column_name} AS {column_alias}
FROM {table_name}
WT&A: SELECT display_employee AS EmployeeID
FROM employee

How to Add Comments


Comments may be added to a query by using two single dashes. Comments can be used to
either explain a specific part of a query or can be used to comment out a line of a query for
testing purposes.
To add comments:
--This query finds all employee IDs.
SELECT DISTINCT display_employee
FROM employee

To comment out a line in a query:


SELECT *
FROM employee
WHERE last_name = 'WRIGHT'
--AND first_name = 'MARY'

Page 142 © Copyright WorkForce Software


WorkForce Time and Attendance

Appendix B: Absence Compliance Tracker Tables


This chapter includes the following key sections:
• Tables Related to Absence Compliance
• Absence Compliance Tables Relationships

Tables Related to Absence Compliance


ACT_CASE
A transactional table which stores high-level information pertaining to absence cases.
Note: ACT_REASON - answers are encrypted and cannot be queried due to the sensitive nature
of responses. ACT_REASON_OVERIDE can be configured in Policy Editor.

COLUMN NAME DESCRIPTION


ACT_CASE The primary key associated with the leave request.
ACT_CASE_TYPE The type of absence case.
CHOICE_ID: ACT_CASE_TYPE
ACT_REASON A foreign key representing the absence case reason
policy.
ACT_STATUS The current status of the absence case.
CHOICE_ID: ACT_CASE_STATUS
ACTUAL_RETURN_TO_WORK_DATE The actual date the employee returned to work for
the absence case.
CASE_DISPLAY_ID Display ID for the absence case.
CASE_NOTES ACT case notes from the case notes tab.
EMPLOYEE A foreign key representing the employee to which
the absence case belongs.
END_DATE The end date of the leave request.
EPISODE_DURATION_UNIT The unit associated with the value in
EXPECTED_EPISODE_DURATION.
CHOICE_ID: HOURS_DAYS_CHOICE
EXPECTED_EPISODE_COUNT The number of episodes to expect during the
specified period.
EXPECTED_EPISODE_DURATION The amount of employee leave expected per average
episode.
EXPECTED_RETURN_TO_WORK_DATE The date the employee is expected to return to work
for the absence case.
START_DATE The start date of the leave request.

© Copyright WorkForce Software, LLC Page 143


WorkForce Time and Attendance–Database Schema

COLUMN NAME DESCRIPTION


PERIOD The period over which to expect the number of
episodes.
PERIOD_UNIT The unit associated with the value in PERIOD.
CHOICE_ID: WEEKS_MONTHS_CHOICE
PERSON_AFFECTED Relation to the person the employee needs to care
for during the leave.
ACT_CASE table

ACT_CASE_ASSIGNMENT
A transactional table containing the absence case assignments.

COLUMN NAME DESCRIPTION


ACT_CASE A foreign key representing the absence case.
APP_USER A foreign key representing the application user of the
case manager to whom the absence case is assigned.
ACT_CASE_ASSIGNMENT table

ACT_CASE_DOCUMENT
A transactional table of documents and document related details pertaining to absence cases.
The actual document content is encrypted and cannot be displayed in reports.

COLUMN NAME DESCRIPTION


ACKNOWLEDGED_BY_EMPLOYEE A Boolean column indicating whether the
employee has acknowledged the document.
ACKNOWLEDGED_BY_EMPLOYEE_DTTM The date and time the employee acknowledged
the document.
ACT_CASE A foreign key representing the absence case.
ACT_CASE_DOCUMENT The primary key representing the absence case
attachment.
ARCHIVED_DTTM The date and time the document reached archived
status.
ATTACHED_BY The APP_USER of the individual that attached the
document.
ATTACHED_DTTM The date and time the document was attached.

Page 144 © Copyright WorkForce Software


WorkForce Time and Attendance

COLUMN NAME DESCRIPTION


COMPLETION_REQUIREMENT The completion requirement for the attached
document.
CHOICE_ID:
ACT_DOCUMENT_COMPLETION_REQUIREMENT
DESCRIPTION A short description of the document.
DOCUMENT_STATUS The status of the absence case document.
CHOICE_ID: ACT_DOCUMENT_STATUS
DUE_DATE Depending on the completion requirement, the
due date for the case manager to mark the
document as archived or sent or acknowledged by
employee. Null if there is no completion
requirement for the attachment.
FILE_NAME The name of the attached document.
MOST_RECENTLY_REPLACED_BY If a document has been replaced, the APP_USER of
the case manager that replaced the attachment.
MOST_RECENTLY_REPLACED_DTTM If applicable, the date and time the attachment
was most recently replaced.
SENT_TO_ANYONE A Boolean column indicating whether the
document has been sent to anyone.
SENT_TO_EMPLOYEE A Boolean column indicating whether the
document has been sent to the employee.
SENT_TO_EMPLOYEE_DTTM If it has been sent, the date and time the
document has been sent to the employee.
TRIGGERING_EVENT A foreign key representing the absence case
workflow event that triggered the attachment of
the document. This is null for manually attached
documents.
VISIBLE_TO_EMPLOYEE A Boolean column indicating whether the
document should be shown to the employee.
ACT_CASE_DOCUMENT table

ACT_HISTORY_EVENT_TYPE
A definition table of all history event types in the application.

COLUMN NAME DESCRIPTION


ACT_HISTORY_EVENT_TYPE The primary key representing the absence case
history event type.
EFF_DT The effective date of the record.
END_EFF_DT The end effective date of the record.

© Copyright WorkForce Software, LLC Page 145


WorkForce Time and Attendance–Database Schema

LABEL The short description of the history event type.


ACT_HISTORY_EVENT_TYPE table

ACT_WORKFLOW_EVENT_TYPE
A definition table of all workflow event types in the application.

COLUMN NAME DESCRIPTION


ACT_WORKFLOW_EVENT_TYPE The primary key representing the absence case workflow
event type.
EFF_DT The effective date of the record.
END_EFF_DT The end effective date of the record.
LABEL The short description of the workflow event type.
SORT_ORDER To be used to sort workflow events with the same status
and completion date.
ACT_WORKFLOW_EVENT_TYPE table

ACT_CASE_HISTORY_EVENT
A transactional table which contains the history events related to absence cases.

COLUMN NAME DESCRIPTION


ACT_CASE A foreign key representing the absence case.
ACT_CASE_HISTORY_EVENT The primary key representing the absence case history
event.
ACT_CASE_DOCUMENT A foreign key representing any absence case attachment.
ACT_HISTORY_EVENT_TYPE A foreign key representing the history event type.
DELETED A Boolean column indicating whether the event has been
deleted.
OLD_DUE_DATE The due date for task event types.
ACT_CASE_HISTORY_EVENT table

ACT_CASE_WORKFLOW_EVENT
A transactional table which contains the workflow events related to absence cases.

COLUMN NAME DESCRIPTION


ACT_CASE A foreign key representing the absence case.

Page 146 © Copyright WorkForce Software


WorkForce Time and Attendance

ACT_CASE_WORKFLOW_EVENT The primary key representing the absence case event.


ACT_WORKFLOW_EVENT_TYPE A foreign key representing the event type.
COMPLETED_BY The APP_USER of the individual who completed the event.
COMPLETION_DATE The date when the event was completed.
DELETED A Boolean column indicating whether the event has been
deleted.
DUE_DATE The due date for task event types.
ACT_CASE_WORKFLOW_EVENT table

ACT_REASON
A definition table of the distributed reasons for which an employee can take leave.

COLUMN NAME DESCRIPTION


ACT_REASON The primary key representing the absence
reason.
EFF_DT The effective date of the record.
END_EFF_DT The end effective date of the record.
REASON_TYPE The short description of the reason.
LONG_DESCRIPTION The description of the reason.
ACT_REASON table

© Copyright WorkForce Software, LLC Page 147


WorkForce Time and Attendance–Database Schema

ACT_REASON_OVERRIDE
A definition table of the customer reason overrides for non-regulated sections of a reason.

COLUMN NAME DESCRIPTION


ACT_REASON A foreign key representing the absence reason to be overridden.
ACT_REASON_OVERRIDE The primary key representing the absence reason override.
DISABLED A Boolean column indicating whether the override reason is
valid.
EFF_DT The effective date of the record.
END_EFF_DT The end effective date of the record.
REASON_TYPE The short description of the override reason.
SHORT_DESCRIPTION The description of the override reason.
ACT_REASON_OVERRIDE table

ACT_LEAVE_TYPE
A definition table of the available distributed leave types. A leave type corresponds to a law or
statute.

COLUMN NAME DESCRIPTION


ACT_LEAVE_TYPE The primary key representing the leave type.
EFF_DT The effective date of the record.
END_EFF_DT The end effective date of the record.
LABEL The short description of the absence leave type.
PERIOD_TYPE Units associated with the leave type period.
CHOICE ID: RECURRING_PERIOD_TYPE
UNLIMITED_USAGE A Boolean column indicating whether the leave type has a usage
limit.
ACT_LEAVE_TYPE table

Page 148 © Copyright WorkForce Software


WorkForce Time and Attendance

ACT_CUSTOMER_LEAVE_POLICY
A definition table of the customer defined leave types that are not federal or state regulated,
i.e., not distributed Leave Types.

COLUMN NAME DESCRIPTION


ACT_CUSTOMER_LEAVE_POLICY The primary key representing the customer leave type.
BANK_SOURCE An indicator of the source of the customer leave type:
• 2: Time Entry
• 3: None
EFF_DT The effective date of the record.
END_EFF_DT The end effective date of the record.
PAY_CODE A time record will be created with time allocated to this
leave when set.
TA_BANK The Time and Attendance bank associated with the
customer leave type.
DESCRIPTION The description of the customer leave type.
ACT_CUSTOMER_LEAVE_POLICY table

LEAVE_BALANCE
A transactional table which contains the leave type balances for each employee.

COLUMN NAME DESCRIPTION


ACT_CASE A foreign key representing the absence case. Null unless the
period type is ‘CASE’, then it identifies the spanned period is
for the lifetime of the absence case and not a month, week
or year.
ACT_LEAVE_TYPE A foreign key representing the leave type.
BALANCE The corresponding balance for the given day.
BALANCE_DATE The date the balance was recorded.
EMPLOYEE A foreign key representing the employee associated with the
leave balance.
EMPLOYEE_PERIOD_VERSION A foreign key representing the version of the employee
period.
TIME_UNIT The unit in which the balance is recorded.
CHOICE ID: TIME_UNIT
LEAVE_BALANCE table

© Copyright WorkForce Software, LLC Page 149


WorkForce Time and Attendance–Database Schema

LEAVE_ELIGIBILITY
A transactional table which contains the evaluated result of the leave types in an absence case.

COLUMN NAME DESCRIPTION


ACT_CASE A foreign key representing the absence case.
ACT_LEAVE_TYPE A foreign key representing the leave type.
HR_OVERRIDE A Boolean column indicating whether HR has overridden the
result of the leave type evaluation.
LEAVE_ELIGIBILITY The primary key representing the evaluated or overridden
result for the corresponding leave type in an absence case.
LEAVE_ELIGIBILITY table

LEAVE_ELIGIBILITY_OVERRIDE_DTL
A transactional table which contains the effective dated detail records of the evaluated or
overridden result of the leave types in an absence case.

COLUMN NAME DESCRIPTION


ALLOWED_USAGE_START The first date the leave type may be used for the corresponding
case.
ALLOWED_USAGE_END The last date the leave type may be used for the corresponding
case.
EFF_DT The starting effective date for the leave type override. The date
will be greater than or equal to the ACT case start date.
END_EFF_DT The ending effective date for the leave type override. The date
will be less than or equal to the ACT case end date.
HR_OVERRIDE_USER A foreign key representing the application user who overrode
the result of the leave type evaluation.
LEAVE_ELIGIBILITY A foreign key representing the leave eligibility.
QUALIFICATION_RESULT The evaluated or overridden result.
CHOICE ID: LEAVE_ELIGIBILITY_VALUE
LEAVE_ELIGIBILITY_OVERRIDE_DTL table

Page 150 © Copyright WorkForce Software


WorkForce Time and Attendance

ACT_CUSTOMER_CONFIGURATION
A definition table of customer specific absence compliance configuration information.

COLUMN NAME DESCRIPTION


ACT_PAY_CODES The name of the policy set containing the pay codes related to
absence compliance.
EFF_DT The effective date of the record.
END_EFF_DT The end effective date of the record.
ACT_CUSTOMER_CONFIGURATION table

© Copyright WorkForce Software, LLC Page 151


WorkForce Time and Attendance–Database Schema

Absence Compliance Table and View Relationships


ACT_
CUSTOMER_
EMPLOYEE
CONFIGURATIO COMPANY
ACT_REASON_
N ACT_REASON
OVERRIDE
EMPLOYEE_GROUP
ACT_CUSTOMER_CONFIGURATION
EMPLOYEE
= DEFAULT_ACT_CONFIG

SYSTEM_SETUP ACT_CASE ACT_REASON ACT_REASON

ACT_CASE
ACT_CASE
LEAVE_
ELIGIBILITY
LEAVE_
ACT_CASE_
ACT_CASE_ ACT_CASE_ ACT_CASE_ LEAVE_BALANC LEAVE_ ELIGIBILITY_
WORKFLOW_ TRIGGERING_
ASSIGNMENT HISTORY_EVENT DOCUMENT E ELIGIBILITY OVERRIDE_
EVENT EVENT DTL
= ACT_CASE_
WORKFLOW_
ACT_HISTORY_EVENT_TYPE ACT_LEAVE_TYPE
EVENT
APP_USER ACT_CUSTOMER_
EMPLOYEE_PERIOD_VERSION = LEAVE_POLICY
ACT_WORKFLOW_EVENT_TYPE CALC_EMP_PERIOD_VERSION

ACT_
ACT_HISTORY_ EMPLOYEE_ ACT_LEAVE_ ACT_CUSTOMER
APP_USER WORKFLOW_
EVENT_TYPE PERIODS TYPE _LEAVE_POLICY
EVENT_TYPE

TA_BANK = BANK

BANK

Page 152 © Copyright WorkForce Software


WorkForce Time and Attendance

Appendix C: Relationship Tables


Employee and Assignment Table and View Relationships

EMPLOYEE_ EMPLOYEE_
PHOTO_ID
MASTER PHOTO

EMPLOYEE

EMPLOYEE

EMPLOYEE

ASGNMT_
MASTER

ASGNMT

ASGNMT

ASGNMT

ASGNMT_GR
P_
DETAIL

ASGNMT_GRP

ASGNMT_GR
P

© Copyright WorkForce Software, LLC Page 153


WorkForce Time and Attendance

Employee Period Version Relationships

EMPLOYEE

EMPLOYEE

V_ASGNMT_
PERIODS

EMPLOYEE_PERIOD_VERSION

SCHEDULE_
BANK_OUTP
TIME_SHEET_ TIME_SHEET_ GENERATION SCHEDULE_
UT_
DETAIL OUTPUT _ DETAIL
SUMMARY
DTL
Relationships to EMPLOYEE_PERIOD_VERSION key.

Page 154 © Copyright WorkForce Software


WorkForce Time and Attendance

Pay Period Schema Relationships

ASGNMT_
EMPLOYEE EMPLOYEE ASGNMT ASGNMT
MASTER

EMPLOYEE ASGNMT

EMPLOYEE_
PERIODS

EMPLOYEE_PERIOD

EMPLOYEE_
PERIOD_
VERSIONS

Diagram of Pay Period tables relationships.

© Copyright WorkForce Software, LLC Page 155


WorkForce Time and Attendance

Timesheet Table and View Relationships

it should use CEPV, LEPV in this diagram

ASGNMT_
EMPLOYEE EMPLOYEE
When using the MASTER
EMPLOYEE_PERIODS table,
the join will be either:
EMPLOYEE EMPLOYEE ASGNMT
CALC_EMP_PERIOD_VERSION
=
EMPLOYEE_PERIOD_VERSION V_ASGNMT_ EMPLOYEE_ Calc EPV
OR
PERIODS PERIODS
or
Calc EPV or Last
LAST_EMP_PERIOD_VERSION EPV
=
EMPLOYEE_PERIOD_VERSION

EPV EPV
EPV EPV
DETAIL_
RECORD_ID
TIME_SHEET_ = PARENT_ID TIME_SHEET_ TIME_SHEET_ TIME_SHEET_
DETAIL DETAIL_SPLIT OUTPUT TIME_SHEET
EXCEPTION

Time Sheet Tables Group

PAY_CURRENCY_CODE = CALC_CHANGE_SET EPV EXCEPTION_CODE


Any LD Field
CURRENCY_CODE
PAY_CODE

WFS_SYS_ CALC_
Any LD Table CURRENCY_ PAY_CODE CHANGE_ APPROVAL_ EXCEPTION_
INFO SET EVENT CODE

LD1 CALC_CHANGE_SET

Any LD_JOIN V_ASGNMT_


Table PERIODS

EMPLOYEE
EPV = EMPLOYEE_PERIOD_VERSION

CEPV = CALC_EMP_PERIOD_VERSION EMPLOYEE

LEPV = LAST_EMP_PERIOD_VERSION

Page 156 © Copyright WorkForce Software


WorkForce Time and Attendance

Line Approval Table and View Relationships

ASGNMT_
EMPLOYEE EMPLOYEE
MASTER

EMPLOYEE EMPLOYEE ASGNMT

V_ASGNMT_ EMPLOYEE_
PERIODS PERIODS

EPV CEPV or LEPV

LINE_APPRO TIME_SHEET_
DETAIL_RECORD_ID
VAL_EVENT DETAIL

DETAIL_RECORD
EPV
_ID = DETAIL_ID

TIME_SHEET_
DETAIL_MAT
CH_VAL
APP_USER
MATCH_POLICY
MATCH_VALUE

ROUTING_TA
BLE

APPROVER_ID

APP_USER
EPV = EMPLOYEE_PERIOD_VERSION

CEPV = CALC_EMP_PERIOD_VERSION APP_USER


LEPV = LAST_EMP_PERIOD_VERSION

© Copyright WorkForce Software, LLC Page 157


WorkForce Time and Attendance

Off Cycle Table and View Relationships

Page 158 © Copyright WorkForce Software


WorkForce Time and Attendance

Accrual Management Table and View Relationships

EMPLOYEE

EMPLOYEE

ASGNMT_
MASTER

EMPLOYEE ASGNMT

CEPV EMPLOYEE_ CEPV


= EPV PERIODS = EPV

BANK_
BANK_
OUTPUT_
OUTPUT
SUMMARY

BANK BANK BANK

CEPV =
CALC_EMP_PERIOD_VERSION
EPV = EMPLOYEE_PERIOD_VERSION

© Copyright WorkForce Software, LLC Page 159


WorkForce Time and Attendance

Time Off Request Table and View Relationships

ASGNMT_
EMPLOYEE EMPLOYEE
MASTER

EMPLOYEE
EMPLOYEE
TIME_OFF_
REQUEST ASGNMT

TIME_OFF_REQUEST TIME_OFF_REQUEST

TIME_OFF_ TIME_OFF_
REQUEST_ REQUEST_
DETAIL EVENT

TIME_OFF_REQUEST TIME_OFF_REQUEST

TIME_SHEET_ SCHEDULE_
DETAIL DETAIL

Page 160 © Copyright WorkForce Software


WorkForce Time and Attendance

Schedule Table and View Relationships

EMPLOYEE

EMPLOYEE

ASGNMT_
MASTER

EMPLOYEE ASGNMT
Calc EPV =
CALC_EMP_PERIOD_VERSION
EMPLOYEE_ EPV = EMPLOYEE_PERIOD_VERSION
PERIODS
Calc EPV Calc EPV
= EPV = EPV

SCHEDULE_
SCHEDULE_
GENERATION EPV
DETAIL
_DTL

SCHEDULE_
GENERATED_FROM_TEMPLATE
CYCLE
= SCHEDULE_TEMPLATE
= ID

SCHEDULE_ SCHEDULE_
TEMPLATE CYCLE

SCHEDULE_TEMPLATE ID

SCHEDULE_ SCHEDULE_
HOURS_FORMULA
TEMPLATE_ FORMULA CYCLE_
= FORMULA
DETAIL DETAIL

© Copyright WorkForce Software, LLC Page 161


WorkForce Time and Attendance

Data Collection Device Table and View Relationships

TIME_SHEET_ DETAIL_RECORD_ID = TIME_SHEET_


DETAIL PARENT_ID DETAIL_SPLIT
IN_SWIPE_PHOTO_ID =
SWIPE_PHOTO_ID
OR
OUT_SWIPE_PHOTO_ID =
SWIPE_PHOTO_ID

BIOMETRIC_
TEMPLATE
SWIPE_
PHOTO
IN_SWIPE_ID =SWIPE_ID
IN_SWIPE_PHOTO_ID = OR APP_USER
SWIPE_PHOTO_ID OUT_SWIPE_ID = SWIPE_ID
OR
OUT_SWIPE_PHOTO_ID = EMPLOYEE
SWIPE_PHOTO_ID

SWIPE EMPLOYEE EMPLOYEE APP_USER

ID_FIELD = ASGNMT

EMPLOYEE APP_USER
ASGNMT EMPLOYEE BADGE

ASGNMT BADGE_GROUP

ASGNMT_ BADGE_
MASTER GROUP

Page 162 © Copyright WorkForce Software


WorkForce Time and Attendance

Application Users Table and View Relationships

© Copyright WorkForce Software, LLC Page 163

You might also like