Calculating whether to add a hearing

You can use an AddOnCondition formula to calculate whether a hearing is added to an application. For example, you could write a formula that requires a hearing for new businesses planned for certain areas.

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

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

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

AddOnCondition = False
If (oPlanningApp.OccupancyType.Code.ToUpper = "COMMERCIAL") Then
  AddOnCondition = True
End If

This formula adds an item if the application is for a remodel:

AddOnCondition = False
If (oPlanningApp.WorkType.Code.ToUpper = "REMODEL") Then
  AddOnCondition = True
End if