Create a New Calculated Custom Field
To add a new calculated custom field, follow these steps:
-
From the Setup menu, select General > Custom Fields.
The Custom Fields page opens.
-
Click the New Calculated Custom Field button above the fields list.
The Add Calculated Custom Field dialog box opens.
-
In the Field Name field, enter a name for the new custom field.
The field name cannot contain spaces.
-
In the Description field, enter a short description of the purpose of this custom field.
-
From the Module drop-down menu, select the module to which this custom field will be tied.
Note that this is also the module from which the variable fields will be pulled.
-
In the Formula field, enter the formula that the custom field will use to make its calculation.
This field supports addition (+), subtraction (-), multiplication (*), division (/), and order of operations grouping (left parenthesis and right parenthesis).
-
In the Variables grid, click the New button.
The Add New Formula Variable dialog box opens.
-
In the Variable Name field enter the variable name.
The variable name cannot contain spaces
-
From the Variable Type drop-down menu, select a variable types:
-
Absolute (numeric and date fields only)
-
Map
-
Range (numeric and date fields only)
See the About Calculated Custom Fields topic for more information about variable types
-
-
From the Field drop-down menu, select the field to use for the variable.
-
If you selected the Map type or Range variable type in step 9, see the additional steps below.
-
When you are ready to save the variable, click the OK button.
-
To add more variables, repeat steps 7 - 12 as many times as needed until all variables have been entered.
-
When you have entered all necessary variables, click OK in the Add Calculated Custom Field pop-up window to save the new field.
The new calculated custom field is added to the Custom Fields grid.
Add a Map-type Variable Value
If you selected Map in step 9 above, follow these steps to define the variable value:
-
In the Mapped Variable Values grid, click the New button.
The Add New Mapped Value dialog box opens.
-
From the Source Value drop-down menu, select a value.
The value is related to the Field you selected in step 10 above. For example, if you selected the Work Orders module Priority field in step 10 above, you might enter Urgent as the Field Value in this step.
-
In the Variable Value field, enter a numeric value that will represent this variable in the formula.
-
In the Notes field, enter any notations you want to appear next to the field name and description in the Mapped Variable Values grid.
-
Click OK to save the variable.
-
Repeat these steps to add more mapped values.
-
When you have entered all necessary values, click OK.
The Add Calculated Custom Field window is again displayed and you can continue with step 12 above.
Add a Range-type Variable Value
If you selected Range in step 9 above, follow these steps to define the variable value:
-
In the Ranged Variable Values grid, click the New button.
The Add New Range Value dialog box opens.
-
In the Field Name field, enter a field name.
-
Enter values for the Minimum Value and/or Maximum Value fields to define the range.
Only one of these fields must be specified. Therefore you can enter just a minimum value, just a maximum value, or both values.
If you entered a minimum value, also specify whether the range operator should be > or >=. If you entered a maximum value, also specify whether the range operator should be < or <=.
-
In the Value field, enter the formula value for the variable.
-
In the Notes field, enter any notations you want to appear next to the field name and description in the Ranged Variable Values grid.
-
Click OK to save the variable.
-
Repeat these steps to add more ranged values.
-
When you have entered all necessary values, click OK..
The Add Calculated Custom Field window is again displayed and you can continue with step 12 above.
Add a Relative Range-type Variable
If the field you're using has a date field as the variable, a Relative Date check box is displayed in the Add New Range Value dialog box. When this option is selected, TMS considers the value entered into the date field to be within range, only if the difference between the current date/time and the value of the selected field on the object.
For example, consider selecting the Date Needed field as the variable field, and a relative range with:
-
Months as the Date Part
-
1 as the Minimum Value (>=)
-
4 as the Maximum Value (<=)
In this case, the value entered into the variable field will be considered in range, only if the date being passed in is between 1 and 4 months in the future. So, if the current month is May, and the Date Needed is specified as August, the value will be considered valid and in range.
If you want the range to look for dates in the past, use negative numbers (-1) in your range.
If you selected Range above, follow these steps to define a relative range variable value:
-
In the Ranged Variable Values grid, click the New button.
The Add New Range Value dialog box opens.
-
In the Field Name field, enter a field name.
-
Select the Relative Date check box.
-
Enter values for the Minimum Value and/or Maximum Value fields to define the date range.
Only one of these fields must be specified. There fore you can enter just a minimum value, just a maximum value, or both values.
If you entered a minimum value, also specify whether the range operator should be > or >=. If you entered a maximum value, also specify whether the range operator should be < or <=.
-
In the Value field, enter the formula value for the variable.
-
In the Notes field, enter any notations you want to appear next to the field name and description in the Ranged Variable Values grid.
-
Click OK to save the variable.
-
Repeat these steps to add more ranged values.
-
When you have entered all necessary values, click OK..
The Add Calculated Custom Field window is again displayed and you can continue with step 12 above.