Home      Ask a Question      My Stuff      Help   
  
TimeWorksPlus Scripting: Scheduling Feature Scripting
You can script against the schedules in the Scheduling feature. The keywords are the following:

- reportingdate.schedhours
- reportingdate.schedlines
- reportingdate.schedin
- reportingdate.schedout
- reportingdate.schedplace

The principle use of the scheduling scripting is attendance policies. You will usually check to see if the scheduled time is different than the actual time:

if(intime > reportingdate.schedin){
addalert("Employee was late.");
}
if(outtime < reportingdate.schedout){
addalert("Employee left early.");
}

The schedin and schedout can also get a schedule based on which punch set it is:

if(intime > reportingdate.schedin(punchset)){
addalert("Employee was late.");
}
if(outtime < reportingdate.schedout(punchset)){
addalert("Employee left early.");
}

You can also base it on an amount of time late or left early:

if(val(intime - reportingdate.schedin) / 60 >= 15){
addalert("Employee was late more than 15 minutes.");
}
if(val(reportingdate.schedout - outtime) / 60 >= 15){
addalert("Employee left early more than 15 minutes.");
}

With the schedlines and schedhours, you can know how many scheduled lines the employee has on that date, and how many hours they were scheduled for:

if(reportingdate.totalhoursot > reportingdate.schedhours){
addalert("Employee worked longer than scheduled.");
}

You can also default a clock prompt value to the place that they were scheduled:

if(Dept = ""){
Dept = reportingdate.schedplace;
}
ID
1394
Category
>Support
  Scripting
Date Created
12/4/2014 12:25:33 PM
Date Updated
12/4/2014 1:59:15 PM
Back to Search Results