I do not understand how to use Flag Codes in Enviro Data, can you help me?

Note that most of this section also applies to Validation Flags that use a similar form and table structure.

Flag Codes are not required and generally are not checked to see if they present are in the Analytic Flags or ValidationFlags tables and Flags not in the Analytic Flags table may be ignored in ValueAndFlag formatting. Flags used in the Analyses.FlagCode field that are not in the Analytic Flags table can cause a problem when moving to a newer version of Enviro Data. This means you need to be extra careful when using them. 

Analytical Flag Codes

A FlagCode is an analytical flag that describes the analysis.

It is important to understand that in Enviro Data there are two similar but different FlagCode fields, one in the AnalyticFlags lookup table and a different but similar one in the Analyses data table. The FlagCode field in the Analyses table contains one or more FlagCodes from the AnalyticFlags table. When multiple codes are used in the Analyses table, they must be separated by either a comma or a space.

AnalyticFlag in the Lookup Table

The FlagCode in AnalyticFlags table is a lookup that stores a single code of up to four characters and cannot contain any spaces or commas. The AnalyticFlags table stores the following:

FlagCode is the code for a ONE Analytic Flag. It can contain multiple characters but cannot contain a space or comma.
AnalyticFlag is description of the code.
ReportingFactor is used as a multiplier for statistical analysis. Note that this can be impacted by selections in Non-Detect Options on the DISPLAY OPTIONS form.
ReportingBasis indicates how display the output. See examples in Reporting Basis.

NOTE: Use Analytic Flags Table must be selected in the Detected Value Options and Same as Detected Values in the Non-detect Option on the Display/Graphing Options form as shown below for the Value and Flag field to be displayed in the ReportingBasis format in Reports or Exports.

Use Analytic Flags Table selected in Detected Value and Non-detect Options in DISPLAY OPTIONS form.

Fig. 18 - Settings for Detected Value and Non-detect Options in Display/Graphing Options form.

ReportingPriority determines the flag’s priority in formatting the value for output. The flag with the lowest number will determine the format. Note that ReportingPriority is an integer and only accepts whole numbers. See examples of this in Figure 21 and Figure 22.

Note the IndicatesNon-Detect field has been removed as that field was replaced by the DetectedResult field in the Analyses table.

To view the flag codes, open the ANALYTIC FLAGS form. This can be done either from the Display Options in the Viewer or from Manage Lookups in the Editor. This form can be seen in Figure 19.

You can scroll through the Flag Codes by using the page control at the bottom left. You select how each Flag Codes displays using the ReportingFactor, Reporting Basis, and/or ReportingPriority options. (Note: Setting a flag as a detected or non-detected is no longer an option on this form. Use the DetectedResult field instead.)

analytic flag form

Fig.19 -  ANALYTIC FLAGS form in Form View

 This table can also be edited in Datasheet View as shown in Figure 20, below, by clicking the Datasheet button.

AnalyticFlags

Fig. 20 - ANALYTIC FLAGS form in Datasheet View

Note that the FlagCode or “Y”, and its description AnalyticFlag of “Calculate Value” is a required value because it is used in some calculations. Even if you are not doing any calculations, if this flag is not present, the ValueAndFlag field may not be displayed correctly.


Examples for Reporting Basis

Reporting Basis Examples

FlagCode in the Analyses Table

The FlagCode in the Analyses data table can contain one of more analytic flags that are separated by spaces or commas. These are usually imported with your analytic results. They are not checked against the AnalyticFlag lookup table during an import.

• The order of the flags doesn’t matter, when being output to a report or export the program is only looking for the lowest ReportingPriority.
• You can have any number and combination of FlagCodes, up to the 25-character limit in the Analyses table.
• Commas or spaces always indicate that multiple FlagCodes are present.
• If the analysis is considered a usable value, and would not otherwise have a qualifier, this field can contain the code for Detected Value (usually a “v”).
• If the analytical flag is unknown, it may contain a “z” but this not required.
• The FlagCode field may be left blank if desired.

Example of Flag Code Usage

One example is if data is imported with FlagCode “U,B” which should indicatesa that the result is a not-detect and there was a problem with a blank. Because of the comma, these are two distinct qualifiers (flag codes). The AnalyticFlags table should have two records: one with FlagCode = “B”, and another record with FlagCode = “U”. It should NOT have a record for FlagCode = “U,B”. (Ignore all quote marks.)

Controlling How Data is Displayed

The formatting decisions that you make as described in this section are used for most types of output, so you should see the same result whether you are printing a report, exporting to Excel, or posting the data on a GIS map.
For reporting, Enviro Data uses the Reporting Factor and Reporting Basis entered below to format the display of the result. Where multiple Flag Codes are reported for a result, the Reporting Basis of the Flag Code with the lowest Reporting Priority is used to determine the format.

Here’s what happens when Enviro Data formats ValueAndFlag in SelectedData during an export.

1. The Value and Flag handling parses FlagCode from the SelectedData table (retrieved from Analyses) into its two separate flags (“B” and “U”) and sorts them by first ReportingPriority assigned to the code in the AnalyticFlags table, then alphabetically. If a code is not found in the AnalyticFlags table, that code is ignored.
2. The flag with the lowest ReportingPriority wins, and its ReportingBasis is used to format the result.
3. If both FlagCodes in the AnalyticFlag table have the same ReportingPriority, the code that appears first in the alphabet wins.

For example, you could display your non-detects with a "<" sign and the detection limit. Or you could display them as "ND" or " - ". But for results with a "J" flag, you could display the value followed by the flag. See examples in Table 1.

Note: The FlagCode “v” for “no code required” is generally automatically stripped out of exports and reports.

The Value and Flag function uses the Reporting Basis shown below in Table 1 for each character of the analysis FlagCode. It also finds the Reporting Factor from the AnalyticFlags table based on the first character of the analysis FlagCode. This factor is used to calculate the number displayed for non-detects, if that option is selected on the DISPLAY OPTIONS form.

 Examples of Value and Flag Formats

Table 1- Examples of Value and Flag Formats

If there are multiple flags, i.e. b j, and you wish to print j in reports, use the Reporting Priority on the ANALYTIC FLAGS form to set the hierarchy determining which flag is used in the display. Again, if two or more flags are encountered, the flag having lowest Reporting Priority value is used. If two or more flags have the same Reporting Priority, then the priority is determined alphabetically.

An example of this is a analytical result with the FlagCode of “u,d” for undetected and diluted respectively. If the ReportingBasis for the “u” was “< and Detection Limit (Detect1) or Value” you would expect the Value and Flag field to be something like “< 0.06”.

However, if both have a ReportingPriority in the AnalyticalFlag table of 1, then the ReportingBasis would be taken from the “d” flag’ ReportingBasis which does not contain a “<” and results would not be formatted as a non-detect. See the examples in Figure 21 and Figure 22 below. Value/Flag format where Reporting Priority for flag codes "u" and "d" are the same.

Fig. 21 - Value/Flag format where Reporting Priority for flag codes "u" and "d" are the same.

Value/Flag format where Reporting Priority of flag code "u" is 0 and for "d" is 1.

Fig. 22 - Value/Flag format where Reporting Priority of flag code "u" is 0 and for "d" is 1.

Note: If the Value/Flag is not displaying correctly after checking all of the above, check Parameter Units to see if it is set correctly for the parameter(s) in question.

#49Edited 1 year ago