Field Properties Reference

2024-03-29

Each field in a data-structure design is associated with a set of properties of that field. This topic covers the options available and specific to fields of each data type. In addition, fields of all types have name and linking options and most include validation options, described in the common topic: Field Editor.

Type Specific Formatting Options

Text Options

Text Choice Options

A Text Choice field lets you define a set of values that will be presented to the user as a dropdown list. For example, you might offer a "Tube Type" field and let the user choose Heparin, EDTA, or Unknown.

  • Text Choice Options:
    • Add and manage the set of drop-down values offered for this field, as shown below.
  • Name and Linking Options
Click Add Values to enter the values to be presented for this field. Users will be able to choose from dropdown lists when entering or editing data.

Learn more about populating, editing, and managing text choice fields in the main LabKey documentation topic for Text Choice fields.

  • Up to 200 values can be included in the drop-down options. Values can be single- or multi-word.
  • You can change an existing Text field to the Text Choice type; the list of drop down values will be populated for you.
  • Values that are in use cannot be deleted. If they are in use by read-only data, they can neither be edited nor deleted.
  • All changes to the set of values for a text choice field are audited.

Multi-Line Text and Flag Options

  • Multi-line Text Field Options (or Flag Options):
    • Maximum Text Length. Sets the maximum character count for the field. Choose either "Unlimited" or "No longer than X characters", providing a value in the box. The default is 4000.
  • Name and Linking Options
  • Validation Options: Regular expression validators.

Boolean Options

  • Boolean Field Options: Format for Boolean Values: Use boolean formatting to specify the text to show when a value is true and false. Text can optionally be shown for null values. For example, "Yes;No;Blank" would output "Yes" if the value is true, "No" if false, and "Blank" for a null value.
  • Name and Linking Options

Integer/Decimal Options

Date, Time, and Date Time Options

For samples, sources, assay results and assay runs, three different field types are available, letting you choose how best to represent the data needed. Other types of fields in Sample Manager only support the DateTime combined field.

  • Date Time: Both date and time are included in the field. Fields of this type can be changed to either "Date-only" or "Time-only" fields, though this change will drop the data in the other part of the stored value.
  • Date: Only the date is included. Fields of this type can be changed to be "Date Time" fields.
  • Time: Only the time portion is represented. Fields of this type cannot be changed to be either "Date" or "Date Time" fields.

File/Attachment Options

Sources, samples, and assay designs (run and batch fields) support including file attachments, known in different structures as either File or Attachment fields.

  • Source Types use Attachment
  • Sample Types use File
  • Assay Designs allow File fields in batch and run field sections

Both field types offer:

In practice, these field types are very similar: both can accept files like PDF documents or images. The contents of these fields will display as thumbnails, open in a larger panel when clicked, and include a download option. Learn more about how these fields are used in this topic: The differences between File and Attachment include:

User Options

Sample Options

  • Sample Options: Select where to look up samples for this field.
    • You can choose All Samples to reference any sample in the container, or select a specific sample type to filter by.
    • This selection will be used to validate and link incoming data, populate lists for data entry, etc.
  • Name and Linking Options

Unique ID Options

A field of type "Unique ID" is read-only and used to house barcode values generated by LabKey. Learn more in this topic: Barcode Fields

Related Topics