Skip to main content
Mitratech Success Center

Client Support Center

Need help? Click a product group below to select your application and get access to knowledge articles, webinars, training content, and release notes or to contact our support team.

Authorized users - log in to create a ticket, view tickets status and check your success plan details.

 

Number Field Tag Attributes

format

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.

Form

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

Block

<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.

Form

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

Block

<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.)

  • PLAIN—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 PLAIN, the user input 1501082006 is not formatted with commas and appears exactly as it is entered.

Form

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

Block

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

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

  • 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.

Form

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

Block

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

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

size

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

Form

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

Block

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

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

maxlength

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:

Form

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

Block

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

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

 onFocus="javascript:blur();"

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

Form

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

Block

<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?