Round

Rounds data from the Exp function. You specify the degree of rounding in the argument. This function can be used in these types of rules:

  • Calculation

  • Translation

  • Consolidation

    Tip:

    If you need to apply various degrees of rounding in a Calculation rule, you can include multiple statements that contain Round.

Syntax

HS.Round(Unit)

where Unit is a factor for rounding. Value of 1 rounds to the nearest whole number. Value of 0.1 rounds to the nearest tenth. Value of 0 turns off rounding.

If you specify 0 for this argument, rounding is turned off for all subsequent Exp functions in a Calculation rule. This syntax has the same effect as HS.NoRound: HS.Round(0)

Caution:

The NumDecimalPlaces attribute of an account determines the maximum number of digits that can appear to the right of the decimal point. The Round function does not override this attribute.

Return Value

None.

Example

This example rounds the amount inserted into the SalesRound account to the nearest tenth, then uses NoRound to turn off rounding for the amount inserted into the SalesNoRound account’s cells:

HS.Round(0.1)
HS.Exp"A#SalesRound = A#Sales"
HS.NoRound
HS.Exp"A#SalesNoRound = A#Sales"