Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

The following rules are applicable for both form fields and grid columns.

 

The default format for numeric fields in Form/columns in Grid is the one specified in the PASOE configuration file, in these fields:

  • globalNumericFormat – 0,000.00
  • globalNumericGroupSep – ‘.’
  • globalNumericDecSep – ‘,’

 

There are three attributes for these fields that are important:


extendedFormat attribute

A custom format can be specified by setting the ‘extendedFormat’ attribute in the corresponding field. If the attribute is set, it will overwrite the default values (or parts of it).

The ‘extendedFormat’ attribute has the following format: ‘format|groupSep|decSep’ (e.g. 0,000.00|’|,).

The format must always use as separators the ‘,’ for groups and the ‘.’ for decimals. The format specifies the number of digits in a group and the number of digits for the decimal part. Examples:

  • 0,000.00 will display groups of 3 digits and 2 decimals  
  • 0,00.000 will display groups of 2 digits and 3 decimals
  • 0,000 will display groups of 3 digits without any decimals (so only the integer part)

The ‘extendedFormat’ attribute can then be specified like this:

  • 0,000.000 – only specifying the format and using default separators
  • |- - only specifying group separator and using default format and decimal separator
  • |-|’ – only specifying group and decimal separators and using default format
  • 0,000.00|-|, - specifying all fields (e.g. 1234,567 -> 1-234,56)
  • 0,000|’ - displaying only the integer part and specifying the group separator (e.g. 1234,567 -> 1’234)

There is also a possibility of adding currency or displaying a percentage value, like this:

  • $0,000.00|,|.  - 1234,567 -> $1,234.56
  • 0,000 Rub  - 1234,567 -> $1,234 Rub
  • 0,000 % - 12,37 -> 12%

By default, an integer/decimal field will support negative and positive values. For allowing only positive values in a field, the ‘extendedFormat’ attribute needs to start with ‘+’.

            +0,000.00|-|,  - will allow a user to enter only positive values

 

isCurrency attribute

The default currency symbol is the one specified in the PASOE configuration file in the following field: app.sessionData.mainCurrencySymbol

If the ‘isCurrency’ attribute is set for a field in Form/column in Grid, then the field will be displayed with the default format and the mainCurrencySymbol will be added in the field.

If both the ‘extendedFormat’ and ‘isCurrency’ are specified for a field, then only the ‘extendedFormat’ will be used. In order to add a currency for this field, the user must set it in the ‘extendedFormat’ (e.g. $0,000.00).

 

DATA-TYPE attribute

This attribute can be either Integer or Decimal. If it’s integer, the default format will be the one specified in ‘globalNumericFormat’, without the decimal part.

When entering a number in a field, in order to set a decimal value the user needs to specify the decimal part using ‘.’ as separator.

For integer fields, the user will not be allowed to set decimal values.

  • No labels