> ## 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.

# Map Fields activity

> Map Fields activity binds ABBYY Vantage extracted field values to UiPath variables, with type mappings for text, dates, checkmarks, groups, and tables.

**Map Fields** is typically the final Vantage activity in a UiPath workflow. It takes the **Extracted Data** from **Get Results** and binds individual fields to UiPath variables that downstream activities can use. You define the mapping in the **Designer** panel.

## Activity properties

| Group               | Property       | Type     | Description                                                                                                                                                                                                                                                    |
| ------------------- | -------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Connection Settings | Skill Name     | `String` | The name of the Vantage Document skill.                                                                                                                                                                                                                        |
| Input               | Extracted Data | `String` | Accepts a JSON string containing the extracted data. Pass to this property the value of the `ExtractedData` property of the particular `DocumentResult` received in the **Get Results** activity. To pass values between the properties, use UiPath variables. |

## Map fields to UiPath variables

<Warning>
  The **Map Fields** activity can only be used inside a configured **Vantage Scope** activity.
</Warning>

### Before you map

At runtime, the **Extracted Data** property must receive the `ExtractedData` value from the `DocumentResult` that **Get Results** returned for the Document skill this **Map Fields** activity is configured for.

Before passing the data to **Map Fields**, complete these checks:

* Confirm the document's Document skill matches the one configured in **Map Fields**. Use the `ClassName` property of the `DocumentResult` to identify the document type.
* For `ClassName` to populate, configure class-to-skill mapping in the **Extract** activity of the Process skill. The class name must equal the Document skill name.

For more information about setting up the Extract activity, see [Map Document skills to classes](/vantage/documentation/skill-designer/process/extract-activity).

### Map the fields

<Steps>
  <Step title="Set the credentials">
    On the **Vantage Scope** activity, set the **Password** or **Client Secret** property, depending on your authentication flow. This lets the connector retrieve the skill list. Once the workflow is configured, switch to the **Secure Password** or **Secure Client Secret** property. For more information, see [Vantage Scope activity](/vantage/connectors/uipath/activities/vantage-scope).
  </Step>

  <Step title="Load the available skills">
    Open the **Map Fields** activity in the **Designer** panel. Click the button to the right of the **Skill Name** drop-down list.
  </Step>

  <Step title="Select a Document skill">
    Expand the **Skill Name** drop-down list and select the Document skill whose extracted field values must be saved to UiPath variables.

    <Note>
      You can only choose a Document skill.
    </Note>
  </Step>

  <Step title="Refresh the field tree">
    Click the **Refresh** button. A field tree appears in the **Vantage Extracted Field** column.
  </Step>

  <Step title="Map a field to a UiPath variable">
    Expand the tree and click the **Plus** button next to a field you want to map. In the **UiPath Variable** column, a UiPath variable name and type appear. By default the variable name matches the Vantage field name, but you can change it if required.

    <Warning>
      Ensure that the UiPath variable names specified in the Map Fields activity match the Variables Naming Convention configured in your UiPath process. If variable names do not follow the naming rules, they are displayed with a warning symbol in the UiPath variable list. For more about Variables Naming Convention, see the [UiPath documentation](https://docs.uipath.com/).
    </Warning>

    <Frame>
      <img src="https://mintcdn.com/abbyy/Km9nwnkPeY8_wARd/images/vantage/developer/connectors/uipath/map-fields-activity.jpg?fit=max&auto=format&n=Km9nwnkPeY8_wARd&q=85&s=76f740256ad1baec40fdc56c7faebec7" alt="Map Fields activity showing the Vantage Extracted Field tree and UiPath Variable column" width="1102" height="1346" data-path="images/vantage/developer/connectors/uipath/map-fields-activity.jpg" />
    </Frame>
  </Step>

  <Step title="Map the remaining fields">
    Repeat the previous step for the other fields you need to map. You can specify already-existing UiPath variables. In that case, make sure the variable type matches the one recommended in the [Field type mapping](#field-type-mapping) table.
  </Step>

  <Step title="Apply the mapping">
    After mapping your document fields to UiPath variables, click **Apply** to save the changes. When the **Map Fields** activity is called at runtime, variable values are filled in with the extracted data.
  </Step>
</Steps>

The specified UiPath variables are created in the Sequence closest to the **Map Fields** activity (for example, in a Flowchart).

The **Skill Name** parameter accepts a UiPath `String` variable. Selecting a Document skill from the drop-down writes the new value to the variable. Expressions and references to other variables are not supported.

## Field type mapping

The following table shows what type of UiPath variable corresponds to each ABBYY Vantage field type:

| ABBYY Vantage Field Type                                  | UiPath Variable Type |
| --------------------------------------------------------- | -------------------- |
| Text                                                      | `String`             |
| Date                                                      | `String`             |
| Number                                                    | `String`             |
| Money                                                     | `String`             |
| Barcode                                                   | `String`             |
| Checkmark                                                 | `Boolean`            |
| Checkmark group (can be obtained as separated checkmarks) | `FieldList`          |
| Group                                                     | `FieldList`          |
| Group (for repeatable groups)                             | `FieldList[]`        |
| Table                                                     | `FieldList[]`        |

<Note>
  Repeating leaf fields (such as `Text`) and table columns map to `String[]`. Repeatable groups, including those nested inside other repeatable groups, map to `FieldList[]`. Within a repeatable group, you can also map individual child fields to simple types.
</Note>

<Frame>
  <img src="https://mintcdn.com/abbyy/Km9nwnkPeY8_wARd/images/vantage/developer/connectors/uipath/map-fields-groups.jpg?fit=max&auto=format&n=Km9nwnkPeY8_wARd&q=85&s=103c1a0f62e25c81d3636f855b18813b" alt="Map Fields activity showing the Vantage Extracted Field tree and UiPath Variable column with mapped groups and repeatable fields" width="1308" height="920" data-path="images/vantage/developer/connectors/uipath/map-fields-groups.jpg" />
</Frame>

### GroupItem

`GroupItem` is a structure containing one instance of some repeating object (field or group of fields).

| Method/Property | Parameter                                               | Type                                    | Description                                                                                                |
| --------------- | ------------------------------------------------------- | --------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| Keys            |                                                         | `IEnumerable<string>`                   | Key values. Each value is the name of a specific nesting level.                                            |
| Values          |                                                         | `IEnumerable<IReadOnlyList<FieldList>>` | Set of field values of nesting levels.                                                                     |
| Count           |                                                         | `Integer`                               | Number of nested fields.                                                                                   |
| ContainsKey     | `Key: String`                                           | `Boolean`                               | Specifies if a nested field exists.                                                                        |
| TryGetValue     | `Key: String, Value: IReadOnlyList<FieldList>`          | `Boolean`                               | Specifies if a value exists. If there is a value, returns `True` and the value, otherwise returns `False`. |
| this\[]         | `Name: String`                                          | `IReadOnlyList<FieldList>`              | Returns the value of the specified nested field.                                                           |
| Find            | `Name: String`                                          | `IEnumerable<FieldList>`                | Finds all nested fields of any nesting level with the specified name.                                      |
| Filter          | `Predicate: (Name: String, Node: FieldList) => Boolean` | `IEnumerable<FieldList>`                | Finds all nested fields of any nesting level that satisfy the predicate.                                   |
| Descendents     | `NameItems: Params String[]`                            | `IEnumerable<FieldList>`                | Finds all nested fields of any nesting level whose name matches the `nameItems` parameter.                 |

### FieldList

`FieldList` is a structure that corresponds to a field or group of fields (repeating fields or repeating groups with the same name). It contains the values of those fields or groups, and multiple instances are possible.

| Method/Property | Parameter                                               | Type                     | Description                                                                               |
| --------------- | ------------------------------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------- |
| Values          |                                                         | `IEnumerable<Object>`    | Set of scalar field values.                                                               |
| Count           |                                                         | `Integer`                | Number of nested GroupItems.                                                              |
| Find            | `Name: String`                                          | `IEnumerable<FieldList>` | Finds all nested fields of any nesting level with the specified name.                     |
| Filter          | `Predicate: (Name: String, Node: FieldList) => Boolean` | `IEnumerable<FieldList>` | Finds all nested fields of any nesting level that satisfy the predicate.                  |
| this\[]         | `Num: Integer`                                          | `GroupItem`              | Returns the `GroupItem` with nested fields (if any) at the number of the `num` parameter. |

<Tip>
  The [sample process](/vantage/connectors/uipath/sample-process) provides an example of using a variable with the `FieldList[]` type (the **Description** column of the **LineItems** table is displayed in the log messages).
</Tip>

For more information about the Group field type, see [Group field](/vantage/documentation/skill-designer/document/adding-fields/group).

## Related topics

* [Vantage Scope activity](/vantage/connectors/uipath/activities/vantage-scope)
* [Use Skill activity](/vantage/connectors/uipath/activities/use-skill)
* [Get Results activity](/vantage/connectors/uipath/activities/get-results)
