Skip to content

Text field formatting

Text Field formatting is useful for converting codes to a consistent format so that the codes found in the data source match those defined in the Decodes.

Tip

If you have codes of the form 1,2,3...99 (say) always use right justify zero pad (or right justify blank pad) to ensure that you get a consistent code match and that the codes alpha sort sequence is logical.

Formatting options

Right Justify Zero Pad formats the data right justified and padded with zeros.

e.g. 69 -> 00069 (assuming code size of 5)

Right Justify Blank Pad formats the data right justified and padded with spaces.

e.g. 69 -> ^69 (assuming code size of 5)

Left Justify Blank Pad formats the data left justified and padded with spaces.

e.g. 69 -> 69^ (assuming code size of 5)

First N takes the left N characters where N is the map size.

UpperCase forces all alpha characters to upper case.

LowerCase forces all alpha characters to lower case.

ProperCase forces all alpha characters to lower case apart from the first character and any character following a space.

To ASCII: strip top bit forces all characters to be in the ASCII range 32 → 127. Other characters are mapped to spaces.

No Control Characters removes any control characters (CR, LF etc). replacing them with spaces.

Array -> Bits takes a repeating array of data from the input, and produces a FastStats Flag Array by turning on and off the necessary bits. Note that the selector must be defined as a Flag Array, with the code size set equal to the codes in the array. The Decodes define the Flag Array. The map size holds the number of slots in the input data array.