Scoring Rule
The Scoring Rule defines the list of Answers used to compute the values of an Assessed Characteristic.
Each Assessed Characteristic can have multiple Scoring Rules. In the computation of an Assessed Value, one is taken into account based on its MetaTests: if no MetaTest is defined, the first Scoring Rule found is taken.
Each Scoring Rule must have a macro to compute the assessed values.
The macro must have a method named ‘compute' with this signature:
Sub compute(mgobjScoringRule As MegaObject, mgobjValueContext As MegaObject, mgcolAnswers As MegaCollection , mgobjAssessedValue As MegaObject)
End Sub
Arguments:
- mgobjScoringRule: the current Scoring Rule.
- mgobjAssessedValue: The Assessed Value to compute.
- mgobjValueContext: The assessment node of the current Assessed Value.
- mgcolAnswers: The list of Answers that will intervene in the computation of the Assessed Value.
A computing Macro is defined in the ERM product and can be reused:
~1FtoaqSRGjbU[ERM - answer Quotation rule] : This macro puts on the Assessed Value the average of the answers collected.
How to get the value of an Answer
If the Answer is a Unique Value and its type is Boolean ,String ,Date ,Percent, Short ,Float or Enumeration, the value is stored in the link MetaAttribute Refers-To
Example:
Case Float:

Case Date:

Case Enumeration:
(1 represents the Internal Value of the Possible Answer Value chosen in the questionnaire)
To get the value of the Unique Value use this expression:
MeasureContext.getProp(Answer.getID, "internal")
In case of Enumeration, the expression returns the Internal Value of the Possible Answer Value.
If the Answer is a Unique Value and its type is VarChar, the value is stored in the link MetaAttribute _RefersText
To get the value of the Unique Value use this expression:
MeasureContext.getProp(Answer.getID, "internal")
Or MeasureContext.getProp (Answer.getID)
If the Answer is a Multiple Value the value is stored in the link MetaAttribute _RefersText. The Answer must be of type VarChar.
To get the value of the Multiple Value use this expression:
MeasureContext.getCollection(Answer.getID)