TX Text Control .NET for WPF

FilterInstruction Class

Class|Introduced in 26.0
Namespace
TXTextControl.DocumentServer.DataShaping
Package
TXTextControl.TextControl.WPF.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXDocumentServer.dll
Install
dotnet add package TXTextControl.TextControl.WPF.SDK .NET 8 and later. For .NET Framework, reference TXDocumentServer.dll from the setup.

Description

The FilterInstruction class is used to filter merge block data by certain conditions before merging. A filter instruction represents a condition which must be fulfilled by the content of a data row in a data table to execute a certain merge action. It uses a relational operator such as "is equal to" or "is greater than" to compare a given value to the contents of a specified data row column. This class is used in class MergeBlockInfo to determine if a merge block should be merged at all, for example. Multiple filter instructions can be logically concatenated using "and" and "or" operators.

Syntax

public class FilterInstruction

Examples

The following example creates a Filter Instruction instance and configures its column name setting for a document workflow.

TXTextControl.DocumentServer.DataShaping.FilterInstruction filterInstruction = new("CustomerName", TXTextControl.DocumentServer.DataShaping.RelationalOperator.Equals);
filterInstruction.ColumnName = "CustomerName";

Members

Constructors

ConstructorDescription
FilterInstructionInitializes a new instance of the FilterInstruction class.

Properties

PropertyDescription
ColumnNameGets or sets the name of the table column whose content this merge condition is compared to.
CompareToGets or sets the value the table column content is compared to using the specified comparison operator. If this value can be parsed to a numerical value, a numerical comparison is used internally when possible (i. e. when the table column contains numerical values, too). Otherwise the column content and this value are interpreted as / converted to strings.
ComparisonOperatorGets or sets the relational operator used as the comparison operator. See the description of the constructor of this class for possible values.
CultureGets or sets the format provider for numerical value comparison. The default value for this property is the invariant culture.
LogicalOperatorGets or sets the logical operator by which to logically connect a filter instruction to the previous one if a filter consists of a collection of multiple filter instructions. Possible values are listed in the description of the constructor of this class.