PASSWARNCONDITION function

Synopsis
This function returns a pass, warning or fail state based on whether PassCondition or WarnCondition are met.
Variations
PASSWARNCONDITION(PassCondition, WarnCondition)
Returns whether PassCondition or WarnCondition are met.
Parameters
PassCondition

Specifies the condition to determine a pass state. If the pass condition is TRUE, the function returns pass (2).

Supported types: Boolean.
WarnCondition

Specifies a condition to determine a warning state. If the warning condition is TRUE and the pass condition is FALSE, the function returns warning (3). If neither condition is TRUE, the function returns fail (4).

Supported types: Boolean.
Returns
Returned types: Numeric.
Examples
1.

The following example returns:

  • 2 (Pass) if one occurrence of the search model was found.

  • 3 (Warning) if more than one occurrence was found and the score of the first occurrence is greater than 80.

  • 4 (Fail) if no occurrences were found or more than one occurrence was found with a score greater than 80.

PASSWARNCONDITION( ModelFinder.TotalNumberFound = 1, ModelFinder.TotalNumberFound > 1 AND ModelFinder.Occurrences(1).Score > 80 )