Status check formulas

Formulas can be used for more complex status checks. For example, you could write a formula that requires a work type in the Work Type field, or that requires a specific occupancy type in the Occupancy Type field if the application is for a new construction.

Status check formulas use the oBldgApp object (an instance of the Hansen.CDR.Building.iBuildingApplication class) to set StateCheck to either True or False. If the formula returns True, Infor Public Sector halts the permitting process. If the formula returns False, Infor Public Sector doesn't halt the permitting process. For more information and for sample code, click the Information tab in the Formula Editor.

Examples

This formula requires an address for the application:

StateCheck = False
If oBldgApp.Address.AddressKey = 1 Then
  StateCheck = True
End If

This formula halts the permitting process if an application does not have a work type recorded:

StateCheck = False
If oBldgApp.WorkType.Code.ToUpper="" Then
  StateCheck = True
End If

This formula requires an application to have a name if the application is for an industrial structure:

StateCheck = False
If ((oBldgApp.OccupancyType.Code.ToUpper = "INDUSTRIAL") 
And (oBldgApp.ApplicationName.ToUpper = "")) Then
  StateCheck = True
End If

This formula requires a primary applicant for the application:


StateCheck = True
dim oApplicant as Hansen.CDR.Building.IApplicant
For Each oApplicant in oBldgApp.Applicants
  If oApplicant.IsPrimaryApplicant = "True" Then
    StateCheck= False
  End If
Next oApplicant