Skip to content

TSTool / Command / ManipulateTableString


Overview

The ManipulateTableString command manipulates a string column in a table. For example, it may be necessary to manipulate strings in a table in order to match time series identifier parts, so that lookups can occur. The input is specified by:

  • a table column name (InputColumn1)
  • optionally, either a second input column name (InputColumn2) or a constant string value (InputValue2), depending on operator
  • optionally, some operators require an additional input value (InputValue3)

The result is placed in the output column (OutputColumn). Missing/blank input will be considered as empty strings when formatting the output. The output column can be the same as an existing table column.

Command Editor

The following dialog is used to edit the command and illustrates the syntax of the command.

ManipulateTableString

ManipulateTableString Command Editor (see also the full-size image)

Command Syntax

The command syntax is as follows:

ManipulateTableString(Parameter="Value",...)

Command Parameters

Parameter                           Description Default          
TableID The identifier for the table to process. Can be specified with ${Property} notation. None – must be specified.
ColumnIncludeFilters Specify values to match to include rows using syntax: Column1:Value1,Column2,Value2, where values can use * for wildcard. All values must be matched to include a row. Can be specified with ${Property} notation. Include all rows.
ColumnExcludeFilters Specify values to match exclude rows using syntax: Column1:Value1,Column2,Value2, where values can use * for wildcard. All values must be matched to exclude a row. Can be specified with ${Property} notation. Include all rows.
InputColumn1 The name of a column containing strings, as the first input. Can be specified with ${Property} notation. None – must be specified.
Operator The operation to perform on the input strings:
  • Append – append the second input to the first input (requires 2 inputs)
  • Prepend – prepend the second input before the first input (requires 2 inputs)
  • Replace – start with the first input, replace the substring indicated by the second input with that of the third input (requires 3 inputs)
  • Remove – start with the first input, remove the substring indicated by the second input (requires 2 inputs)
  • Split – split string by delimiter and output part
  • Substring – split out a substring from the first input, where the second input is the starting character position (1+) and the optional third input is the ending character position (1+) (requires 2 or 3 inputs)
  • ToDate – convert the first input to a DateTime object with date precision
  • ToDateTime – convert the first input to a DateTime object
  • ToDouble – convert the first input to a double precision object
  • ToInteger – convert the first input to an integer object
None – must be specified.
InputColumn2 The name of a column containing strings, as the second input. Can be specified with ${Property} notation. Required if a 2nd input value is needed no InputValue2.
InputValue2 A string constant, as the second input. Can be specified with ${Property} notation. For Replace operator, use ^ to indicate start of line, $ to indicate end of line, \$ to match a dollar sign, and \s to indicate space. Required if a 2nd input value is needed and no InputColumn2.
InputValue3 A string constant, as the third input. Can be specified with ${Property} notation. See note for InputValue2 for Replace operator. Required if a 3rd input value is needed.
OutputColumn The name of a column to receive the output. Can be specified with ${Property} notation. None – must be specified.

The following table describes the parameters that are needed for each operator. This table will be completed for other operators in the future.

Operators and Parameter Requirements

Operator Parameters Required and Description
Split
  • InputValue2 is the delimiter character
  • InputValue3 is the part to output (1+)

    Examples

    See the automated tests.

    Troubleshooting

    See Also