This operator applies a formula in C# syntax to each row of the input table sequentially starting at the first row.
It creates a new column containing the results of each row's calculation. As the operator processes the rows in a sequentially, it can refer to the calculation results of the previous rows.
Application scenarios are summing up values from some columns, re-formatting data or applying if... then... else... conditions.
System.String System.String System.String System.Boolean
Name Value Opt. Description Example Function - User-defined function in C# syntax. Select "Edit..." to modify the formula and add parameters. - Name of the result column - Name of the result column. - Result column type - Data Type of the result column. - Delete result column after calculation - Operator creates an additional column for calculation results. This column may not be necessary, e.g., if the operator only writes values in existing columns using XIH-functionality. -
Want to learn more?
A user-defined formula can be entered in C# syntax. This formula is then applied to each row of the input table sequentially starting at the first row. A new column is created containing the results of each row's calculation. As the operator processes the rows sequentially, it can refer to the calculation results of the previous rows.
Example: Sum up values from previous rows
A table containing account credit and debit entries. A column should be added that indicates the account balance.
Initial data from a parent data node or an import operator or Create table.
Add an operator and select Formual operator.
Insert code snippets for column references using the drop down.
Choode result column name and data type of the result column.
Enter formula and click "Save operator"
#Length# * #Width#
Drop down for XIH Functions code snippets.
Using C# in TIS
- Formulas and more information under MSDN
- C# is case sensitive. Be careful with upper and lower case letters!
- Write the constant with decimal places -->
7.0if an operation is supposed to yield a number with decimal places and you are working with constants.
- class names must be fully qualified, e.g.
Specific in TIS:
- Variables have to be enclosed by # to be recognized.
#Length#+#Width#means that the values of the columns "Length" are added to the values of column "Width".
- Additional functions, such as the Ximes Helper (XIH) Functions and built-in variables such as
rownumberprovide additional functionality. Please refer to the sections below.
- XIH Functions do NOT allow # in the notation of variables. Example: write "Identifier" instead of "#Identifier#".
Using Parameters in the Formula Operator
Parameter may be used only with XIH-Funktions, see also General Parameters in the "Formula Operator v04". Declarations in the former table below with columns, parameters and manual entries are not supported anymore.