Calculating whether to add a review

You can use an AddOnCondition formula to calculate whether a review is added to a case. For example, you could write a formula that requires a review of all cases with a nuisance violation. You specify an AddOnCondition formula when you define a review type.

AddOnCondition formulas use the oCase object (an instance of the Hansen.CDR.CodeEnforcement.iCase class) to set AddOnCondition to either True or False.

You can also use properties and methods of the Review object in your formula. For example, you might want to specify the review types that the formula applies to. To access review properties, select the Review node under CodeEnforcementSignature in the Methods and Properties tree. You must also use the AssociatedRecordType node to indicate the type of record (AssociatedRecordType.Review).

For more information, and for sample code, click the Information tab in the Formula Editor.

Examples

This formula adds a review if there is a nuisance violation associated with the case:


AddOnCondition = False
If oCase.CaseType.CaseType.ToUpper = "NUISANCE" 
Then
  AddOnCondition = True
End If

This formula adds a review if the case is high priority:


AddOnCondition = False
If oCase.Priority.Code.ToUpper = "HIGH" Then
  AddOnCondition = True
End If

This formula adds a review if the address of the case is located in the Riverwood subdivision:


AddOnCondition = False
If oCase.Address.SubDivisionCode.Code.ToUpper = "RIVERWOOD" Then
  AddOnCondition = True
End if