CheckByParam

concerns

The CheckByParam attribute function checks a decision table outside the default rule check. The function can be called for bound and unbound decision tables.

 

Syntax

CheckByParam(ByRef InValues(), ByRef OutValues())

Return value

Type

Description

Boolean

True if the check has found a hit in the table.

Parameter

Use

Name

Type

Passing

Description

Required

InValues()

Variant

ByRef

Values for the inbound columns of the decision table.

The zero index represents the check value of the first input column. Other ascending indexes correspond to the other input columns.

Required

OutValues()

Variant

ByRef

Variant list that records the values of the output columns if a row hit is found for the input columns.

The zero index represents the value of the field of the first output column.

Other ascending indexes correspond to the fields of the other output columns.

 

Example:

There is a decision table DT_Price in a class:

The DT_Price decision table has two input columns and one output column.

The check is performed by the input values for class name and color.

The output is returning the price for each combination of the possible input values.

 

Dim Res() As Variant

 

If DT_Price.CheckByParam({Class, Color}, Res) = False Then

   Preis := 0

Else

   Preis := Res(0)

End If