Calculating whether to add an inspection
You can use an AddOnCondition formula to calculate whether an inspection is added to a license. For example, you could write a formula that requires a temperature inspection if a food wholesaler carries frozen foods.
AddOnCondition formulas use the oLicenseApp object (an instance of the Hansen.CDR.BusinessLicense.iLicenseApplication class) to set AddOnCondition to either True or False.
You can also use properties and methods of the Inspection object in your formula. For example, you might want to specify the inspection types that the formula applies to. To access inspection properties, select the  node under  in the  tree. You must also use the  node to indicate the type of record (AssociatedRecordType.Inspection).
For more information, and for sample code, click the Information tab in the Formula Editor.
Examples
This formula adds an inspection if the license is in the Food license category:
AddOnCondition = False
If oLicenseApp.LicenseCategory.Code.ToUpper = "FOOD" Then
  AddOnCondition = True
End If
          This formula adds an inspection if the address of the license is located in the Elmwood subdivision:
AddOnCondition = False
If oLicenseApp.Address.SubDivisionCode.Code.ToUpper = "ELMWOOD" Then
  AddOnCondition = True
End If