# NextIfField Class

> The NextIfField class implements the MS Word specific NEXTIF field. This field must be used in combination with an ApplicationField that should be modified using this adapter.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 20.0
- **Namespace:** `TXTextControl.DocumentServer.Fields`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Inherits:** `TXTextControl.DocumentServer.Fields.FieldAdapter` › `TXTextControl.DocumentServer.Fields.MailMergeFieldAdapter`
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.DocumentServer.Fields > NextIfField Class
- **1155 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/nextiffield/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/nextiffield/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/nextiffield/llms-full.txt

---

### Description

The NextIfField class implements the MS Word specific NEXTIF field. This field must be used in combination with an [ApplicationField](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/applicationfield/llms-full.txt) that should be modified using this adapter.

### Syntax

```csharp
public sealed class NextIfField : MailMergeFieldAdapter
```

```vbnet
Public NotInheritable Class NextIfField
    Inherits MailMergeFieldAdapter
```

### Examples

The following example creates a Next If Field instance and configures its operator setting for a document workflow.

```csharp
TXTextControl.DocumentServer.Fields.NextIfField nextIfField = new();
nextIfField.Operator = TXTextControl.DocumentServer.Fields.IfField.RelationalOperator.Equals;
```

```vbnet
Dim nextIfField As New TXTextControl.DocumentServer.Fields.NextIfField()
nextIfField.Operator = TXTextControl.DocumentServer.Fields.IfField.RelationalOperator.Equals
```

---

## In This Section

- [NextIfField Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/nextiffield/constructor/llms-full.txt): Initializes a new instance of the NextIfField class.
- [NextIfField.DataSourceCulture Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/nextiffield/datasourceculture-property/llms-full.txt): Specifies the culture which is used for the relational comparison of numerical values. The default value for this property is the current thread culture.
- [NextIfField.Expression1 Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/nextiffield/expression1-property/llms-full.txt): Gets and sets the first expression text that should be compared. To use this field in the MailMerge component, this property must be a valid field name.
- [NextIfField.Expression2 Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/nextiffield/expression2-property/llms-full.txt): Gets and sets the second expression text that should be compared to Expression1.
- [NextIfField.FieldValue Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/nextiffield/fieldvalue-property/llms-full.txt): Gets or sets the field's value of the field that has been specified in Expression1.
- [NextIfField.MergeCulture Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/nextiffield/mergeculture-property/llms-full.txt): Specifies the culture with which numerical and date / time values are formatted when merged into the target document. The default value for this property is the current thread culture.
- [NextIfField.Operator Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/nextiffield/operator-property/llms-full.txt): Gets and sets the comparison operator the field.
- [NextIfField.Result Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/nextiffield/result-property/llms-full.txt): Gets the evaluation result of the two field expressions and the specified comparison operator.

---

## Nearby

- **Previous:** [NextField Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/nextfield/constructor/llms-full.txt)
- **Next:** [NextIfField Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/nextiffield/constructor/llms-full.txt)
