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 an Occupancy Type field if the application is for a pressure vessel.

Status check formulas use the oUseApp object (an instance of the Hansen.CDR.Use.iUseApplication 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 about this object and for sample code, click the Information tab in the Formula Editor.

Examples

This formula requires an address for the application:

StateCheck = False
If oUseApp.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 oUseApp.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 ((oUseApp.OccupancyType.Code.ToUpper = "INDUSTRIAL") 
And (oUseApp.ApplicationName.ToUpper = "")) Then
  StateCheck = True
End If

This formula requires a primary applicant for the application:


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