Traverse Global v11.2
Functions
You can use three types of functions when constructing formulas: Table Lookups, Conditionals, and MIN/MAX functions. All are explained below.
Table Lookups
Use the f.TableValue(row, column) and f.GradientValue(value, column) functions to look up values in formula (tax) tables. Use the f.GradientValue function to look up information in a graduated tax table that has multiple rows or lines in ascending order, like the FED__FWH and PMN__SWH tables. The f.TableValue function is used to look up information in a table that is not arranged with graduated multiple rows, like a PMN__SUI table. Use the f.TableValue and f.GradientValue functions to have the formula look up values in formula tables that have been set up in the ST database (without the Show Company Specific Tax Tables box checked) and to have the formula look up values in formula tables that have been set up in the company database (with the Show Company Specific Tax Tables box checked).
The format for the f.GradientValue command is: f.GradientValue(value, column); where value is the row (or line) in the tax table and column is the column number. The tax table read by the f.GradientValue function is specified in the Formula function on the Setup and Maintenance menu.
The withholding code SWH for the state of Minnesota was set up in Codes Maintenance Tax Authorities. State and federal tax formulas in Traverse are stored in the ST database. Do not modify formulas in the ST database unless you are aware of what you are doing.
If the formula used the command f.GradientValue(30,000,2), the system looks at the first column of the specified tax table until it finds the first row with an amount greater than 30,000. Then, it goes to the row immediately before that one and returns the value found in the second column of that row.
You can also use variable with the table lookup functions. You can, for example, use a variable calculated in a previous line of a formula to find a row in the tax table. For example, in the command f.GradientValue(L2,2), the system will read the tax table assigned to the formula looking for the value greater than the amount stored in the variable L2.
You can use only one f.GradientValue command per formula line.
Use the f.TableValue function to look up information in a tax table that is not arranged with graduated multiple rows, like the PMN__SUI table displayed on the screen.
The format for the f.TableValue(row, column); where row is the row in the tax table and column is the column number. The tax table to be used by the f.TableValue function is specified in the Formula function on the Setup and Maintenance menu when you setup the formula ID.
NOTE: You can use only one f.TableValue command per formula line
When the withholding code SUI for the state of Minnesota was set up in the Formula function, the formula PMN__SUI and the table PMN__SUI were assigned to SUI. The command f.TableValue(1,2) is used in the formula. The system returns 3.0000, the value found in the first row, second column of the table PMN__SUI.
NOTE: You must use the look function f.TableValue if you are adding a new formula and formula table that currently is not in the included State and Federal tax tables and formulas. (For example: Adding a local tax formula or company specific SUI formula and table.)
Conditionals
You can use the IF(x, y, z) function to evaluate formulas conditionally. If condition x is true, then perform y, else perform z.
For example:
if L1 > f.GetNumericVariable(“FC1”):
L3 = L2
else:
L3 = 0.
If the value of L1 is greater than FC1, we return a value of L2; otherwise we return the value of 0.
NOTE: It is important to use a constant number of spaces as indentations for the lines following the if and else command lines. The example above uses 3 spaces as indentations. At the end of the if and else command lines you must use a colon: to indicate what the next condition is.
If you want to bring in the value of a specific deduction taken out of an employee’s check you can use the f.Deduction functions. There are two f.Deduction functions.
f.Deduction(dedID) - Returns the deduction amount for the deduction id for the current check.
f.DeductionYTD(id) - Returns the year to date deduction amount for the dedID.
When you are using the f.Deduction functions you do not put square brackets around the f.Deduction command. To return the value you must put the id in parentheses and within quotes (“006”).
Use the If function, IF(x, y, z) to perform logical operations (x) and return (y) if (x) is true, or return (z) if (x) is false. You can also look at this as If (x) is true, then (y), else (z).
MIN/MAX functions
If you wish to test the values of two variables, and have the larger value returned, you can use the function MAX(value,value). Conversely, if you wish to test the values of two variables, and have the lesser value returned, you can use the function MIN(value,value).
To return a value from the formula you must use the f.SetNumericVariable command as the last line of the formula. The syntax for the f.SetNumericVariable(name, value), where name is the name of the value to return and value is the value you want to return, would be as follows:
f.SetNumericVariable(“CALCVALUE”, L4)
The command usually will include the variable CALCVALUE to return the value that has been calculated in the formula and the L4 which is the last line in the formula.