FormatNumberToLocale

Syntax

bool SplitTextIntoVariables (string TextToSplit, string NewVariableName, string SplitCharacter)

Parameters

None.

Returns

True if no errors are encountered. Otherwise, False.

Level

Field level.

Details

This action evaluates the current field value for known number patterns and if a known pattern is detected, updates the decimal and digit separators characters (if present) to match that of the current locale, for use when processing fields with number types formatted incorrectly for the current locale. i.e. USA vs European. Known patterns are industry standard digits with or without 3 digit group separators, and 1-2 digits following a decimal separator.

Distinct Analyzed groups:
  1. Numerals with decimal point

    Group Separators using comma, apostrophe or space characters.

    Decimal Separator using decimal character.

  2. Numerals with decimal comma

    Group Separator using decimal, apostrophe or space characters.

    Decimal Separator using comma character.

  3. Numerals with Arabic/Persian characters

    Group Separator using Arabic/Persian character.

    Decimal Separator using Arabic/Persian character.

Note: Numerals with lakhs layout and decimal mark (pattern of n,nn,nn,nnn.dd) are not supported.

Example 1

a) Given a US number 1,234.56 to be formatted to Germany.

FormatNumberToLocale()

New format will be 1.234,56

Example 2

b) Given a US number 1234.5 to be formatted to Germany.

FormatNumberToLocale()

New format will be 1234,5

Example 3

c) Given a US number 1,234.567 to be formatted to Germany.

FormatNumberToLocale()

Format will remain 1,234.567 since 3 digits following the decimal are not supported.

Example 4

d) Given a US number 12345678.90 to be formatted to Germany.

FormatNumberToLocale()

New format will be 12345678.90

Example 5

e) Given a German number 1.234.567,89 to be formatted to US.

FormatNumberToLocale()

New format will be 1,234,567.89

Example 6

f) Given a German number 0,5 to be formatted to US.

FormatNumberToLocale()

New format will be 0.5