# Move, rename and remove fields

{% hint style="success" %}
This is the official documentation of the `@forestadmin/agent` Node.js agent.
{% endhint %}

When building your admin panel, you will probably want to hide as much complexity from your users as you can.

This includes:

* Hiding technical and confidential fields
* Using naming conventions that the final user understands.

## Moving fields

You can import fields from [single record relationships](/developer-guide-agents-nodejs/agent-customization/relationships/single-record.md) into your collections.

The imported fields will behave as if they were on that collection.

```javascript
// Assuming the following structure:
// User    { id, firstName, lastName, addressId }
// Address { id, streetName, streetNumber, city, countryId }
// Country { id, name }

userCollection
  .importField('city', { path: 'address:city', readonly: true })
  .importField('country', { path: 'address:country:name', readonly: true });
```

{% hint style="info" %}
Note that when using `readonly: false`, the referenced record fields can be edited.
{% endhint %}

## Renaming and removing fields and relations

Renaming and removing fields or relations can be done simply by calling the `renameField` and `removeField` methods.

```javascript
collection.renameField('account_v3_uuid_new', 'account').removeField('password');
```

{% hint style="warning" %}
Renamed and removed fields are renamed and removed ONLY in the admin panel.

In your code:

* Removed fields are still accessible (for instance, as dependencies to compute new fields)
* Renamed fields must still be referred to by using their original name.
  {% endhint %}


---

# 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://docs.forestadmin.com/developer-guide-agents-nodejs/agent-customization/fields/import-rename-remove.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.
