Warning
WARNING: The TrackAbout MetaWiki has been deprecated and is no longer being updated. Please visit our new TrackAbout Knowledge Base at https://supportkb.trackabout.com for the most-up-to-date documentation on TrackAbout and TrackAbout Mobile.

Alert File Template Language Reference

From TrackAbout MetaWiki
Jump to navigation Jump to search
TrackAbout Feature
Feature Name: Alert File Template Language Reference
In Module: Core Tracking
Short Description This feature works along with Email Alerts and allows for an Excel file to be generated based on record save.
Available In:
← Back to list


Summary

This feature works along with Email Alerts and allows for an Excel file to be generated based on record save. The template allows one to specify the action which causes the file to be generated, as well as the contents of the Excel file.

Just like when setting up regular email Alerts, using this feature will still respect other parameters of the alert, such as Asset Type. So, for example, and alert could be set up to send a user an Excel file of any Fill records which are saved for Medical Oxygen.

This language reference applies to Excel templates used for Alerts; these are the tags and special syntax you can use within the Excel file templates. In addition to the reference presented on this page, you can also download a sample template file illustrating template tag usage:File:Example template.xlsx

When an alert is triggered, any predefined email addresses will receive an email alert with information about why the alert was sent. In addition, if an alert file template is in place, the system will generate the file and drop it to an FTP location.

Set up and Configuration

Template tags are surrounded by braces {} and follow this pattern:

{Object.Property}

You can also put multiple tags in a single cell, and you can also include literal values next to the template tags. For example, the contents of a cell in the spreadsheet could be:

{Record.UserFullName} saved this record on {Record.RecDate}

Collection properties (e.g. Record.UniqueAssets) must use brackets to indicate which elements of the collection you want to display, like this:

{Object.CollectionProperty[Each]}

The [Each] will iterate through all items in the collection, placing each subsequent value in the next row in the worksheet. Allowable options for defining which collection elements to display include:

  • [Each],
  • A zero-based element index, e.g. [0] for the first element, [2] for the third element, etc., and
  • [Count], which will return the number of items in the collection rather than any one particular item.

Tag Options

Each template tag can also accept certain formatting options in parentheses after the property name. For instance, to specify a particular value to display from a collection element, you can use the ItemValue option:

{Record.UniqueAssets[Each](ItemValue=Tag)}

The options supported are:

  • ItemValue=<property_name> outputs the value for the given property on the object.
  • DateFormat=<a date format value> For dates, this option can be used to specify the format. All standard and custom .NET date formatters are supported, plus three special values:
    • DateTime: Displays a combination of short date and short time patterns, separated by a space.
    • DateOnly: Shows only a short date format without the time portion.
    • TimeOnly: Shows only a short time format without the date portion.
  • MaxItemsPerPage=<number of collection items to show per worksheet> When used in combination with a collection of items, limits the number of items that will be printed on a single worksheet. For instance, if you have a record with 20 unique assets attached, but your template will only hold 8 rows worth of asset information, you could use the following pattern in your template: {Record.UniqueAssets[Each](ItemValue=Tag,MaxItemsPerPage=8)} and the template will duplicate the worksheet twice and put 8 assets on the first sheet, 8 assets on the second, and the remaining 4 on the third.
    • If multiple collections are on a worksheet, the template engine will calculate which collection needs the most extra sheets, generate that many sheets, and for collections with fewer items will leave those spaces blank on latter pages.
  • LiteralValue="a literal string value" (supported for collection items only) Prints the literal value into the cell for each collection item.

Multiple options can be separated by commas. Example:

{Record.UniqueAssets[Each](ItemValue=TypeName,MaxItemsPerPage=10)}

Supported Properties

Top-Level Object Name Property Name Usage Example Description
Record ActionName {Record.ActionName} The name of the action, e.g. "Locate Empty".
Record ActionId {Record.ActionId} The numeric ID of the record's action, e.g. "48".
Record AssociatedOrderNumber {Record.AssociatedOrderNumber} The order number associated with the record.
Record ControlStr {Record.ControlStr} The control string associated with the record. Commonly called: Invoice Number, Ticket Number, Delivery Ticket#, Pick-Pack-Ship(PPS) number
Record DeviceId {Record.DeviceId} The ID of the device that created the record.
Record GroupCode {Record.GroupCode} The group code associated with the record's building/room/person (if collected).
Record HolderId {Record.HolderId} The customer ID associated with this record.
Record LocationId {Record.LocationId} The ID of the location associated with this record.
Record LotNumber {Record.LotNumber} The lot number associated with this record.
Record LotNumbers {Record.LotNumbers} A comma-separated list of all lot numbers on this record. This property only applies to the "Fill Unique" action.
Record LotQuantity {Record.LotQuantity} The number of assets in the lot as reported by the user.
Record ProjectCode {Record.ProjectCode} The project code associated with the record's building/room/person (if collected).
Record PurchaseOrder {Record.PurchaseOrder} The purchase order associated with the record.
Record RecDate {Record.RecDate} The record's effective datetime.
Record ResponsibleHolderId {Record.ResponsibleHolderId} The ID of the customer being marked as responsible for the loss of the assets on the record. Generally, this property is only set when the record is a "Mark Lost" action type.
Record SubActionId {Record.SubActionId} The ID of this record's SubAction.
Record UserFirstName {Record.UserFirstName} The first name of the user saving this record.
Record UserLastName {Record.UserLastName} The last name of the user saving this record.
Record UserFullName {Record.UserFullName} The full name (First Last) of the user saving this record.
Record UniqueAssets {Record.UniqueAssets[Each]} A collection of the unique assets attached to this record.
Record.UniqueAssets Tag {Record.UniqueAssets[Each](ItemValue=Tag)} The tracking number of the unique asset, e.g. barcode, RFID tag, etc.
Record.UniqueAssets CategoryName {Record.UniqueAssets[Each](ItemValue=CategoryName)} The name of the asset's category.
Record.UniqueAssets GroupName {Record.UniqueAssets[Each](ItemValue=GroupName)} The name of the asset's group.
Record.UniqueAssets TypeName {Record.UniqueAssets[Each](ItemValue=TypeName)} The name of the asset's type.
Record.UniqueAssets ProductCodeName {Record.UniqueAssets[Each](ItemValue=ProductCodeName)} The name of the asset's product code.
Record.UniqueAssets SerialNumber {Record.UniqueAssets[Each](ItemValue=SerialNumber)} The asset's serial number or crossref.

Known Limitations

  • It seems the product filters may not be fully compatible with each other. For example, during testing a Record Alert, a filter was set on Medical Gases (Asset Category) on the Asset Criteria setting. Then separate non-associated Asset Types were set under Advanced Asset Classification Filters. As a result, no alerts were generated when conducting record saves for any of the product types involved. When either of the filters were removed, then the alerts successfully fired.

Keywords

Alerts Fill Forms Record Alerts