Click or drag to resize
Telogis keys
Print this page

To look up record Ids using other unique, non-Id columns, you can use alternative primary keys, called Telogis keys. Along with external keys, Telogis keys provide additional options for accessing data.

For example, when you look up an existing driver, you likely have a driver name rather than the internal Telogis system Id associated with the name. In non-Retrieve templates, you can look up the driver Id from your template by using the driver name (Driver.Nickname) as a Telogis key. For details on using keys to look up values, see How to use keys.

Note Note

You can find Telogis keys in a table's column documentation. Check the column descriptions to find the Telogis keys for the table.

This topic contains the following sections:

Syntax for Telogis keys

Telogis keys have a special, two-part data type: Id-being-sought(Telogis, non-Id-key-column)

The two-part data type indicates that the column is being accessed by way of a different unique column (an alternative primary key) in a TDE table. The syntax for identifying an input column as a Telogis key is to use a name/value pair where:

  • Name portion (left side) declares the name of the Telogis Id ("Id") with the two-part data type: "Telogis," and the name of the Telogis key, which is the column being referenced.
  • Value portion (right side) is the column of your input file that contains your Telogis key value.

For example, the Unit table has columns that reference the Driver table, such as DriverId (Driver.Id) and DriverName (Driver.Nickname), which is a Telogis key. Using that key lets you look up drivers by name from a Unit table template:

[Template]
TableID = Unit-1.0
...
[Output]
DriverId(Telogis, Nickname) = Input.DriverName     # UnitColumn(Telogis, DriverColumn)

Telogis keys are valid for these intents:

  • Create
  • Delete
  • Update
  • CreateOrUpdate - if the lookup succeeds, it will update; if the lookup fails, it will create.
Example template

Here is an example of a complete template that uses Telogis keys:

[Template]
TemplateVersion = 1.0
TableID = Unit-1.0
TemplateName = UpdateUnitsTelogisKey

Intent = Update
Format = Csv
Output = CompleteSuccessful
OrderBy = Input.Tag

[Output]
Id(Telogis, Tag) = Input.Tag
InstallType(Telogis, Name) = Input.InstallTypeName
DriverId(Telogis, Nickname) = Input.DriverName