Custom Fields
QEST Platform 5.6 Documentation
Applies to All
This article describes how to create, define and map custom fields to existing documents and lists. Use these instructions when information needs to be recorded which doesn't fit with the fields already available on a document or list.
Contents
Overview
Custom fields provide a way for additional information to be recorded that doesn't fit into the standard fields available in QEST Platform for documents, lists and equipment. Typically this consists of additional identification information, or specific information that a client requires to be recorded for a very large project. Administrators are able to configure user-defined fields for QESTLab work orders, samples, documents, lists and equipment. This is useful when custom data needs to be captured that is not available on existing worksheets. These custom fields may also be limited to a set of regions or laboratories. This allows for custom data that only needs to be captured in a specific region or municipality.
Document Custom Fields
Custom Field Sets
The configuration of the document custom field functionality is based around the concept of Custom Field Sets. These can be administered in the QEST Administrator Console, via Lab > Configuration > Custom Fields > Document.
A set can be thought of simply as a collection of fields, each of which can be used to store non-standard data entered by users in the QEST Platform. After creating a custom set, fields can be added to the set and further defined.
Custom Fields
Once a custom field is added to a set there are a number of properties which can be defined for that custom field.
Prompt
The prompt that will be displayed for the field input throughout the QEST Platform.
Field Name
The name to be used internally in the database. This value will be automatically set after entering a value for the Prompt which means it does not usually need to be modified. The field name is required to meet strict formatting requirements and must be unique.
Type
The following types can be chosen for the field: String, Date/Time, Integer or Decimal based on what best suits the data that will be recorded.
Length
This property only applies to fields where the String type has been chosen. The maximum number of characters that can be recorded in the field is required to be specified.
Certain properties of a custom field are not available for modification after the initial save of the field. The Field Name, Type and Length should all be checked for correctness before saving.
Format
The format column is generally useful for specifying a format for numeric, date/time and list data, and affects how the field data is displayed in QESTLab. The format strings are generally very similar to the types that you might define in Microsoft Excel (see Formatting Custom Fields for more detailed information regarding supported formats).
Link To
The Link To column is available for custom fields that are associated with a QESTLab list (see Formatting Custom Fields for more information on linking custom fields together).
Bulk Entry
The bulk entry column specifies whether the custom field will be displayed on the bulk entry for this document in QESTLab. Custom fields are displayed in the bulk entry after the standard fields for that document.
Auto-fill
The auto-fill column specifies whether the custom field uses the auto-fill feature of the bulk entry. This property can only be set if the custom field has been configured for bulk entry display. The auto-fill column also determines whether the custom field uses the cross-fill feature of QESTField.
Auto-fill in QESTLab and cross-fill in QESTField have the same purpose, to copy relevant data from the previous test/sample of the same type on the work order. They do not however behave in an identical fashion. QESTLab's bulk entry applies auto-fill each time the user selects a field or presses the auto-populate button. QESTField applies cross-fill when a sample or test is created.
Report
The Report column specifies whether the custom field will be reported by the applicable Material Test Report. The custom field will be reported using the Prompt and Format specified for the custom field. All tests which have this custom field set will report this custom field after their standard reported fields on the applicable Material Test Report.
To allow a custom field to be reported for some documents and not for others, it is possible to add custom fields with the same Field Name to multiple custom field sets. The custom fields are required to have the same Type and Length. The custom field sets cannot be associated to any of the same documents to avoid conflicts.
Document Associations
Once custom fields have been added to a custom fields set, the set will need to be associated with one or more documents. The custom fields will not be available to the user when they are working on documents not associated with the set. Typically a set should only need to be associated with a single document (such as a work order), or perhaps for all samples (Aggregate/Soil, Asphalt, etc.). This can be done on the Documents tab of a custom field set.
Associating a custom field set with a document type will add the fields to one or more database tables; see the Database Implications section later in this article.
Equipment Associations
Custom field sets can be associated with one or more items of equipment, in addition or as alternative to documents. The custom fields will not be available to the user when they are working on equipment not associated with the set. Typically a set should only need to be associated with a single equipment. The Link To, Bulk Entry, AutoFill and Report field properties are not used for equipment custom fields. The custom fields will be available for recording values with equipment calibrations. This can be done on the Equipment tab of a Custom Field Set.
Associating a custom field set with an equipment type will add the fields to one or more database tables; see the Database Implications section later in this article.
QESTField Workflow Associations
Custom fields can be displayed seamlessly within QESTField workflows. To users, they appear no different to any other data entry fields in the workflow. Custom field sets associated to a sample can be displayed on QESTField workflows that incorporate that sample type. Custom field sets can be shown at different positions within QESTField workflows, or hidden entirely in QESTField. This is configured using the Position drop down on the QESTField tab of a custom field set.
- Hidden - the custom field set will not be shown in QESTField.
- Start of workflow - the custom field set will be displayed at the start of the first phase of the workflow.
- After sample location - the custom field set will be displayed immediately after the sample location information in the workflow. If there is no sample location information in the workflow, the custom field set will be displayed at the end of the first phase of the workflow instead.
- End of first phase - the custom field set will be displayed at the end of the first phase of the workflow.
The order that custom fields and custom field sets are displayed in QESTField workflows is not configurable. They will be displayed in the same order that they are displayed in the QEST Administrator Console.
Region Associations
Finally, a custom field set must be associated with one or more regions or laboratories. This can be done in the QEST Administrator Console, via Lab > Configuration > Regions, Custom Field Sets tab. A list of all the document custom field sets in the system will be displayed. The sets will only be available for users in regions or laboratories where the set has been associated.
Custom field set associations are inherited from parent regions. These inherited associations will be display in gray text and can only be edited by navigating to that parent region.
List Custom Fields
Custom Field Sets
These can be configured in the same way they are for document custom fields.
Custom Fields
Once a custom field is added to a set there are a number of properties which can be defined for that custom field.
Prompt
The prompt that will be displayed for the field input throughout the QEST Platform.
Field Name
The name to be used internally in the database. This value will be automatically set after entering a value for the Prompt which means it does not usually need to be modified. The field name is required to meet strict formatting requirements and must be unique.
Type
Only one type, String, is supported for list custom field sets..
Length
This property only applies to fields where the String type has been chosen. The maximum number of characters that can be recorded in the field is required to be specified.
Certain properties of a custom field are not available for modification after the initial save of the field. The Field Name, Type and Length should all be checked for correctness before saving.
Format
The format column is generally useful for specifying list data, and affects how the field data is displayed in QESTLab. The format strings are generally very similar to the types that you might define in Microsoft Excel (see Formatting Custom Fields for more detailed information regarding supported formats).
Link To
The Link To column is available for custom fields that are associated with a QESTLab list (see Formatting Custom Fields for more information on linking custom fields together).
Visible
The visible column specifies whether the custom field will be displayed on the list entry so that users can record data against the field for individual list items.
List Associations
Once custom fields have been added to a custom fields set, the set will need to be associated with one or more lists. This can be done on the Lists tab of a custom field set. Only the Client and Project lists are supported.
Associating a custom field set with a list type will add the fields to one or more database tables; see the Database Implications section later in this article.
Region Associations
These can be configured in the same way they are for document custom fields.
Custom Field Considerations
This section contains some items that should be considered by QEST Platform administrators and database administrators before custom fields are created.
Database Implications
This functionality has unique implications for the QEST Platform database, as each of the custom fields will be added to the definitions of one or more database tables.
The tables to which the custom fields will be added depends on the document, equipment or list types associated with the set. For example, consider a custom field set containing two fields, _OrderNo and _OrderDate. If this set is associated with Work Orders and with Agggregate/Soil Samples, the following fields will be added to the QEST Platform database:
- WorkOrders._OrderNo
- WorkOrders._OrderDate
- SampleRegister._OrderNo
- SampleRegister._OrderDate
The implications of this model are mostly beneficial; for example, it means that all such fields are available for use in QESTLab management reports, filters, external document integration, and integration with other external systems that may query the QESTLab database.
A list of all custom fields in the database can be obtained with a simple SQL query, because only custom fields begin with an underscore character:
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME LIKE '[_]%'
Deleted data
Custom fields can be removed from database tables in the QEST Administrator Console either by deleting the fields from a set, or by disassociating the set from document types (for example, disassociating a set from the Aggregate/Soil Sample means that the fields are no longer required on the SampleRegister table).
When QESTLab identifies database columns that are no longer defined in the custom field sets, it will automatically remove them only if there is no data in the column. A database administrator can safely remove these columns from the database if necessary. Such columns may be identified with the qest_GetCustomFields_Extraneous stored procedure.
If a custom set is removed, but the database columns still exist with valid data, a warning will be displayed to the user each time they make a change to the Custom Field Set. Though annoying, this helps to ensure that the database schema is not made unnecessarily messy. Custom data that exists without a valid custom set should be either manually deleted, or have a custom field set re-created for it.
Stored procedures
This functionality also installs a number of stored procedures and functions into the database. These are used by QESTLab, but administrators may also be able to put these to some use:
- qest_GetParentRegions (@LabNo int)- a function that returns a result set containing all the regions in which the specified lab or region exists.
- qest_GetCustomFields(@QestID int, @LabNo int)- returns a set of custom fields that will appear within a given document / laboratory context. Mainly for internal use.
- qest_GetCustomFields_Extraneous- returns a set of custom fields that exist within the database schema but that are no longer defined as custom fields in QESTLab. For trouble-shooting purposes.
- qest_GetCustomFields_Missing- returns a set of custom fields that are defined as custom fields in QESTLab, but that do not exist within the database schema. For trouble-shooting purposes.
Security
In order to use this functionality, the logged-in user must have security permissions in the database that allow them to add or remove columns from any of the QESTLab database tables. A warning will be displayed to the user if they attempt to make changes in the QEST Administrator Console but do not have appropriate permissions.
License changes
The functionality described in this document may be turned on or off via a license feature.
If the feature is removed from the license after data fields have already been added, those fields will no longer be available in the QEST Platform, but will continue to exist in the database. The Custom Fields node will not be available in the QEST Administrator Console.
QESTNET Service
The QESTNET service only loads the configuration of custom fields once when the service is started. If any changes are made to custom fields the QESTNET service will need to be restarted before changes are displayed for custom fields in QESTField.
Standard Functionality
Custom fields interact with a range of standard functionality in QEST Platform. To a large extent, they work the same as any native database field, but, there are a few specific cases to be aware of.
Audit Trail
Changes to custom fields will appear in the audit trail in QESTLab, just like any other field. They can be identified by way of the field name (which always has a leading underscore).
Concurrency
Custom fields behave exactly the same way as standard fields when it comes to concurrency. Conflicts resulting from concurrent changes to custom fields are resolved with the same rules as standard fields. Internally they behave a little differently, but the effect is identical.
Counters
Counters can be configured for custom fields, just the same as any other field. When configuring a counter, use the field name of the custom field (which always has a leading underscore). Custom fields that have a counter assigned will be read-only for all documents in the same custom field set, unless the User Edit setting is checked. If you wish for a custom field with a counter to be editable for some documents, and not others, you need to create separate custom field sets (one for the documents in which it is editable, and a second set for documents in which user editing is disabled.
Data Filters
Custom fields may be included in data filters, which may be used to search for documents within the system, or as data sources for management reports. Including a custom field is the same as including a standard field; provided you have associated the custom field set with the appropriate document, the custom fields should all be available for selection when building the filter.
Defaults
Default values can be configured for custom fields, just the same as any other field. When configuring a default value, use the field name of the custom field (which always has a leading underscore).
External Documents and Forms
For customers wishing to integrate custom fields into external documents (such as dynamic worksheets or external test reports) or Forms, simply ensure that you perform an XSD export after you have added custom fields, and use that XSD file in the Word, Excel or PDF template. The custom fields will all be available (prefixed with underscores) at the appropriate document level.
Management Reports
Most of the work involved here is in setting up the filter that feeds the management report; therefore see the previous section on filters. Once a filter has been defined, the custom fields may be added to the management report just as normal fields are.
Masks
Default values can be configured for custom fields, just the same as any other field, however, note that Masks are not supported in QESTField. When configuring a mask, custom fields can be identified by way of the field name (which always has a leading underscore).
Specification Limits
Specification limits can be configured for numeric custom fields, just the same as any other field. Specification limits will be displayed in QESTField alongside the input field, and a failing specification limit on a custom field will set the 'out of specification' flag for the test or sample. Specification limits will also display in QESTLab reports for custom fields that are configured to be reported. When creating a specification limit in QESTLab, custom fields can be identified by way of the field name (which always has a leading underscore).
Products described on these pages, including but not limited to QESTLab®, QESTNet, QESTField, QEST Web App, Construction Hive, and associated products are Trademarks (™) of Spectra QEST Australia Pty Ltd and/or related companies.
The content of this page is confidential. Do not share, duplicate or distribute without permission.
© 2024 Spectra QEST® Australia Pty Ltd and/or related companies. Terms of Use and Privacy Statement
Related content
Integrity | Curiosity | Empathy | Unity
The content of this page is confidential and for internal Spectra QEST use only. Do not share, duplicate or distribute without permission.