Home      Ask a Question      My Stuff      Help   
  
Scripting - Filter Activity Files for 'Dollars Only', 'Hour Only' Entries or Categories
Question
ID
299
Category
Training
  FAQ's
Date Created
8/28/2008 12:31:03 PM
Date Updated
9/7/2011 10:52:33 AM
I want to be able to run separate Activity File for just Dollar Amount only punches. Can this be done?
Answer
Yes using a script that will work off of the Job Code clock prompt we can then run the Activity report and filter it to just 'Dollar Only' entries.

In our example we will be using the x Job Code prompt and set it to:

- Data Collection Mode: 'Show online, but do not collect anything' (This will allow the prompt to be active but not prompt the employee's at the timeclock.)
- What do you want to name this field? 'Bonus'
- How do you want the prompt to appear on the clock's screen? You can leave this as the default as the employee's will not be prompted.
- Collect data for employees with which type of cards? 'All colors'
- Should the data be visible or editable on the online edit screen? 'Visible and editable'
- What if the employee doesn't enter anything? 'Allow it. Leave the entry blank.'
- What can an employee enter into this field? 'Anything, including numbers, symbols, and letters'
- Require employees to choose an entry from a list? Leave Blank
- Should the online Edit screen be exempted from these validation settings? No override - Use same restrictions as on clock

next we would create 2 scripts. One that will trigger this prompt that you can filter for the 'Dollar Only' entries and one that will trigger for other normal punches.

if(ispayonly = true)
{
z = "Bonus";
}

if(ispayonly = false)
{
z = "Regular";
}

Finally when doing the Activity download (Reports > Download Activity Files) select your file format then on the next screen in the 'Employee Filtering:' select our prompt (x) from the drop down then enter 'Bonus' like in our script if all you want are the 'Dollar Only' entries to show or if you want just the in/out punches to show select 'Regular'.

This can also be used for 'Hours Only' entries by changing the script and substituting all the 'ispayonly' (without quotes) to 'ishours'.

This process also works with if you wanted to separate or even exclude categories from the Activity File. The only change from the script above would be to change the if statement. For example we wanted to exclude non-paid hours from our Activity File like lets say "Personal" time we would create a script like this:

if(category = "Personal")
{
z = "Non-Paid Hours";
}
else
{
z = "Paid Hours";
}

So in this case you would run your filter again to "z" and enter in "Paid Hours" if you just wanted to run an Activity file just for paid time.

==NOTE: For all of these you may want to adjust what you will call your prompt (ie. Bonus, Paid Hours, Non-Paid Hours, Personal) to fit what you want it to do as this will show on the time card.==
Back to Search Results