Click or drag to resize
FormInstance table
Print this page

The FormInstance table allows you to retrieve different versions of a custom form submitted by a driver. A single form instance can have several versions. The form instance includes the response data that a driver provided for each form item.

You define forms in Fleet. Drivers complete forms by using a Verizon Connect Mobile application like WorkPlan. When the driver submits the form, the system creates a form instance. You retrieve the form data by using the FormInstance table. For details on this process, see the Sample FormInstance template.

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 = FormInstance-1.0

  2. Specify an Intent that this table supports:

    • Retrieve

  3. Retrieve templates: This table requires the use of a fetcher. The following fetchers are available and are listed from most efficient to least:
    1. Id (Equals/In)
      [Filter]
      Id(ExtId) = Equals(Id1)   # You can filter on literals or on variables from the [User] or [Calculated] sections.
      [Filter]
      Id(ExtId) = In(["Id1","Id2","Id3"])
    2. InstanceHistoryId (Equals/In)
      [Filter]
      InstanceHistoryId = Equals(historyId)                   # You can filter on literals or on variables from the [User] or [Calculated] sections.
      [Filter]
      InstanceHistoryId = In(["InstanceHistoryId1","InstanceHistoryId2","InstanceHistoryId3"])
    3. JobId (Equals/In)
      [Filter]
      JobId = In(["JobId1","JobId2","JobId3"])                # You can filter on literals or on variables from the [User] or [Calculated] sections.
                                                              # You can use either an Equals or In function
    4. DriverId (Equals/In) AND FormTemplateHistoryId (Equals) AND SubmissionTime (Between/GreaterThan)
      [Filter]
      DriverId = Equals("DriverId1")                          # or use Telogis Id: UserId = Equals("123456...")
      FormTemplateHistoryId(ExtId) = Equals("ABC123")         # or use Telogis Id: UserId = Equals("123456...")
      SubmissionTime = Between(TimeStart,TimeEnd)             # You can use either a Between or GreaterThan function
      [Filter]
      DriverId = In(["DriverId1","DriverId1","DriverId3"])    # or use Telogis Id: UserId = Equals("123456...")
      FormTemplateHistoryId(ExtId) = Equals("ABC123")         # or use Telogis Id: UserId = Equals("123456...")
      SubmissionTime = Between(TimeStart,TimeEnd)             # You can use either a Between or GreaterThan function
    5. FormTemplateHistoryId (Equals) AND SubmissionTime (Between/GreaterThan)
      [Filter]
      FormTemplateHistoryId(ExtId) = Equals("ABC123")         # or use Telogis Id: UserId = Equals("123456...")
      SubmissionTime = Between(TimeStart,TimeEnd)             # You can use either a Between or GreaterThan function
    6. SubmissionTime (Between/SubmissionTime (GreaterThan)
      [Filter]
      SubmissionTime = GreaterThan(TimeStart)                 # You can use either a Between or GreaterThan function
    7. FormTemplateHistoryId (Equals/In) AND LastUpdateTime (Between/GreaterThan)
      [Filter]
      FormTemplateHistoryId(ExtId) = Equals("ABC123")         # or use Telogis Id: UserId = Equals("123456...")
      LastUpdateTime = Between(TimeStart,TimeEnd)             # You can use either a Between or GreaterThan function
    8. LastUpdateTime (Between/GreaterThan)
      [Filter]
      LastUpdateTime = GreaterThan(TimeStart)                 # You can use either a Between or GreaterThan function
FormInstance column descriptions

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

Column Data Type Description
Id Id (primary key) The Id of the form instance.
SubmissionTime Timestamp Time when the form instance was submitted.
LastUpdateTime Timestamp Time when the form instance was last updated.
OpenTime Timestamp Time when the form was most recently opened by the user for editing.
CloseTime Timestamp Time when the form was most recently closed by the user after editing was complete.
OpenDuration Number The length of time that this form revision was edited for, in seconds
Status EnumType The status of the form instance. Values: Saved, Submitted.
Values Map<Text,FormFieldValue> The form field values submitted in the form instance.
DriverId Id<Driver> The Id of the driver that submitted the form instance.
UnitId Id<Unit> The Id of the unit the driver was assigned to when the form instance was submitted.
JobId Id<Job> The Id of the job associated with the form instance.
Location Address The location where the form instance was submitted.
FormTemplateId Id<FormTemplate> The Id of the particular revision of the form template on which this form instance is based.
FormTemplateHistoryId Id The Id shared across all revisions of the form template on which this form instance is based. While the FormTemplateId changes for each new revision of the form template, the FormTemplateHistoryId remains the same for all revisions.
InstanceHistoryId Id The Id shared across all versions of a form instance. While the FormInstance Id changes for each new version of a form instance, the InstanceHistoryId remains the same for all versions.
Version Number The current version number of the form instance. The version number starts at 1 and increments on the next revision after each submitted revision. Saved revisions share the same version number as their submitted revision.

Additional columns:

Column Data Type Description
CustomerId Id (read-only, all Fleet tables) The ID of the customer/owner.
CustomerFullName Text (read-only, all Fleet tables) The human-readable full name of the customer/owner.