Click or drag to resize
DrivingPeriod table
Print this page

The DrivingPeriod table represents the entire driving period of a vehicle.

This topic contains the following sections:

Requirements

When you write templates that access this table, follow these requirements:

  1. Specify the Symbolic Name for the table version to use:

    TableID = DrivingPeriod-1.0

  2. Specify an Intent that this table supports:

    • Retrieve

  3. Retrieve templates: The [Filter] tag is required. Fetchers are available to optimize your query.

    Note Note

    To use fetchers, you must either be a main account user with admin privileges, or have been assigned admin privileges.

    The following fetchers are listed from most efficient to least:

    1. Get particular driving periods by id.

      DrivingPeriodId (Equals/In)

      [Filter] DrivingPeriodId(ExtId) = Equals(Id1)   # You can filter on literals or on variables from the [User] or [Calculated] sections.
      [Filter]DrivingPeriodId(ExtId) = In(["Id1","Id2","Id3"])
    2. Get all driving periods by date (dates must be within 28 days of each other).

      [Filter]
      StartTime=Between(Start, End)
    3. Get all driving periods by date and status type (dates must be within 28 days of each other).

      [Filter]
      StartTime=Between(Start, End)
      DrivingPeriodStatus In([“Status1”, “Status2”])
      Or
      DrivingPeriodStats Equal(“Status1”)

      When using the StartTime filter, the values for “Start” and “End” will be retrieved from the query parameters. An example query may look like this:

      {baseurl}/execute?template=GetDrivingPeriodIds&Start=10-13-2022&End=10-30-2022
    Example retrieve request
    [Template]
    TemplateVersion = 1.0
    TableID = DrivingPeriod-1.0
    TemplateName = GetDrivingPeriodIds
    Intent = Retrieve
    OrderBy = Input.StartTime
    
    [User]
    Start(Timestamp) = "Start"
    End(Timestamp) = "End"
    
    [Filter]
    StartTime= Between(Start, End)
    
    [Output]
    DrivingPeriodId = Input.DrivingPeriodId
    UnitId = Input.UnitId
    DriverId = Input.DriverId
    StartTime = Input.StartTime
    EndTime = Input.EndTime

    To run this template, two parameters are expected: “Start” and “End”. The start time and end time must be within 28 days of each other.

DrivingPeriod column descriptions

This list includes each column's name, which you use in expressions to retrieve or create data, and data type, which defines how the data is retrieved and set.

Note Note
If a column of data type Id is a primary key OR if it refers to other tables (Id <OtherTable>), then you can map it to an external key or, in some cases, a Telogis key.
Column Data Type Description
DrivingPeriodId Id (primary key) The Id of the unidentified driving period.
UnitId Id The ID of the vehicle to which the driver is assigned.
DriverId Id The ID of the driver to whom the unidentified driving period has been assigned.
DrivingPeriodStatus Text The status of the unidentified driving period. Values (and their description and number returned in parentheses): Unclaimed (not yet claimed by a driver - 1); Assigned (assigned to a driver - 2); Claimed (claimed by a driver - 3); Recorded by ELD (recorded by ELD - 4); Rejected (rejected by a driver - 5); Exempt (will not be assigned to a driver - 6).
StartTime Timestamp The time of day that the unidentified driving period started.
EndTime Timestamp The time of day that the unidentified driving period ended.
Comment Text Free text to justify the status of the driving period. Usually only used if the status is Exempt.