Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Body:

...

Attributes:

...

A RangeCheck defines a constraint on the value of the enclosing item. It represents an expression that evaluates to True when the ItemData value is valid or False when the ItemData value is invalid. The expression is specified using either Comparator and CheckValue or using FormalExpressions.

Include Page
RangeCheck Element
RangeCheck Element

Include Page
RangeCheck Attributes
RangeCheck Attributes

Range Checks using Comparator and CheckValue
When using Comparator and Check Value each Range Check represents a one-sided constraint. Multiple Range Checks can be used to specify more complex constraints, e.g., an upper and lower bound would require two Range Checks.

...

If a Measurement Unit is specified, the corresponding Item values must have interconvertible Measurement Units (either explicitly or by default). Proper conversion of units must be done as part of the Range Check. If a Measurement Unit is not specified, the corresponding Item values must not have Measurement Units (either explicitly or by default).


Example

Examples: 

...

Code Block
<RangeCheck Comparator="GT">
    <CheckValue>0</CheckValue>
</RangeCheck>

...

Code Block
<RangeCheck Comparator="GE">
    <CheckValue>18</CheckValue>
</RangeCheck>
<RangeCheck Comparator="LE">
    <CheckValue>65</CheckValue>
</RangeCheck>

...

Include Page
RangeCheck - Positive Value
RangeCheck - Positive Value

Include Page
RangeCheck - 1, 3 or 5
RangeCheck - 1, 3 or 5

Include Page
RangeCheck - Low-High
RangeCheck - Low-High

...



Range Checks using FormalExpression
When using FormalExpression a Range Check can represent anything, e.g., one sided or multi-sided checks. These type of checks must not provide CheckValue, Comparator or MeasurementUnitRef as they would all be expressed in the FormalExpression itself. The FormalExpression takes the value of the ItemData element and returns a boolean value which is the result of the expression. Multiple FormalExpressions can be provided if each has a different Context attribute, allowing the same expression to be represented in forms appropriate to multiple systems. Multiple different expressions, with different meanings, must be represented as separate RangeChecks

A reference to an externally defined question.

Pagenav2