Skip to main content
Mitratech Success Center

Number Field Tag Attributes


Controls the format of the number field to either dollar, decimal or percent. The following values can be entered:

  • DOLLAR—Sets the format of the number field to include the appropriate currency sign, a decimal point, and commas. For example, 42000 is formatted to $42,000.00 after the user saves the record.


<TCFIELD NAME="AnnualSalary" format="DOLLAR" />


<tc:field name="AnnualSalary" category="EMPL" format="DOLLAR" />
<tc:wizardParameter name="AnnualSalary" format="DOLLAR" />

This attribute displays the symbol of the system default currency in all object records except contacts, where it displays the symbol of the currency selected for that contact.

When used for custom fields of type Number in invoices that are entered in the original currencies different from the system default currency, this attribute will not reflect the currency symbol of the invoice.

  • DECIMAL—Sets the format of the number field to include a decimal point and commas. The number of zeros after the decimal point depends on the values of two other attributes:

    • minimumFractionDigits is used in cases where you wish to show digits to the right of the decimal point even when the rightmost decimal place(s) contain zero.
    • maximumFractionDigits is used in cases where you wish to store no more than a specified number of decimal places. If the user types more than the specified number of decimals, the result is rounded to the specified number of decimals.

If either of these attributes is not specified, the attribute's default number of decimal places is 2.

The value of maximumFractionDigits must not be specified as less than the value of minimumFractionDigits.


<TCFIELD NAME="Salary" format="DECIMAL" />


<tc:field category="MATT" name="Rate" format="DECIMAL" minimumFractionDigits="3" maximumFractionDigits="4" />

For example, if the user types 42000 into field "Salary", above, the user input 42000 is formatted to 42,000.00 (default 2 decimal places) after the user saves the record.

An additional example: In the "Rate" field shown above, if the user types 37.1, it is formatted at save time to 37.100 (the minimum of three decimals applies in this case.) If the user types 37.10046, the field is formatted to 37.1005 (the maximum of four decimals applies in this case, and rounding is used.)

  • NONE—Sets the format of the number field to use no formatting, such as a decimal point and commas. For example, if a number field is set to NONE, the user input 1501082006 is not formatted with commas and appears exactly as it is entered.


<TCFIELD NAME="VoucherNumber" format="NONE" />


<tc:field name="VoucherNumber" category="VNUM" format="NONE" />

<tc:wizardParameter name="VoucherNumber" format="NONE"/>

  • PERCENT—Sets the format of the number field to round the decimal to the nearest integer and to include the percent sign. For example, if a number field is set to PERCENT the user input 45.75 is formatted to 46% after the user saves the record.


<TCFIELD NAME="RaisePercent" format="PERCENT" />


<tc:field name="RaisePercent" category="EMPL" format="PERCENT" />

<tc:wizardParameter name="RaisePercent" format="PERCENT" />


Controls the width of number fields by specifying the number of numeric characters for the field. For example:


<TCFIELD NAME="Salary" size="10" />


<tc:field name="Salary" category="EMPL" size="10" />

<tc:wizardParameter name="Salary" size="10" />


Limits the maximum number of characters a user can enter in number fields. Set the attribute value to a number to represent the maximum number of numeric characters allowed. For example:


<TCFIELD NAME="Salary" size="10" maxlength="10" format="DOLLAR" />


<tc:field name="Salary" category="EMPL" size="10" maxlength="10" format="DOLLAR" />

<tc:wizardParameter name="Salary" size="10" maxlength="10" format="DOLLAR" />


Prevents users from entering data into the number fields. This attribute is used with business rules and JavaScript. For example:


<TCFIELD NAME="Percent" format="PERCENT" onFocus="javascript:blur();" />


<tc:field name="Percent" category="EMPL" format="PERCENT" onFocus="javascript:blur();" />

<tc:wizardParameter name="Percent" format="PERCENT" onFocus="javascript:blur();" />

The same rules apply to including multiple attributes for a tag. For example, the custom field Salary can have the attributes format, size, and maxlength. See the example in maxlength.

  • Was this article helpful?