TSTool / Command / FormatTableString
FormatTableString uses zero or more table columns as input and formats an output table column.
For example, it may be necessary to concatenate information from several columns to create an identifier.
It can also be used to assign a literal string to a column.
See also the
Formatting occurs as follows:
- The data types for input columns control the type of formatting that can be done. For example, columns containing floating-point numbers must use the format specifiers for floating-point numbers.
- Format specifiers are consistent with the C programming language.
- Missing values in input will result in blanks in output.
The following dialog is used to edit the command and illustrates the syntax of the command
(in this case illustrating how values in a column named
LocationID are copied to a new table).
FormatTableString Command Editor (see also the full-size image)
The command syntax is as follows:
||The identifier for the table to process. Can specify using processor
||None – must be specified.|
||The names of one or more input columns. Values from the columns will be formatted according to the
||Required if format specifiers are given.|
||The format specifier string used to format the data values. See the editor dialog for examples and refer to printf documentation. Specify as many format specifiers as there are input columns. All other characters will be transferred literally to the output string.||None – must be specified.|
||The name of the column to receive the output.||None – must be specified.|
||The name of the column before which to insert the new column.||After last column.|
See the automated tests.