Calculating whether to add a review
You can use an AddOnCondition formula to calculate whether a review is added to a license. For example, you could write a formula that requires a review of an association's by-laws for a home-based business.
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 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 node under in the tree. You must also use the 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 license is for a sole
proprietorship. Note that the formula uses the enumeration value from the
LicenseBusinessType
enumeration instead of the
business type name. If you have the correct access rights, you can view this
enumeration using the Schema Manager.
AddOnCondition = False
If oLicenseApp.TypeOfBusiness = 1 Then
AddOnCondition = True
End If
This formula adds a review 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 a review if the address of the license is located in the Riverwood subdivision:
AddOnCondition = False
If oLicenseApp.Address.SubDivisionCode.Code.ToUpper = "RIVERWOOD" Then
AddOnCondition = True
End If