# Add fields to existing Mapping

## Description

* If you want to add fields to an existing mapping, then you can use this sample script.

## Input

* Instance details:
  * Instance details like <code class="expression">space.vars.SITENAME</code> instance URL, username and password are to be given in **instanceDetails.properties** file available within script.
* Mapping details (to be given at the time of script execution):
  * Mapping id to be updated.
  * Internal name of the field of system 1.
  * Internal name of the field of system 2.

### Output

* Updated mapping

### Script

You can download the script from [here](https://opshub.com/ohftp/AdminAPI/addFieldsToMapping.zip).

Below is an example of execution of script which shows the input and output:

<div align="center"><img src="/files/aYUKVhXBkVs7WtjaUEUa" alt=""></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://opstech.gitbook.io/opstech-docs/7.223/manage/api/sample-use-cases/add-fields-to-mapping.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
