> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AddNew Method of the FieldDefinitions Object

This method adds a new field definition of the specified type at the end of the collection.

## Syntax

```vb Visual Basic .NET theme={null}
Function AddNew( _
  Type As FieldTypeEnum, _
  Name As String _
) As FieldDefinition
```

```cpp C++ theme={null}
HRESULT AddNew(
  FieldTypeEnum      Type,
  BSTR               Name,
  IFieldDefinition** Result
);
```

## Parameters

*Type*

\[in] This variable specifies the type of the field. See the description of the [**FieldTypeEnum**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/fieldtypeenum.md) constants. Only the FT\_TextField, FT\_Checkmark, FT\_CheckmarkGroup, FT\_Table, FT\_PictureField, FT\_Group constants can be used as the value of this parameter.

**Name**

\[in] This variable specifies the name of the field. The name of the field can not contain a space, otherwise it couldn't be trained.

**Result**

\[out, retval] A pointer to the [**IFieldDefinition**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/fielddefinition.md)**\*** variable that receives the interface pointer for the added field definition.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## See also

[**FieldDefinitions**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/fielddefinitions.md)
