| Knowledge Base Article #173 - Auto Calculate Test Date and Next Test Date upon Routine Exit |
|---|
| Date | May 22, 2009 |
| By | ENOSERV |
| Filed Under | RTS General |
| Class | General |
| |
| Issue Addressed |
|---|
Recently ENOSERV added a new RTS command to allow a User to Auto Calculate the Next Test Date and then update Test Date fields that have been added to the Relay Data tab. This command, GET_DATE STR$,INT,INT, would have to be added to ALL existing Library Routines though a new test procedure.
As a customer saw the validity of this option, the next request was whether this could be done automatically without having to build a test procedure. Based on this request, RTS was modified in Version 4.4.1.4 to perform this operation.
This article describes the option that has been added, how to implement the option, and how it performs. |
| |
| Causes of Issue |
|---|
|
| |
| Solution to this Issue |
|---|
For this to be functional, the customer must have 3 fields in the database or have fields added to the database in order to maintain required data.
1. A field to hold the "Last Test Date"
2. A field to hold the "Next Test Date"
3. A field to hold the "Maintenance Interval"
NOTE 1: The fields can be named however you desire. Just follow rules for given field names such a NO SPACES (only underscores)
NOTE 2: Instructions for modifying Relay Data Fields (User Defined Fields), can be found in the RTS Users Guide, section 10-1 "Modifying User Defined Fields". You must have MS Access 2003 or earlier. If MS Access 2007 is the only version availiable OR you are uncomfortable with making changes, ENOSERV Support will be happy to make changes for you.
NOTE 3: The Maintenance Interval must be entered consistently as either Days, Months, or Years.
After the database has been modified, update RTS to at least Version 4.4.1.4. With the correct RTS Version on the computer, open RTS. As RTS opens, new entries will be added to the RTS.ini (located in the RTS directory) under the heading [AutoOptions]
[AutoOptions]
�
AutoUpdate_TestDates=false
CurrentDate_Field=""
TestInterval_Field=""
TestInterval_Entry=0
NextDate_Field=""
Open the RTS.ini (Default location is C:ENOSERVRTS) and modify the entries to fit the Relay Data Fields that have been added to the database. Below is an example of how the entries may appear.
[AutoOptions]
�
AutoUpdate_TestDates=True
CurrentDate_Field="Last_Test_Date"
TestInterval_Field="Maint_Interval"
TestInterval_Entry=1
NextDate_Field="Next_Test_Date"
The TestInterval will be populate with a number from 0-2
TestInterval=0 desribes the TestInterval_Field is entered as Days
TestInterval=1 desribes the TestInterval_Field is entered as Months
TestInterval=2 desribes the TestInterval_Field is entered as Years
NOTE: In the future, the RTS Options Editor will be modified to allow this modification of this option through an interface.
With the RTS.ini modified correctly, here is what to expect during the testing operation.
1. If you open a System Routine and have at least 1 Test Result, as you save the routine you will also get prompted as to whether or not you would like to update Current Test Date and Next Test Date.
2. As it is possible you may not want to update the dates at times, the entry box places the User in control.
3. If you choose OK, the Last Test Date field and Next Test Date field will be populated based on the computer date.
4. If you choose Cancle, not update will occur.
NOTE: This option will NOT appear when you close a Library Routine as it just doesn�t apply.
NOTE 2: If you choose to update the Current Test Date and Next Test Date, it is important that Maint_Int is given a number. If any problem is seen, either the Maint_Interval contains an incorrect entry or relay data fields are not found, an error message box will appear informing teh User that an improper entry has been found.
With this control, Next Test Dates will be availiable as a tier or maninpulation options in the View Results window. |