Skip to main content
Version: 8.1

qualifiedValue

This function is used by Ignition's Expression language.

Description​

Returns the given value, but overwrites the quality of that value. Provides more control over the value than the forceQuality expression.

Syntax​

qualifiedValue(value, level, [subcode], [diagnosticMessage])

  • Parameters

    • Object value - The value to force a quality on.
    • Object level - The level to force on the value. Possible levels are Good or 0, Uncertain or 1, Bad or 2, Error or 3.
    • Object subcode - The subcode to include with the quality level. See Quality Codes and Overlays for more information on possible subcodes. [optional]
    • Object diagnosticMessage - The diagnostic message to add to the quality. [optional]
  • Results

    • QualifiedValue - The value with a forced quality, formatted as a QualifiedValue.

Examples​

Code Snippet
qualifiedValue(1, 'bad', 515, 'New Quality')  //Returns the value 1 but with a quality of Bad_Disabled("New Quality").