Predefined formatter business rules
Use predefined formatter business rules to transform field data into specific formats.
Tungsten TotalAgility includes predefined formatters that automatically transform field data. Each formatter shows an example of input data and the resulting output after the transformation is applied.
Formatters
| Name | Description | Input | Output |
|---|---|---|---|
| Format Capitalize | Capitalizes the first letter of each word in the field. | hello world | Hello World |
| Format Currency | Formats a numeric value as currency. | 1234.56 | $1,234.56 |
| Format Date | Formats a date value into a standard date format. | 20240115 | 01/15/2024 |
| Format DateTime | Formats a date and time value into a standard format. | 2024-01-15 14:30:00 | 01/15/2024 2:30 PM |
| Format HTML2Text | Converts HTML content to plain text by removing HTML tags. | <p>Hello</p> | Hello |
| Format MaskCreditCard | Masks a credit card number to show only the last four digits. | 1234567890123456 | ************3456 |
| Format MaskEmail | Masks an email address to protect privacy. | user@example.com | u***@example.com |
| Format MaskPhone | Masks a phone number to protect privacy. | 1234567890 | ******7890 |
| Format MaskSSN | Masks a Social Security Number to show only the last four digits. | 123456789 | ***-**-6789 |
| Format NormalizeEmail | Normalizes an email address to a standard format. | User@EXAMPLE.COM | user@example.com |
| Format NormalizePhoneNumber | Normalizes a phone number to a standard format. | (123) 456-7890 | 1234567890 |
| Format NormalizeWhitespaces | Normalizes whitespace by replacing multiple spaces with a single space. | hello world | hello world |
| Format PadLeft | Pads the field with characters on the left to reach a specified length. | 123 | 00123 |
| Format PadRight | Pads the field with characters on the right to reach a specified length. | 123 | 12300 |
| Format Percentage | Formats a numeric value as a percentage. | 0.75 | 75% |
| Format PhoneNumber | Formats a phone number into a standard format. | 1234567890 | (123) 456-7890 |
| Format RemoveAllButDigits | Removes all characters except digits from the field. | abc123def456 | 123456 |
| Format RemoveAllButLetters | Removes all characters except letters from the field. | abc123def456 | abcdef |
| Format RemoveChars | Removes specified characters from the field. | hello-world | helloworld |
| Format RemoveDigits | Removes all digits from the field. | abc123def456 | abcdef |
| Format RemoveLetters | Removes all letters from the field. | abc123def456 | 123456 |
| Format RemoveSpecialCharacters | Removes special characters from the field. | hello@world! | helloworld |
| Format RemoveSubString | Removes a specified substring from the field. | hello world test | hello test |
| Format RemoveWhitespaces | Removes all whitespace characters from the field. | hello world | helloworld |
| Format Replace | Replaces all occurrences of a specified string with another string. | hello world hello | hi world hi |
| Format ReplaceFirst | Replaces the first occurrence of a specified string with another string. | hello world hello | hi world hello |
| Format ReplaceLast | Replaces the last occurrence of a specified string with another string. | hello world hello | hello world hi |
| Format ReplaceSubString | Replaces a substring within the field with another string. | hello world | hello universe |
| Format SSN | Formats a Social Security Number into standard format. | 123456789 | 123-45-6789 |
| Format Time | Formats a time value into a standard time format. | 143000 | 2:30 PM |
| Format ToBoolean | Converts the field value to a Boolean (true/false) value. | 1 | true |
| Format ToCamelCase | Converts text to camel case format (firstWordSecondWord). | hello world test | helloWorldTest |
| Format ToChar | Converts the field value to a character. | 65 | A |
| Format ToDecimal | Converts the field value to a decimal number. | 123.456 | 123.46 |
| Format ToDouble | Converts the field value to a double-precision floating-point number. | 123.456789 | 123.456789 |
| Format ToFloat | Converts the field value to a floating-point number. | 123.45 | 123.45 |
| Format ToInt | Converts the field value to an integer. | 123.45 | 123 |
| Format ToLong | Converts the field value to a long integer. | 1234567890 | 1234567890 |
| Format ToLowerCase | Converts all text in the field to lowercase. | HELLO WORLD | hello world |
| Format ToPascalCase | Converts text to Pascal case format (FirstWordSecondWord). | hello world test | HelloWorldTest |
| Format ToString | Converts the field value to a string. | 12345 | 12345 |
| Format ToTitleCase | Converts text to title case with the first letter of each word capitalized. | hello world | Hello World |
| Format ToUpperCase | Converts all text in the field to uppercase. | hello world | HELLO WORLD |
| Format TruncateToLength | Truncates the field to a specified maximum length. | hello world | hello |
More info