New to Telerik Document Processing? Start a free 30-day trial
Compare Field
Updated on Jul 15, 2026
CompareField is a Field element that compares two values. It displays "1" if the comparison is true or "0" (zero) if the comparison is false.
Field Syntax
The syntax of a compare field is as follows:
| Syntax |
|---|
| { COMPARE Expression1 Operator Expression2 } |
Expression1, Expression2
Values to compare.
Operators
The following table lists all comparison operators.
| Operator | Description |
|---|---|
| = | Equal to |
| <> | Not equal to |
| > | Greater than |
| < | Less than |
| >= | Greater than or equal to |
| <= | Less than or equal to |
Inserting
You can insert a Compare Field through the RadFlowDocumentEditor's InsertField() method. It accepts code as the first argument and result as the second argument.
Example 1: Insert a COMPARE field that checks whether CustomerNumber is different from 1
C#
editor.InsertField("COMPARE MERGEFIELD CustomerNumber <> 1", "«to be updated»");