Logo

    Home

    Documentation

    Use Cases

    Training

    Applications

    Release Notes

    Formatting Fields (extendedFormat)

    Formatting Fields (extendedFormat)

    • Description
    • Character field formatting
    • Numeric fields formatting (Integer and Decimals)
    • Option explanation
    • Currencies
    • Setting up Default Values
    • Date and datetime formatting
    • Setting up Default Values
    • Further information

    Description

    There are several ways to ensure the right formatting of a field. The format options of the following types of a field are available:

    1. Character field formatting
    2. Numeric fields formatting
    3. Date and datetime formatting

    Character field formatting

    You can use regular expressions definitions to specify the format of a character field. The definition is added in the extendedFormat attribute in the designer.

    We support the following masks:

    Mask
    Sample (extendedFormat)
    Description
    Static Mask
    (9999) 999-9999
    E.g. for telephone number formatting “(0049) 123-1234”
    Dynamic Mask
    aa-9{1,4}
    the 9 digit can occur 1 to 4 times
    Regular Expressions
    regex:[a-zA-Z]{2,} 
    Matches two or more letters (both uppercase and lowercase)
    icon
    With the following definitions for static and dynamic mask:
    • 9 → numbers
    • a → letters
    • * → alphanumeric characters

    Numeric fields formatting (Integer and Decimals)

    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). This attribute has up to 6 options pipe-separated and the following structure: ”format|groupSeparator|decimalSeparator|maxLength|minValue|maxValue”

    Option explanation

    No.
    option
    value
    description
    Sample Values
    1
    format
    [+]0,000[.00][characters]
    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. Starting with optional + means that only positive values are allowed. You can add optional chars, e.g. “0,000.00 %” or “0,000 Hours” Keep in mind, that integer doesn’t have decimal places but you have to specify this separator at the moment.
    i) 0,000.00 groups of 3 digits and 2 decimals (1,234,567.89) ii) 0,00.000 groups of 2 digits and 3 decimals (1,23,45,67.891) iii) 0,000 groups of 3 digits without any decimals (1,234,67) iv) +000 no grouping no decimals (1234567), only positive values v) 0,000.00 % groups of 3 digits and 2 decimals with percentage sign (23,56 %)
    2
    group separator
    any character
    Define the separator between one and the other group
    E.g. , . - etc.
    3
    decimal separator
    , .
    Define the separator for the decimal places
    , .
    4
    max Length
    numeric value
    Define the max length of a numeric value, the maximum amount of digits a user can put in the field
    5: max 5 digits (12345)
    5
    min Value
    numeric value
    Defines the minimum value
    ≥ 25
    6
    max Value
    numeric value
    Defines the maximum value
    ≤ 80059
    💡
    Sample extendedFormat = 0,000|-|,|9|10|875000009
    ‣
    Explanation of sample
    icon
    You can also specify the attribute as a JSON object:  extendedFormat = {"format":"","groupSep":"","decSep":"","maxLength":"","minVal":"","maxVal":""}

    Currencies

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

    Setting up Default Values

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

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

    The data type of the field (attribute data-type) can be either Integer or Decimal.

    • If it’s integer, the default format will be the one specified in ‘globalNumericFormat’, without the decimal part.
    • For integer fields, the user will not be allowed to set decimal values.

    Date and datetime formatting

    The DATA-TYPE attribute specifies if the field is ‘date’ or ‘datetime’. The accepted values are date for date and datetime-tz for datetime.

    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 (the ones specified in the PASOE configuration file).

    Variable
    description
    %d
    day as a number with leading zero, 01..31
    %m
    month as a number with leading zero, 01..12
    %Y
    year as a number, 4 digits
    %H
    hours 24-format with leading zero, 01..24
    %i
    minutes with leading zero, 01..59

    Sample: extendedFormat = %d.%m.%Y %H:%i —> 23.08.2023 19:07

    Setting up Default Values

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

    globalDateFormat - %d.%m.%Y
    globalDateTimeFormat - %d.%m.%Y %H:%i

    For displaying dates, there are datefields in Form/Grid which have an attached Datetimepicker to them on the left side.

    Further information

    UiInteractionService: Anonymizing form and grid fields via BlurringUiInteractionService: Anonymizing form and grid fields via Blurring

    Back to DocumentationDocumentation

    Back to Home Page

    Logo