Home      Ask a Question      My Stuff      Help   
  
TimeWorks: Scripting - Filtering Hours by Category in a Report Using a Script and Clock Prompt
Question
ID
326
Category
Training
  FAQ's
Date Created
10/23/2008 9:03:41 AM
Date Updated
8/13/2014 2:59:34 PM
Is there a way I can filter hours by category in a report?
Answer
Yes there is. By default most reports will not allow for filtering except by a Labor/Job Clock Prompts (x,y,z), Home Department, Home Location, and Supervisor fields (which are found in the employee's Employee Setup).

What we can do though is through scripting and a clock prompt create a filter that will allow a report to be filtered by hours worked in a selected category.

As an example we will use the 'x' clock prompt and in setting it up.

We will only change the 'What do you want to name this field?' portion to something you would like as this will show on the employee's time card (which is the biggest draw back with this process).

We will name this field "Filter" which will as stated create a column named this on the employee's time card.

Next we will create a script that will display at our prompt what job code/category was chosen for the punch.

We will use the example category of 'Vacation':

x = category;

Then all you have to do is run any report that allows for filtering.

Continuing with our example we will us the 'Summary Report' (Reports > Summary Report).

Then after selecting all other appropriate fields we will change the 'Sorting and Filtering' area and in the drop down select 'Filter By X/Filter'.

In the next box that pops up enter in the category we used in the script 'Vacation' (without the quotes). Remember this 'Vacation' is case sensitive so it needs to be typed in exactly as it shows as far as a category in the system.

==Note as stated above this may not be desirable as this will create a column with entries on all employee time cards this script and prompt affects. Attached is a screenshot example of this.==

Filter Category.doc

If this is not to the clients liking we can always use this Scripting - Deactivating (Without Deleting Them) And Adding Comments To Scripts to only enable the script when running the report and then again disabling it when you are done.

Also attached is a step by step document on this process with example screen shots.

Setting Up a Filter on Categories for Reporting.doc

Back to Search Results