Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

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

 

There are three attributes for these fields that are important:

...

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

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 allow a user to enter only positive values

The maxLength parameter is optional and it limits the number of digits allowed to be entered before the decimal separator. if it's not specified, there is no limitation. 

  • 0,000.00|-|,|4 - specifying all fields (e.g. 1234,567 -> 1-234,56)
  • 0,000.00|-|,|6 - specifying all fields (e.g. 123421,567 -> 123-421,56)

The minVal and maxVal parameters are optional and it specify the minimum and maximum value accepted for the numeric input.

  • 0,000.00|-|,|4|10|1000 - a number between 10 and 1000

 

(info) Starting with SWAT Release 2019.22, you can specify the extendedFormat also as a JSON object. The backwards compatibility is kept.

  • {"format":"","groupSep":"","decSep":"","maxLength":"","minVal":"","maxVal":""}

isCurrency attribute

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

...

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.