Calculating which inspection assignment group to use
You can use an assignment group formula to calculate which inspection assignment group Infor Public Sector will use to automatically assign inspectors based on information recorded in a case, such as its location. For example, you could write a formula that adds a Nuisance assignment group to any nuisance case. When an inspection is added to a nuisance case, Infor Public Sector looks for the specific assignment area value defined in the assignment group, such as a postal code or parcel ID. If found, Infor Public Sector assigns the group's inspector to the inspection.
You specify an assignment group formula for an inspection type when you define the inspection type. You must specify an assignment group formula for an inspection type if you want Infor Public Sector to automatically assign inspectors to inspections of that type. You define assignment groups using Inspection Assignment Group. You then create the assignments for those groups using Inspection Assignment.
Assignment group formulas use the oCase
object (an instance of the Hansen.CDR.CodeEnforcement.iCase
class) to set AssignmentGroup
to a string value that is the exact name of the assignment group you want. For more information about this object and for sample code, click the Information tab in the Formula Editor.
Example
This example adds a Priority assignment group if the case has a high priority. Otherwise a State assignment group is added.
If oCase.Priority.Code.ToUpper = "HIGH" Then
AssignmentGroup = "Priority"
Else
AssignmentGroup = "State"
End If