TBL: WATCH - Dates to watch

This table contains WATCH ITEMS -- future dates (or anniversaries of past date) that might be tracked on the WATCH report.

When you run the WATCH report you choose some or all of the items from this table. You also select a date range (e.g. the next 30 days). Any date or anniversary falling within that range is shown on the report.

You can also specify filters for WATCH items. For example, you might select only certain EVENT types or certain groups of employees.

TBLID

An arbitrary code to distinguish items. The internal field name can be used, for example.

Additional Info

TBLC1 - The file containing the date to watch.

Select from PERS, JOBHIST, EVENT, DALARM, BENEFIT, or ACCIDENT.

This is the data file (table) that will be scanned for a particular date and condition.

TBLC2

The field name for the date field to watch, in the specified table. To watch the next anniversary of that date, add the ANNIVERSARY option.

This can also be a string field containing a MMDD (month-and-day), or even an expression (must be SQL-compatible)

EXAMPLES:

  • E_SENIORDT
  • E_ANNIVMD
  • IIF(E_SENIORDT=, E_LASTHIRE, E_SENIORDT)
  • MORED(E_MORE, "MARRIED_ON")

TBLC3

The name in English of the field being watched. This appears on the WATCH report as the FIELD (when printing in English).

If you leave this empty here, the report shows the field name from its data dictionary.

TBLC4

The name in French of the field being watched. This appears on the WATCH report as the FIELD (when printing in French).

If you leave this empty here, the report shows the field name from its data dictionary.

TBLC5

A filter (expression) on PERS (employees) or on the specified table (JOBHIST, EVENT, etc.). Do not refer to any other table. Only records in the selected table that meet this condition will be examined.

If you want to examine different dates for different EVENTs or employee groups, you can create different WATCH table entries for each combination you need.

This filter is passed on (as a WHERE clause) to the backend data base, so it must be SQL compatible.

TBLC6

This optional secondary filter (expression) is applied after records are retrieved from the datebase. More complex filtering is possible here, but it is less efficient. Use this filter only when necessary.

For example, when working with the anniversary of a selected date, you may refer here to the value of lnYEARS. You can also refer to NCONFIG variables, to TBLEVAL(...) etc.

TBLC7 - Lead time (days)

Some watch items may need to be looked at farther in advance than others. This field gives you a chance to specify a number of days in advance to bring it on to the WATCH report.

FOR EXAMPLE, if you are running the Watch Report for the coming month, and you need to look at this item two months in advance, then you can enter 30 (days) here. The Watch Report will subtract 30 days from the watch date and check that date against the date range you select (the coming month), and print it 30 days early.

TBLC8 - English text to print

This text will be printed on the WATCH report in the TEXT column on English versions of the report.

TEXT INSERTION You can insert data from the data base in the printed text, using a "text-merge" syntax here. Place a field or expression from the data base inside text-merge brackets to tell the system to insert data from the data base.

For example, when watching an EVENT field, will cause the event E-type to appear inside the brackets. So you might use: For absence type starting on

(Web designers: think of the old ASP insertion syntax.)

TBLM1 - French text to print

This text will be printed on the WATCH report in the TEXT column on French versions of the report.

To insert data from the data base in the printed text, use a "text-merge" syntax here. Place a field or expression from the data base inside text-merge brackets to tell the system to insert data from the data base.

For example, when watching an EVENT field, will cause the event E-type to appear inside the brackets. So you might use: For absence type starting on

(Web designers: think of the old ASP insertion syntax.)

TBLM2 - Options

Select from these options

  • "A" - selects the next anniversary of the date specified. The one that falls between the FROM and the THRU date on the report. This is useful for birthdays, seniority dates, etc.

  • "5" - selects the next 5-year anniversary (5, 10, 15, 20, etc.) of the date in the date base.

  • "N" - Print the NOTES field from the record on the report.

TBLC11 - Refresh Code

Code to execute to refresh dates. Is this Watch is selected for printing, this code will be executed first to refresh estimated dates.

For example, to refresh Seniority Raises (Watch E_NXTAVECH), the code is: DoBiz("AVECH", "UpdatePers()")


© Carver Technologies, 2024 • Updated: 08/21/22
Comment or report a problem with this topic