Home      Ask a Question      My Stuff      Help   
  
Scripting - Creating a Reference Punch
This article outlines a way to make a reference punch on a time card. A reference punch would be a punch that would show on the time card that would have no hours or dollar value to calculate towards your export but would still be viewable in the time card as well as in reports.

To do so requires a script that would create a NULL or non-value. We also want to have this assigned to something we can report against like say a job code prompt so this would have to also be configured (How To - Setting Up Clock Prompts). An example of this is below:

if (x = "999")
{
x = "Reference Punch";
hours = "";
}

So if "999" (no quotes) is entered in the x prompt it will create a punch with a NULL, non-value punch and show "Reference Punch" under the x prompt column which for example we will configure as "Shift" as the column heading on the time card.

Below is a screen shot of this working using our example:



Things to also note when making a punch. You want it to be something that can only be done manually on the site so you may want to consider in the clock prompt setup setting it to "Show online, but do not collect anything" using the "Data Collection Mode" drop down. Meaning show the column on the time card, make this prompt available when manually adding/editing a punch BUT do not prompt for this at the clock.

Also we are really only concerned with two things:

1. There has to be a hour value. This can be anything as our script will remove the value anyway. But we need it as you cannot initially create a non-value punch.

2. Something entered in the job prompt or "Shift" / x prompt with referencing our example. Entering in a certain value in the case of our example "999" triggers the script and makes the hour NULL.

See below for an example of how a punch could be entered manually. Note the only changes are to the "Hours Only" and we add our Reference Punch variable in the x prompt (999):



As mentioned you can once the punch is created enter in punch notes. You could also change the category, (like for example Unpaid Time Off or Unpaid Sick Leave). But remember because the value is NULL it will not export.

ID
580
Category
Training
  FAQ's
Date Created
6/14/2011 7:44:22 AM
Date Updated
6/21/2011 9:44:23 AM
Back to Search Results