Calculating whether to add a hearing

You can use an AddOnCondition formula to calculate whether a hearing is added to a case. For example, you could write a formula that requires a hearing if a citizen wants to appeal a citation. You specify an AddOnCondition formula when you define a hearing 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 Hearing object in your formula. For example, you might want to specify the hearing types that the formula applies to. To access hearing properties, select the Hearing node under CodeEnforcementSignature in the Methods and Properties tree. You must also use the AssociatedRecordType node to indicate the type of record (AssociatedRecordType.Hearing).

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

Examples

This formula adds a fee if the code violation was reported to a call center:

AddOnCondition = False
If oCase.Source.Code.ToUpper = "CALL" Then
  AddOnCondition = True
End If

This formula adds a fee if the case is for a nuisance violation:

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

This formula adds a fee if the case has a high priority:

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