Calculating whether to add a case fee

You can use an AddOnCondition formula to calculate whether a fee is added to a case. For example, you could write a formula that adds a fee 30 days after the initial violation was recorded. You specify an AddOnCondition formula for a fee type when you add a fee type to a case 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 Fee object in your formula. For example, you might want to specify the fee types that the formula applies to. To access fee properties, select the Fee node under CodeEnforcementSignature in the Methods and Properties tree. You must also use the AssociatedRecordType node to indicate the type of record (AssociatedRecordType.Fee).

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 construction without a permit:

AddOnCondition = False
If oCase.CaseType.CaseType.ToUpper = "NOPERMIT" 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