Webster+

Webster+ Calculations

Within Webster+, you can specify fields (inputs or hidden fields) that can be set to contain calculated values. These values are derived from the various other values within the page and are calculated locally on the workstation with no server involvement.

Example:

You may want to create a field that will have the discounted price. This field might have a calculation assigned to it:
          UnitPrice - (UnitPrice * DiscountPct / 100)
This calculation could be assigned a field called TruePrice that could be a display-only field on your screen. The system will automatically execute this calculation and set the value accordingly.

When calculations are used with Grids, the variable name should be prefixed with the Grid name followed by a : (colon). If the calculation itself is outside the Grid references, the value used will be the sum of all values in the Grid with that name. If referenced within the Grid, it will only use the value for that column on the current row.

The calculations themselves are basically done using JavaScript; however, a number of PxPlus functions are supported:

Function

Description

INT(numeric)

Returns the integer value of the numeric value. See INT function.

LCS(value)

Returns the lowercase of the string. See LCS function.

LEN(string)

Returns the length of the string. See LEN function.

MAX(values)

Returns the highest value. See MAX function.

MIN(values)

Returns the lowest value. See MIN function.

NUM(string)

Returns the numeric value of a numeric expression in a string. See NUM function.

PAD(string, length, code, char)

Returns the value of the string padded/truncated to the length specified. See PAD function.

STP(string, code, char)

Strips the string. See STP function.

STR(numericVal)

Returns the numeric value converted to a string. The formatting option is not supported. See STR function.

TBL(n, value0, value1)

Returns the value based on the value of 'n'. See TBL function.

UCS(value)

Returns the uppercase of the string. See UCS function.

See Also

Using Grids in Webster+