New to Telerik Document Processing? Start a free 30-day trial
Compare Field
Updated on Feb 19, 2026
CompareField is a Field element that compares two values. It displays the result "1" if the comparison is true or "0" (zero) if the comparison is false.
Field Syntax
This is how the syntax of a compare field looks like:
| Syntax |
|---|
| { COMPARE Expression1 Operator Expression2 } |
Expression1, Expression2
Values to compare.
Operators
In the table bellow are listed all the comparison operators.
| Operator | Description |
|---|---|
| = | Equal to |
| <> | Not equal to |
| > | Greater than |
| < | Less than |
| >= | Greater than or equal to |
| <= | Less than or equal to |
Inserting
Inserting a Compare Field is easily achieved through the RadFlowDocumentEditor's InsertField() method. It accepts code as first argument and result as second argument.
Example 1: Insert a CompareField
c#
editor.InsertField("COMPARE MERGEFIELD CustomerNumber <> 1", "«to be updated»");