Applying conditional validity
Conditional validity allows you to define certain conditions that must be met to prevent a particular user or group of users from saving an order in Order Maintenance or the Trip Folder. The conditions are in the form of equations.
For example, you might not want a user or user group to be able to save an order without a Commodity Code. The equation for this example is [cmd_code] = 'UNKNOWN'
If the user tries to save an order without selecting a commodity, the Save Warnings window would list the error, as in this example.
Conditional Validity Editor
Once enabled, you can access the window by going to Tools > Conditional Validity.
The Conditional Validity Editor window opens.
All conditional validity equations for TMW Operations are accessed from the Conditional Validity Editor.
Field | Definition |
---|---|
Equation List Lookup |
User/Group and ID Two fields identify for whom you are assigning the condition. Condition Type Select the appropriate component of the order: Legs (Trip segments), Orders, Stops, or Freight. The appropriate columns from which to choose are available for selection. Refresh When switching from one user or condition type to another, the equation grid automatically refreshes. If this is not the case, click Refresh to update the equation grid. |
Equations |
Commands
Equation Type When adding more than one equation to a condition, you identify whether they should be joined by:
|
Equation grid |
The equation grid displays the equations that are contained in the current condition.
The grid also allows you to edit an existing equation. |
Command buttons |
|
Equation Builder
When you add or edit an equation, you use the Equation Builder window.
Field | Definition |
---|---|
Available Columns |
This panel shows all the fields or columns available on the order, trip, leg (trip segment), or freight. Double-click on the appropriate column to begin building the equation. |
Operand |
Select one of the options:
|
Value(s) |
Enter the value that the entry should be equal to, not equal to, greater than, or less than, to trigger the validity check. Select the Is List checkbox when entering a list of values. Separate the items in the list with the pipe (|). |
Equation |
As you build your equation, the Equation panel shows what you have built and whether or not it is valid.
The validity checks only whether all the elements of the equation are selected or entered. It does not check whether you have entered a valid value. |
Enabling validity checking
To use the conditional validity feature for preventing orders from being saved, you must enable the [.NetMisc]ConditionalValidityEnabled
setting.
By default, validity checking is performed only when saving new orders. If you want validity checking to apply to saving updated orders, as well as new, you must enable the [.NetMisc]ConditionalValidityApplyOnlyToNewItems
setting.
Adding validity checking conditions
Conditions are applied for a particular user or group of users and can require certain entries on the order, stops, legs (Trip segments), or freight. You can add a single equation or several equations joined by either AND or OR logic.
-
Go to Tools > Conditional Validity.
The Conditional Validity Editor window opens. -
Under Equation List Lookup, select the lookup criteria.
Field Definition User/Group
User or Group as it relates to the ID for whom you are assigning the condition.
ID
ID of the user or group for whom you are assigning the condition.
Condition Type
Select the appropriate component of the order.
-
Legs (Trip segments)
-
Orders
-
Stops
-
Freight
-
None (Not applicable)
Note: If condition equations exist for your selections, they are listed in the Equations grid.
-
-
Select an Equation Type.
-
And
Each equation in the condition must be met to prevent saving the order. -
Or
Any of the equations in the condition must be met to prevent saving the order.Note: If you are building only one equation for the condition, the Equation Type does not apply.
-
-
Add an equation.
-
Click Add Equation.
The Equation Builder window opens.This example shows the available columns for the Condition Type = Legs (Trip segments).
-
-
Under Avl Columns, locate and double-click on the column on which to base the condition.
The column is added to the Equation panel. -
Select the appropriate Operand.
-
In the Value field, enter the value that will trigger the validity checking.
Notes:
-
Select the Is List checkbox when entering a list of values. Separate the items in the list with the pipe (|).
-
For true/false conditions, enter 1 for true and 0 for false.
-
-
When the Equation panel label indicates the equation is valid, click OK to close the Equation Builder.
Note: The validity checks only whether all the elements of the equation are selected or entered. It does not check whether you have entered a valid value.
-
If you need to add another equation to the condition, repeat Step 4.
-
Click Save to save the condition.
-
Click Exit to close the Condition Builder.
-
Examples of conditional validity
These examples illustrate various validity checking types and conditions.
Single equations
For Condition Type Orders, user MLOPS cannot save an order without a commodity.
For Condition Type Legs, user OPSJL cannot save an order when a trip segment has more than 50 empty miles.
Multiple equations
When you want to further restrict the condition by adding another equation, you must join them with one of the following types:
-
"And" Equation Type
Each equation in the condition must be met to prevent the save.In this example, for Condition Type Freight, user OPSJL cannot save an order when the freight is 'FAK' and weighs less than 40,001 pounds. Both conditions must be met.
-
"Or" Equation Type
Any of the equations in the condition must be met to prevent the save.In this example for Condition Type Orders, the Columbus group cannot save an order when either the maximum temperature or the minimum temperature is blank.
Note: For this example, these fields were added to the Order Maintenance window with QuickDesigner, and the layout was saved for the COL group.
Identifying the Value as a list
For Condition Type Stops, user OPSJL cannot save an order with a non-billable stop event. To define this condition, you can:
-
Add multiple equations joined by Or, one for each of the non-billable stop events.
-
Add one equation with the values defined as a list.
You can add a single equation that contains a list of Values.
Select the Is List checkbox, and then enter each value separated with the pipe (|).
Editing validity checking conditions
Follow this procedure to edit an existing conditional validity equation that is assigned to a user or group for the selected condition type.
You cannot edit the user or group who is assigned to an existing condition. You can only add, remove, or change the equations for the condition. |
-
Go to Tools > Conditional Validity.
The Conditional Validity Editor window opens. -
Under Equation List Lookup, select the lookup criteria.
Field Definition User/Group
User or Group as it relates to the ID for whom you assigned the condition.
ID
ID of the user or group for whom you assigned the condition.
Condition Type
Select the appropriate component of the order.
-
Legs (Trip segments)
-
Orders
-
Stops
-
Freight
-
None (Not applicable)
Condition equations that exist for your selections are listed in the Equations grid.
-
-
If appropriate, change the Equation Type from And to Or, or vice versa.
-
Locate the equation that you want to edit.
-
On the same row, click Click To Edit.
The Equation Builder window opens. -
Make the necessary changes to the equation.
-
Click OK to close the Equation Builder window.
-
If aprorpiate, add another equation or remove an existing equation.
-
Click Save to save your changes.
-
Click Exit to close the Conditional Validity Editor window.
Deleting validity checking conditions
Follow this procedure to delete one, multiple, or all equations within a condition.
-
Go to Tools > Conditional Validity.
The Conditional Validity Editor window opens. -
Under Equation List Lookup, select the lookup criteria.
Field Definition User/Group
User or Group as it relates to the ID to whom you assigned the condition.
ID
ID of the user or group to whom you assigned the condition.
Condition Type
Select the appropriate component of the order.
-
Legs (Trip segments)
-
Orders
-
Stops
-
Freight
-
None (Not applicable)
Condition equations that exist for your selections are listed in the Equations grid.
-
-
Locate and select the equation that you want to delete.
-
Click Remove Equation.
The row is removed.Note: If you decide not to remove the equation after all, click Refresh. A confirmation message opens. Click No, to restore the deleted equation.
-
Click Save to save your changes.
-
Click Exit to close the Conditional Validity Editor window.