Tolerance Source
Tolerance source is used in combination with the Process Variable field (except for Activity Item) to determine what type of tolerance to use. Since a process variable such as temperature can have different limits and targets across assets, orders and materials it is important to be able to define which is important.
Tolerance Types
Material Level
Use the Material Tolerance for the Process Variable on the order's material. However, if this option is set inside a for each or section for bill of materials, then it uses the section material.
Asset Level
Use the Asset Tolerance for the Process Variable on the Asset the activity is created on.
Order Level
Use the Order Tolerance for the Process Variable on the Order the activity is created for.
On the Activity Item
Define the target and limits on the form item. This does not require a process variable to be set.
On the Process Variable
Uses the default values from the Process Variable for its target and limits.
Displaying the targets
The 'Hide target from form' checkbox can be used to show/hide the display of the target
By clicking on the target, the field will show the exact limits and pass states of each.
Using the Tolerance
So how can we use tolerances in forms to enhance our workflows?
Have the form fail and create a re-test
Any form item with a tolerance that isn't within the limits will fail. When used in combination with the Activity Template 'Trigger Retest' property, it will automatically issue a new activity after submitting. This gives an additional chance to ensure the values submitted are correct.
Create new activities when the form item fails
When the value exceeds the lower/upper limit, the form item will fail (pass=false) and raise a system event of Activity Failed. On a different Activity Template, add an Activity Trigger on the Activity Failed event and select this activity template for the activity key. Now that new activity when this activity fails
Show a field when a value is close to failing
By defining a warning limit, the form will still pass but can be used to show/hide a field. We have two fields, Input1 and Input2. Input1 has a tolerance warning limit set, and if either the upper or lower warning is exceeded then we want to show Input2. To do this, we can use the Active Item expression to evaluate a calculation as follows.
To break this down, let's look at each component.
$util
- is a javascript object containing helper functionsgetItemLimits
- is a javascript function('Input1')
- Invoke the getItemLimits function for itemKey Input1lowerWarningPass
- the value/boolean representing if the lower warning limit not exceeded== false
- Compare if the lowerWarningPass is equal to the value false. So we are checking for when lowerWarningPass is not passing.||
- the OR operator, so if either sides of the evaluations are true, then return true. If both are false then return false
Import the following activity to see how it works.
Last updated