PBAConsClause.deduct Method [AX 2012]

Validates the necessity of evaluating the constraint in the list and deducts the values that trigger it.

public Set deduct(
    PBAVariable variable, 
    PBAConsConstraint constraint, 
    PBAArrayIdx arrayIdx)

Run On

Server

Parameters

variable
Type: PBAVariable Table
The variable to attempt deducting the values.
constraint
Type: PBAConsConstraint Class
The constraint to deduct from the ConstraintList.
arrayIdx
Type: PBAArrayIdx Extended Data Type
The array index of the selected variable.

Return Value

Type: Set Class
A set of values associated with the variable that trigger the constraint; otherwise, nullNothingnullptrunita null reference (Nothing in Visual Basic) if no value can trigger it.

In a "Error if RULE_A AND RULE_B AND RULE_C" scenario, the condition for the constraint is only valid if all rules are evaluated as true If the state of one is either unknown or false there is no deduction executed as the condition will not be met.

Community Additions

ADD
Show: