Click or drag to resize
Sample templates
Print this page

This topic contains the following sections:

Retrieving data

The following template retrieves historical point data:

[Template]
TemplateVersion = 1.0
TableID = Point-1.0
TemplateName = RetrievePoints
Intent = Retrieve
OutputHeader = false
OrderBy = Input.UnitId, Input.Time              # Can have multiple sorts, comma-separated

[User]
ReportStart(Timestamp) = "Report start time"
ReportEnd(Timestamp) = "Report end time"

[Output]
label = Input.Tag
locationDate(yyyy-MM-dd) = ExtractDate(Input.Time)
locationTime = ExtractTime(Input.Time)
cityName = Input.Address.City
State = Input.Address.Region
Lat(DDDMMSS) = Input.Lat
Lon(DDDMMSS) = Input.Lon
Mileage(mile) = AccumulateOdometer(Input.Lat, Input.Lon, Input.Tag)
Ignition(01) = Input.Ignition

[Filter]
Time = Between(ReportStart,ReportEnd)

The following template retrieves marker data:

[Template]
TemplateVersion = 1.0
TableID = Marker-1.0
TemplateName = RetrieveMarkersOklahoma          # Finds Oklahoma markers
Intent = Retrieve
OrderBy = Input.DriverId

[Output]
Id = Input.Id
Label = Input.Tag
Number = Input.StreetNumber
Street = Input.StreetName
CityName = Input.City
State = Input.Region
Zip = Input.PostalCode
Lat(Degree) = Input.Lat
Lon(Angle, Degree) = Input.Lon
Radius(feet) = Input.Radius
Owner = Input.UserId

[Filter]
region = equals("Oklahoma")
Inserting data

The following template creates markers from an input CSV file:

[Template]
TemplateVersion = 1.0
TableID = Marker-1.0
TemplateName = MarkerMaker
Intent = Create
OutputHeader = false

[User]
PrimeCat(Text) = "Marker primary category"
Country(Text) = "Country"

[Output]
PrimaryCategoryId(Id) = PrimeCat
Tag = Input.OM01052
StreetNumber(StreetNumber) = Input.OM01054A
StreetName = Input.OM01054C
City = Input.OM01055A
Region = Input.OM01055B
PostalCode = Input.Om01055C
Lat(Degree) = Input.OM19961
Lon(Degree) = Input.OM19960
Country = Country
Retrieving XPATH data

The following template retrieves data from the unit table into an XPath document:

[Template]
TemplateVersion = 1.0
TableID = Unit-1.0
TemplateName = ResponseOfListOfLocation
Intent = Retrieve
Format = XPath                                   # Outputs to XML format
ElementName = Result/Location

[Output]
DivisionID = "14088"
ResourceID = Input.Serial
ResourceName = Input.Tag
Address/LandmarkName = Input.LastLocationMarkerName
Address/Number = Input.LastLocationAddress.StreetNumber
Address/Street = Input.LastLocationAddress.StreetName
Address/City = Input.LastLocationAddress.City
Address/State = Input.LastLocationAddress.Region
Address/Zip = Input.LastLocationAddress.PostalCode
Latitude(Degree) = Input.LastLocation.Lat
Longitude(Degree) = Input.LastLocation.Lon
Speed(mph) = Input.LastLocationSpeed
LocationTimeStamp(s,EST) = Input.LastReportTime

The following template also retrieves data from the unit table into an XPath document:

[Template]
TemplateVersion = 1.0
TableID = Unit-1.0
TemplateName = UnitReader
Intent = Retrieve
Format = XPath                                  # Outputs to XML format
OrderBy = Input.id

[Output]
Id = Input.Id
Tag = Input.Tag
Odo(km) = Input.Odometer
Vin = Input.vin
Year = Input.Year
Model = Input.Model
LastReportTime(yyyy/M/d H:mm:ss) = input.lastreporttime
Location/Lat(degree) = input.lastlocation.Lat
Location/Lon(degree) = input.lastlocation.Lon