forms Schema Description

Documentation Updated: 2024-09-10

form_attachments

Defines the relation between a form and an attachment stored in the Docs service
1idstring: UUIDID of this form attachment record
2bim360_account_idstring: UUIDBIM 360 HQ Account ID.
3bim360_project_idstring: UUIDAdded for project scoping of issues data
4form_idstring: UUIDForeign Key:
Table: forms.id The form this attachment is on
Column:
5attachment_idstring: UUIDUnique ID for the attachment
6attachment_typestringA Form specified type describing the attachment, e.g. form
7item_urnstringThe URN for the attachment lineage in Docs. This is the attachment's unique identifier as far as Docs is concerned.
8is_deletedbooleanIndicates whether or not the attachment has been deleted.
9updated_bystringThe user that last updated the attachment.
10created_bystringThe user that created the attachment.
11created_attimestamp: SQLThe date the form attachment was created.
12updated_attimestamp: SQLThe date the form attachment was updated.

form_files

For PDF based forms, information about the PDF files
1idstring: UUIDUnique id for this file
2bim360_account_idstring: UUIDBIM 360 HQ Account ID.
3bim360_project_idstring: UUIDAdded for project scoping of issues data
4form_idstring: UUIDForeign Key:
Table: forms.id Id of the form this file is associated with
Column:
5extracted_form_datastring: nullData extracted from the filled PDF in JSON format

form_sections

The sections of a form with section assignment
1idstring: UUIDid of this form section
2bim360_account_idstring: UUIDBIM 360 HQ Account ID.
3bim360_project_idstring: UUIDAdded for project scoping of issues data
4form_uidstring: UUIDThe uid for the form this section belongs to
5statusstringThe status of the form section
6assignee_idstringThe assignee id the section is assigned to
7assignee_typestringThe type of assignee the section is assigned to
8created_attimestamp: SQLThe date the form section as created
9created_bystringThe creator of the form section
10updated_attimestamp: SQLThe date the form section was updated at
11updated_bystringThe user that updated the form section
12user_created_attimestamp: SQLThe date the form section was created by the user (in the case of creating the form section offline, and using mobile sync)
13last_completed_bystringThe last completed user of this form section
14last_completed_attimestamp: SQLThe last completed date of this form section
15last_reopened_bystringThe last reopened user of this form section
16last_reopened_attimestamp: SQLThe last reopened date of this form section

form_templates

Form templates define the forms a user can fill out. These can either be smart PDFs or native.
1created_bystringWho created the template
2updated_attimestamp: SQLWhen the template was last updated
3idstring: UUIDUnique id for this template
4bim360_account_idstring: UUIDBIM 360 HQ Account ID.
5bim360_project_idstring: UUIDAdded for project scoping of issues data
6namestringThe name of the template
7statusenum: stringPossible Values:
  • active
  • inactive
  • deleted
The status of the template
8file_idstring: UUIDForeign Key:
Table: form_files.id If this is a PDF form
Column: the id of the file
9native_form_idstring: UUIDForeign Key:
Table: native_forms.id
Column:
10template_typestring: nullA semi-colon separated list of these possible values:
  • SEMI_COLON_LIST: null; pg.template_type.safety; pg.template_type.punchlist; pg.template_type.other; pg.template_type.other; pg.template_type.quality; pg.template_type.commissioning; pg.template_type.daily_report; pg.template_type.time_sheet
Template type for the form

forms

Instances of forms created by users. The type (pdf/native) and content is determined by the template.
1idstring: UUIDUnique id for this form
2bim360_account_idstring: UUIDBIM 360 HQ Account ID.
3bim360_project_idstring: UUIDAdded for project scoping of issues data
4template_idstring: UUIDForeign Key:
Table: form_templates.id The template this form is an instance of
Column:
5statusstringPossible Values:
  • in_progress
  • discarded
  • closed
  • archived
  • in_review
The status of the form
6assignee_idstringWho the form is assigned to - this field is deprecated and you should use assignee_type and assignee_type_id
7numbernumberUser facing report number
8form_datedate: stringThe date set on the form
9notesstring: nullUser filled notes
10descriptionstring: nullUser filled description
11weather_idnumberForeign Key:
Table: weather.id Weather associated with form
Column:
12native_form_idstring: UUIDFor native forms, FK to form data
13file_idstring: UUIDForeign Key:
Table: form_files.id For PDF forms
Column: information about the PDF file
14created_bystringWho created the form
15updated_attimestamp: SQLWhen was the form last updated
16location_idstring: UUIDForeign Key:
Table: locations.nodes.external_id Reference to the location associated with the form.
Column:
17last_reopened_bystring: UUIDWho last reopened a form
18last_submitter_signaturestring: nullUser filled signature
19due_datedate: stringThe date the form is due, may be null.
20created_attimestamp: SQLThe date the form was created
21last_submitted_attimestamp: SQLThe date the form was submitted on
22assignee_type_idstringWho the form is assigned to - this value is the uuid of a user, company or role. The assignee_type field will indicate which. The value can then be joined on the admin.users, admin.companies or admin.roles tables respectively to retrieve information about the assignee.
23assignee_typestring: nullThe type of assignee - NULL is a user, 'company' is a company, 'role' is a role
24namestring: nullThe name of the form - nullable value - a backfill is being completed to default the value of this field to the template name

layout_section_items

Defines the items in a layout section
1uidstring: UUIDThe Id of this layout section item
2layout_uidstring: UUIDForeign Key:
Table: layouts.uid Foreign key to layout that this section item is a part of
Column:
3section_uidstring: UUIDForeign Key:
Table: layout_sections.uid Foreign key to layout section that this item is a part of
Column:
4bim360_account_idstring: UUIDBIM 360 HQ Account ID.
5bim360_project_idstring: UUIDAdded for project scoping of issues data
6sort_indexnumberThe index of this section item starting from 0
7labelstringThe label of this section item
8schemastringForeign Key:
Table: native_form_values.field_id The schema id for this section item
Column:
9value_namestringDetermines the question type, also the value name that should be used to answer the field.
10descriptionstringThe text to use to describe this value.
11is_requiredbooleanDetermines if the question must be filled before a form can be submitted.
12modifierstringFor toggle_val fields, determines the display words used for the question (Yes/No/NA vs True/False/NA vs ...)\nFor choice_val fields, determines if it displays as a dropdown (default radio buttons)
13presetsstringFor array_val / choice_val
14typestringWhat type of UI component should be generated for this Element. One of `field` or `table`.
15display_indexnumberThe section item number, if it exists

layout_sections

Defines the sections of a layout
1uidstring: UUIDId of this layout section record
2layout_uidstring: UUIDForeign Key:
Table: layouts.uid Foreign key to layout that this section is a part of
Column:
3bim360_account_idstring: UUIDBIM 360 HQ Account ID.
4bim360_project_idstring: UUIDAdded for project scoping of issues data
5sort_indexnumberThe index of this section starting from 0
6labelstringThe label for this section
7descriptionstringThe description of this section
8form_section_idstring: UUIDForeign Key:
Table: form_sections.id Foreign key to layout that these sections are a part of
Column:
9assignee_idstringThe assignee id the section is assigned to
10assignee_typestringThe type of assignee the section is assigned to
11display_indexnumberthe section number, if it exists

layout_table_columns

Defines the items in a layotu section
1uidstring: UUIDThe Id of this layout table column
2layout_uidstring: UUIDForeign Key:
Table: layouts.uid Foreign key to layout that this table column are a part of
Column:
3section_item_uidstring: UUIDForeign Key:
Table: layout_section_items.uid Foreign key to layout section that this column is a part of
Column:
4bim360_account_idstring: UUIDBIM 360 HQ Account ID.
5bim360_project_idstring: UUIDAdded for project scoping of issues data
6sort_indexnumberThe index of this table column starting from 0
7presetsstringAutocomplete or drop-down options
8value_namestringIf an Element has a value_name attribute, the value displayed is to be bound to the corresponding value in the values segment.
9values_providerstringIf set, only data from the indicated source will be allowed (companies: project companies, roles: account roles, presets: the presets field list)
10labelstringThe text to use to describe this value.

layouts

Defines the layout of a native form template
1uidstring: UUIDId of this layout record
2bim360_account_idstring: UUIDBIM 360 HQ Account ID.
3bim360_project_idstring: UUIDAdded for project scoping of issues data
4descriptionstringDescription of the layout
5has_section_assigneesbooleanIndicates that this layout has section assignees
6created_attimestamp: SQLThe date the layout was created
7created_bystringThe creator of the layout
8updated_attimestamp: SQLThe date the layout was updated
9updated_bystringThe user that updated the layout
10user_created_attimestamp: SQLThe date the form section was created by the user (in the case of creating the form section offline, and using mobile sync)

native_form_section_item_attachments

Defines the relation between a Form and an attachment stored in the Docs service
1idstring: UUIDID of this form field attachment record
2bim360_account_idstring: UUIDBIM 360 HQ Account ID.
3bim360_project_idstring: UUIDAdded for project scoping of issues data
4native_form_idstring: UUIDForeign Key:
Table: native_forms.id The native form this attachment is on
Column:
5section_item_uidstring: UUIDForeign Key:
Table: layout_section_items.uid The section item this attachment is on
Column:
6attachment_idstring: UUIDUnique ID for the attachment
7attachment_typestringA Form specified type describing the attachment, e.g. form-field
8item_urnstringThe URN for the attachment lineage in Docs. This is the attachment's unique identifier as far as Docs is concerned.
9is_deletedbooleanIndicates whether or not the attachment has been deleted.
10updated_bystringThe user that last updated the attachment.
11created_bystringThe user that created the attachment.
12created_attimestamp: SQLThe date the form attachment was created.
13updated_attimestamp: SQLThe date the form attachment was updated.

native_form_values

Stores users answers to native form questions
1idstring: UUIDUnique id for the value
2bim360_account_idstring: UUIDBIM 360 HQ Account ID.
3bim360_project_idstring: UUIDAdded for project scoping of issues data
4native_form_idstring: UUIDForeign Key:
Table: native_forms.id Id of the native form the value belongs to
Column:
5ranknumberThe display order of this row. Rows are displayed sorted by rank Integer. Not guaranteed to be gapless (e.g. if we have 2 rows with ranks 5 , 7, clients should display only 2 rows with no gaps). Also, not guarenteed to be unique. This allows for a row to be deleted without updating the rank of all subsequent rows.
6field_idstringIdentifier for an item in a form (not necessairly a UID) may refer to a table or individual question, depending on the case there may be multiple value rows. These ids can be used to aggregate results, some ids may be consistant between different templates.
7notesstring: nullNotes added to a response
8namestring: nullFor signatures, the text name of the signer; For tables, the "fallback" company name of the associated company_id
9svg_valstring: nullFor signatures: SVG image of signature
10array_valstring: nullFor multi-select answers: array of selected answer values
11number_valnumberFor numeric answers: number value
12text_valstring: nullFor text answers: answer value
13choice_valstring: nullFor single-select answers: answer value
14toggle_valnumberFor toggle answers: 0 - false/no/minus, 1 - true/yes/plus, 2 - NA
15date_valdate: stringFor date answers: date value
16descriptionstring: nullFor tables: description of the row
17itemstring: nullFor material and equipment logs: name of the thing
18quantitynumberFor material and equipment logs: how many things
19unitstring: nullFor material logs: what measurement unit is quantity in
20timespanstringFor work and equipment logs: the amount of time
21tradestring: nullFor worklogs: the name of the trade or crew
22headcountnumberFor work logs: how many people
23company_idstring: UUIDFor tables: company to which the crew members performing the logged work belong
24role_idstring: UUIDFor tables: role of the crew members performing the logged work
25ot_timespanstring: nullFor work and equipment logs: the amount of overtime
26role_namestring: nullFor tables: the "fallback" role name of the associated role_id

native_forms

Defines a native form e.g. the layout specifies the sections, questions, and other metadata.
1updated_attimestamp: SQLWhen the form was last updated
2bim360_account_idstring: UUIDBIM 360 HQ Account ID.
3bim360_project_idstring: UUIDAdded for project scoping of issues data
4idstring: UUIDUnique id for this native form
5template_idstring: UUIDForeign Key:
Table: native_forms.id For native_forms of form instances (not templates) this is a foreign key to the native_form that defined the template when the form instance was created. This may be different from the current native form that defines the template
Column: if the template has been edited.
6layout_uidstring: UUIDForeign Key:
Table: layouts.uid For native_forms of form templates (not instances) this is a foreign key to the layout that defines the template.
Column:

weather

The daily weather information for forms with weather enabled
1idnumberId of this weather record
2bim360_account_idstring: UUIDBIM 360 HQ Account ID.
3bim360_project_idstring: UUIDAdded for project scoping of issues data
4datedate: stringDate of the weather event
5summary_keystring: nullA semi-colon separated list of these possible values:
  • SEMI_COLON_LIST: null;snow;cloudy;sleet;clear;partly-cloudy;rain;wind;fog
Summary of the weather
6temperature_minnumberMinimum temperature of day in fahrenheit
7temperature_maxnumberMaximum temperature of the day in fahrenheit
8humiditynumberA percentage value indicating the humidity over the course of the day.
9wind_speednumberThe average wind speed observed throughout the day in miles per hour
10wind_gustnumberThe maximum wind speed observed throughout the day in miles per hour
11wind_bearingnumberThe direction the wind is coming from - north is 0 degrees, progressing clockwise
12fetched_attimestamp: SQLWhen the weather was fetched from weather service provider
13precipitation_accumulationnumberThe amount of precipitation accumulated throughout the day in inches

weather_hours

The hourly weather information for forms with weather enabled
1weather_idnumberForeign Key:
Table: weather.id Foreign key to weather of the day these hours are part of
Column:
2bim360_account_idstring: UUIDBIM 360 HQ Account ID.
3bim360_project_idstring: UUIDAdded for project scoping of issues data
4hourstringTime of day this weather row is for
5summary_keystring: nullA semi-colon separated list of these possible values:
  • SEMI_COLON_LIST: null;snow;cloudy;sleet;clear;partly-cloudy;rain;wind;fog
Summary of the weather
6tempnumberTemperature in fahrenheit
7wind_speednumberThe average wind speed observed throughout the day in miles per hour
8wind_bearingnumberThe direction the wind is coming from - north is 0 degrees, progressing clockwise
9humiditynumberA percentage value indicating the humidity
10fetched_attimestamp: SQLWhen the weather was fetched from weather service provider
11created_attimestamp: SQLWhen the row was created
12updated_attimestamp: SQLWhen the row was updated