Format Heater, applying non-standard format changes to fields
The Format Heater enables you to format fields differently to the standard formatting of the WRITE Adapter. The output of this Heater is always of String data type. Please also refer to the general information on the use of Heaters (functions)
The Format Heater is one of the most powerful and effective functions of FlowHeater. Some example uses: The Format Heater makes it possible to format a string with a fixed length (column width), where the result can be left or right justified within the field and padded with any chosen filler character. Maybe you wish to format currency data according to different country formatting criteria, to achieve that you only need to select the respective locale in the Format tab and set the data type to Currency; it’s as simple as that.
Note: Any number of Format Heaters with different formatting tasks and locales can be combined together.
General tab
Data type: This selection controls how FlowHeater should interpret the incoming data type. With respect to the data type you select here, the incoming value is transformed according to the settings in the Format tab.
Alignment: Left or right justified . This setting only applies if you have selected a fixed length (column width) for the field in the Length parameter below.
Filler: Which character is to be used as padding to fill out fields shorter than the fixed length, Default = the space character. This setting only applies if you have selected a fixed length (column width) for the field in the Length parameter below.
Length: Here you enter a fixed number of characters that the text in the field is to be formatted. 0 = no fixed length. Warning: if the length specified is smaller than the actual content of the field, characters will be truncated to the left or right (depending on the alignment selected).
Test value:: Here you can enter a example of an incoming value to verify the result of the formatting selected. If no value is entered here then a default value is generated, which varies according to data type. Note: The value is converted according to the present settings for this data type in the WRITE Adapter. This means that if you enter a number it must comply with the locale configured in the WRITE Adapter.
For example, let us suppose in the Format Heater you assume the comma is a separator for thousands and the point denotes decimals, but in the WRITE Adapter you have configured it precisely the other way around. You now enter the value 1.23 and intend it to mean 1 euro and 23 cents, but in fact it is shown as 123.00 € because the point is effectively ignored and it is as if you entered 123.
Example output: The result of the Test value you entered (or a default value) is shown here with format applied.
Format tab
Please also refer to the general information on the use of Heaters (functions)
Examples