Field-level "Missing Value" (MV) indicators allow individual data fields to be flagged.
Administrators can customize which MV values are available at the site or folder level. If no custom MV values are set for a folder, they will be inherited from their parent folder. If no custom values are set in any parent folders, then the MV values will be read from the site configuration.
Two customizable MV values are provided by default:
- Q: Data currently under quality control review.
- N: Required field marked by site as 'data not available'.
Customize at the Site Level
- Select (Admin) > Site > Admin Console.
- Select the Admin Console Links tab.
- Click Missing Value Indicators in the Configuration section.
Customization at the Folder level
- Select (Admin) > Folder > Management.
- Select the "Missing Values" tab.
- Uncheck "Inherit settings" to see the same UI for configuring missing value indicators.
How Missing Value Indicators Work
Two columns stand behind any missing-value-enabled field. This allows LabKey Server to display the raw value, the missing value indicator or a composite of the two (the default).
One column contains the raw value for the field, or a blank if no value has been provided. The other contains the missing value indicator if an indicator has been assigned; otherwise it is blank. For example, an integer field that is missing-value-enabled may contain the number "1" in its raw column and "Q" in its missing value indicator column.
A composite of these two columns is displayed for the field. If a missing value indicator has been assigned, it is displayed in place of the raw value. If no missing value indicator has been assigned, the raw value is displayed.
Normally the composite view is displayed in the grid, but you can also use custom grid views
to specifically select the display of the raw column or the indicator column.
MV indicators render with three column choices:
- ColumnName: shows just the value if there's no MV indicator, or just the MV plus a little flag if there is. The tooltip shows the original value.
- ColumnNameMVIndicator (a hidden column): shows just the MV indicator, or null if there isn't one.
- ColumnNameRawValue: shows just the value itself, or null if there isn't one.
There is no need to mark a primary key field with a MV indicator, because a prohibition against NULL values is already built into the constraints for primary keys.
Out of Range (OOR) Values
Enable OOR notification by adding a secondary string column that has the name of another column, plus the suffix "OORIndicator". You can have whatever values you like in the OORIndicator column, such as "<", ">", "<=", or "My OOR Indicator Value". In terms of insert and update, they're treated as two separate columns. But when the dataset is rendered, LabKey Server recognizes the columns as linked and offers four ways to display them (via the View Customizer
- ColumnName: shows the two values concatenated together ("< 10") but sorts/filters on just the number.
- ColumnNameOORIndicator: shows just the OOR indicator.
- ColumnNameNumber: shows just the number value.
- ColumnNameInRange: shows just the number, but only if there's no OOR indicator for that row, otherwise its value is null.