# Mask Number

> Kalipso Studio 6.1 documentation · https://doc.sysdevmobile.com/kalipso/6.1/documentation/expressions/functions/numeric-functions/mask-number
>
> MaskNumber formats a number as a string with sign display, thousand separator, rounding, decimal places, decimal separator and right zeros.

This Function returns a _\<string>_, composed by the **Value** formatted according to the remaining parameters.

### Parameters

* **Value** _\<numeric_> - Number to format.
* **Sign** _\<numeric_> - Display the sign at left of the **Value**. It can be one of:
  * Minus - Display only if it's a negative Value.
  * Always - Always display the sign.
  * Never - Never display the sign.
* **Add Thousand Separator** _\<boolean_> - Display the **Value** with the thousand separator?
* **Thousand Separator** _\<string_> - Char to represent the thousand separator.
* **Round** _\<boolean> -_ Round the value?
*   **Decimal Places** _\<numeric_> - Number of decimal places to round if the Round parameter is true.

    Number of decimal places to add zeros to the right if Add Right Zeros parameter is true.
* **Decimal Separator** _\<string_> - Char to represent the decimal separator.
* **Add Right Zeros** _\<boolean> -_ Use char "0" to complete the **Value** at right in order to achieve the number of Decimal Places to display.

### Examples

* _Example 1_

MaskNumber("-10000", MINUS, TRUE, ".", FALSE, 0, "", FALSE)\
**Result** = -10.000

* _Example 2_

MaskNumber("-10000", ALWAYS, TRUE, ".", FALSE, 0, "", FALSE)\
**Result** = -10.000

* _Example 3_

MaskNumber("-10000", NEVER, TRUE, ".", FALSE, 0, "", FALSE)\
**Result** = 10.000

* _Example 4_

MaskNumber("10000", ALWAYS, TRUE, ".", FALSE, 0, "", FALSE)\
**Result** = +10.000

* _Example 5_

MaskNumber("10000.5", MINUS, TRUE, ".", TRUE, 1, ",", FALSE)\
**Result** = 10.000,6

* _Example 6_

MaskNumber("10000.55", MINUS, TRUE, ".", TRUE, 3, ",", FALSE)\
**Result** = 10.000,55

* _Example 7_

MaskNumber("10000.55", MINUS, TRUE, ".", TRUE, 3, ",", TRUE)\
**Result** = 10.000,550

* _Example 8_

MaskNumber("10000.55", MINUS, TRUE, ".", FALSE, 1, ",", TRUE)\
**Result** = 10.000,55

:::info
If **Round** is false, **Add Right Zeros** is true, and the decimal places in the **Value** are more than **Decimal Places** parameter, the decimal part will remain unmodified (see Example 8).
:::
