FormInstance table |
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:
When you write templates that access this table, follow these requirements:
Specify the Symbolic Name for the table version to use:
TableID = FormInstance-1.0
Specify an Intent that this table supports:
[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"])
[Filter] InstanceHistoryId = Equals(historyId) # You can filter on literals or on variables from the [User] or [Calculated] sections.
[Filter] InstanceHistoryId = In(["InstanceHistoryId1","InstanceHistoryId2","InstanceHistoryId3"])
[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
[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
[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
[Filter] SubmissionTime = GreaterThan(TimeStart) # You can use either a Between or GreaterThan function
[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
[Filter] LastUpdateTime = GreaterThan(TimeStart) # You can use either a Between or GreaterThan function
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: