Calculating whether to add a review

You can use an AddOnCondition formula to calculate whether a review is added to an application. For example, you could write a formula that requires a traffic impact review for any public assembly building over 4000 square feet. You specify an AddOnCondition formula when you define a review 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 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 BuildingSignature 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 the declared value recorded in the application is greater than $300,000:


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

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


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

This formula adds a review if the application is for a remodel:


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