CS Time/TNA Documents

username password

Manipulating Warnings

    The Warnings File

    The following information will come in handy when manipulating TNA warnings with macro scripts:


    War:Code:  The type of warning

    1 = Unexpected Direction

    2 = Unexpected Clockings

    3 = Left Early

    4 = Arrived Late

    5 = Absent

    6 = Missed Break

    7 = No Out Clocking

    8 = Avg Night-Hours Exceeded

    9 = Avg Payroll-Hours Exceeded

    10 = Break Length Too Short

    11 = Break Length Too Long

    13 = Early In

    14 = Late Out

    15 = Work Too Long


    War:Date: The date of the warning.

    War:Other:  Other information regarding the warning e.g. the time the employee was expected to clock IN or OUT at.

    War:Time:  The time that the warning occurred - normally the actual clocking time.

    War:Type: The type of warning:

    D = Daily Hours warning. I.e. the warning was generated while processing daily hours.

    P = Payroll Hours warning. I.e. the warning was generated while processing payroll hours.

    Testing for a Specific Warning

    If you want to test for a specific warning e.g. absenteeism your script may look like this:


    At Warning

    if war:code = 5

       Put the rest of your code here.



    Ignoring a Warning

    To ignore a warning i.e. to not write the warning to file.


    At Warning

    if war:code = 5

       IgnoreWarning = 1



    The above script will ignore an absenteeism warning.


    Creating a Warning

    To create a warning of an existing type you need to use the WriteWarning function:


    At Before Saving Daily Hours



    Please note:

    1. The above example has no filter - it will always create the warning when running the script.
    2. It will use the default description for the warning which in this case is a late arrival warning. The only description required is the War:Other field which is the time the employee was expected to clock in at (07:00).  This is a string field which explains the single quotation marks.
    3. We're using the employee's first clocking time for the day as for the War:time.


    Permalink:  http://tinyurl.com/3hl6gxe

    Page last modified 12:51, 4 Oct 2011 by Admin CS Time/TNA Documents > Macro Scripts > Examples > Manipulating Warnings


    You must login to post a comment.
    Attach file


    Powered by MindTouch Core