Calculating whether to add a fee

You can use an AddOnCondition formula to calculate whether a fee is added to an application. For example, you could write a formula that adds an extra fee to any single-family dwelling project whose building area is larger than 1000 square feet. You specify an AddOnCondition formula for a fee type when you add the fee type to an application type.

AddOnCondition formulas use the oBuildingApp object (an instance of the Hansen.CDR.Building.iBuildingApplication 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 BuildingSignature 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 an item if the declared value recorded in the application is greater than $250,000:


AddOnCondition = False
If (oBldgApp.DeclaredValuation > 250000) Then
  AddOnCondition = True
End If

This formula adds an item if the application is for an educational institute:


AddOnCondition = False
If (oBldgApp.OccupancyType.Code.ToUpper = "EDUCATIONAL") Then
  AddOnCondition = True
End If

This formula adds an item if the application is for new construction:


AddOnCondition = False
If (oBldgApp.WorkType.Code.ToUpper = "NEW") Then
  AddOnCondition = True
End if