Home      Ask a Question      My Stuff      Help   
  
TimeWorks Plus: Scripting Alerts (AddAlert)
In TimeWorks there is the "exception" which based on the condition of a punch we could add an alert to that punch based on that condition. For example if the punches hours were 6 or greater we could add the "exception", "Hours are Greater than 6" using the below script:

if (hours > 6) {exception = "Hours are Greater than 6";}

This is also possible in TimeWorks Plus using the "Script" processing rule, but the syntax is a bit different as we use a different keyword "AddAlert" (this is not case sensitive) and we surround our message (including the quotes) in () brackets:

if (reportingdate.totalhours > 6) {addalert ("Hours are Greater than 6");}

A benefit with this new process that is different than TimeWorks is now we can add multiple distinct "AddAlert" messages to a single bunch. Below is an example of this:

if (reportingdate.totalhours > 6) {addalert ("Hours are Greater than 6");}
if (reportingdate.totalhours > 6) {addalert ("Hours are Greater than 6 Two");}
if (reportingdate.totalhours > 6) {addalert ("Hours are Greater than 6 Three");}
if (reportingdate.totalhours > 6) {addalert ("Hours are Greater than 6 Four");}

The above will now add four separate distinct alerts to any punch that has hours greater than 6.

TimeWorks Plus also presents the alerts differently in TimeWorks Plus using a blue circled "i" icon which if hovered over displays the alert. Below is a screen shot of our above script working on an actual time card.




Note with this the only report this will show besides the time card is the Daily Auto Email Report.

ID
783
Category
<Unassigned>
Date Created
11/16/2012 9:41:18 AM
Date Updated
6/5/2015 10:16:03 AM
Back to Search Results