Article Details
Id:12400
Product:finPOWER Connect
Type:NEW
Version:2.02.03
Opened:16/10/2014
Closed:18/11/2014
Released:04/12/2014
Job: J014330

Decision Cards; Scripts can now insert and delete Decision Outcome Items in collection

Decision Card Scripts can now insert Decision Outcome Items into collection.

The following methods have been added to the finDecisioniOutcomeItems object (one for each of the corresponding "Add" methods):

  • InsertMatrix
  • InsertRuleTrue
  • InsertRuleFalse
  • InsertExitTrue
  • InsertExitFalse
  • InsertInformation
  • InsertSetOutcome

If the supplied index to any of these functions is invalid, the item will be added to the end of the collection.

The following helper methods have also been added to finDecisioniOutcomeItems:

  • Exists
  • IndexOf
  • IndexOfCode
  • Remove
  • RemoveAt
  • RemoveByCode

NOTE: Inserting or deleting item in the collection (apart from "Information" items) will cause the Decision Outcome's Score to be recalculated.

A new option has also been added to "IfBlock", "ElseIfBlock", "ElseBlock" and "EndIfBlock" type rules to include the Rule in the Decision Outcome.

An example of using these new functions is:

decisionOutcome.Items.InsertInformation(decisionOutcome.Items.IndexOfCode("Age40Plus"), "AgeInfo", "This is information inserted above the Age40Plus rule.")