Calculating whether to add a condition

You can use an AddOnCondition formula to calculate whether a condition is added to a license. For example, you could write a formula that requires a business name to be recorded on the business application or a background check performed on the applicant.

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 Condition object in your formula. For example, you might want to specify the condition types that the formula applies to. To access condition properties, select the Condition node under LicenseSignature in the Methods and Properties tree. You must also use the AssociatedRecordType node to indicate the type of record (AssociatedRecordType.Condition).

For more information, and for sample code, click the Information tab in the Formula Editor.

Examples

This formula adds a condition if the license is for an LLC:


AddOnCondition = False
If oLicenseApp.TypeOfBusiness = "LLC" Then
  AddOnCondition = True
End If

This formula adds a condition if the name of the business is different from the its doing-business-as name:


AddOnCondition = False
If (oLicenseApp.BusinessName.ToUpper) <> (oLicenseApp.DBAName.ToUpper) Then
  AddOnCondition = True
End If

This formula adds a condition if there is nothing recorded for the license's location:


AddOnCondition = False
If oLicenseApp.Location="" Then
  AddOnCondition = True
End If