Show the type of injection

In analytical data generated by Agilent ChemStation as a source system, the field Injection_Volume may contain positive or negative values:

  • Positive values represent the actually injected sample volume.

  • Negative values represent several special injection actions. The following values are used:

    • -1: no injection

    • -2: manual injection

    • -3: injector program

    • -4: external injector

To display either the actually injected volume or the appropriate description, you can use the following expression:

=iif(Injection_Volume >= 0, CStr(Round(Injection_Volume, 4)) & " " & Injection_VolumeUnit, choose( Int(Abs(Injection_Volume)), "no injection", "manual injection", "injector program", "external injector"))

If the original value is positive, it is only rounded off to four decimals. If it is negative, the Int, Abs, and Choose functions are applied.

The Abs function removes the algebraic sign. Thus, negative numbers are transformed to positive numbers. Positive numbers are left unchanged.

The Int function transforms double-precision floating-point numbers to integer values. It returns the number in front of the decimal point (obtained by truncating, not by rounding).

The Choose function selects and returns a value from a list of arguments. The first parameter is a number that indicates the relevant value. In the example above, the Choose function returns “no injection” if its first parameter is 1.

×