Calculating when to advance a work order
For example, you could write a formula that checks whether the work order has been scheduled.
Status Check formulas use the
oWorkOrder
object (an instance of the
Hansen.WorkManagement.WorkOrder
class) to set
bIsSatisfied
to either
True or
False. If the formula returns
True, the status check passes. If the formula returns
False, the status check does not pass. After all status
checks pass, Infor Public Sector advances the work order to the next milestone.
For more information about this object and for sample code, click the
Information tab in the Formula Editor.
Examples
This formula requires the work order to be assigned to an employee.
If (oWorkOrder.IsAssigned = True) Then
bIsSatisfied = True
Else
bIsSatisfied = False
End If
This formula requires labor costs to be recorded for the work
order. This formula checks the
LaborCosts
collection for
oWorkOrder
to see if any labor cost has been recorded.
dim oLaborCost as Hansen.WorkManagement.ILaborCost
dim lCounter as Integer = 0
For each oLaborCost in oWorkOrder.LaborCosts
If oLaborCost.TotalCost > 0 Then
lCounter += 1
End If
Next oLaborCost
If lCounter > 0 Then
bIsSatisfied = True
Else
bIsSatisfied = False
End If