# ApplicationFieldCollection.GetItem Method

> Gets a particular field of the type ApplicationField from the collection.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 14.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > ApplicationFieldCollection.GetItem Method
- **972 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/applicationfieldcollection/getitem-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/applicationfieldcollection/getitem-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/applicationfieldcollection/getitem-method/llms-full.txt

---

### Description

Gets a particular field of the type [ApplicationField](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/applicationfield/llms-full.txt) from the collection.

### Syntax

#### GetItem()

Gets the field at the current input position or null, if there is no such field at the current input position.

```csharp
public ApplicationField GetItem();
```

```vbnet
Public Function GetItem() As ApplicationField
```

#### GetItem(int)

Gets the field with the specified id, previously set with the ID property.

```csharp
public ApplicationField GetItem(int id);
```

```vbnet
Public Function GetItem(id As Integer) As ApplicationField
```

| Parameter | Description |
|---|---|
| id | Specifies the field's identifier set with the ID property. The method returns null, if a field of the type [ApplicationField](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/applicationfield/llms-full.txt) with the specified identifier does not exist. |

### Examples

The following example retrieves a merge field by its stable ID and updates its displayed text.

```csharp
textControl.Text = "Dear ,";
textControl.InputPosition = new InputPosition(5);
ApplicationFieldCollection fields = textControl.ApplicationFields;
ApplicationField customerField = new(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", new[] { "CustomerName" }) { ID = 100 };
fields.Add(customerField);
ApplicationField field = fields.GetItem(100);
if (field != null)
{
    field.Text = "Contoso Ltd.";
}
```

```vbnet
textControl.Text = "Dear ,"
textControl.InputPosition = New InputPosition(5)
Dim fields As ApplicationFieldCollection = textControl.ApplicationFields
Dim customerField As New ApplicationField(ApplicationFieldFormat.MSWord, "MERGEFIELD", "Customer name", New String() { "CustomerName" }) With { .ID = 100 }
fields.Add(customerField)
Dim field As ApplicationField = fields.GetItem(100)
If field IsNot Nothing Then
    field.Text = "Contoso Ltd."
End If
```

---

## Nearby

- **Previous:** [ApplicationFieldCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/applicationfieldcollection/copyto-method/llms-full.txt)
- **Next:** [ApplicationFieldCollection.Item Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/applicationfieldcollection/item-property/llms-full.txt)
