> For the complete documentation index, see [llms.txt](https://motivlabs.gitbook.io/impulse-user-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://motivlabs.gitbook.io/impulse-user-manual/cookbook-recipes/adding-fields.md).

# Adding Fields

### Case 1

Assume the destination content type has an additional field that should match the value of another field. i.e., Mobile headline value should match headline value. But the destination has both headline and mobile headline fields, while the source only has healdine.

![](https://651785290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnLYwCtfZtrK4s43AVzb4%2Fuploads%2Fgit-blob-d40164d4d44565ecaedfaa70f32bb968fa2718cb%2Fadd-field-source-ct.png?alt=media)

![](https://651785290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnLYwCtfZtrK4s43AVzb4%2Fuploads%2Fgit-blob-a5902da88b5559f27e40d5f3aa4e8ab2c594be21%2Fadd-field-dest-ct.png?alt=media)

We need to be able to:

1. Add a new field
2. Copy a field value into the new field

### Solution

ImpulseSync can solve this with one job and the [add-replace-field manipulator](/impulse-user-manual/content-manipulators-motators/add-replace-field.md).

First we create a job to sync the content. In this job we will want to configure an add-replace-field manipulator.

![](https://651785290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnLYwCtfZtrK4s43AVzb4%2Fuploads%2Fgit-blob-4fb433e2604f802d1fb90f5d695a0f86025dc936%2Fadd-field-add-replace-manip-copy-field.png?alt=media)

This config will add a new field or replace the field if it already exists. Given our case, this will add a new field. The new field will have the value that the field `title` has.

When this job runs we can see that the destination has both fields populated with the same values.

![](https://651785290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnLYwCtfZtrK4s43AVzb4%2Fuploads%2Fgit-blob-3539b0e30c19bb2e74c75a42653c063ee41a6bcb%2Fadd-field-dest-value.png?alt=media)

### Case 2

Assume there is a required adjustment to a field being synced over. i.e, a slug value must be prefixed with `/`.

We need to be able to:

1. Add `/` as a prefix to the slug field being synced.

### Solution

ImpulseSync can solve this with one job and the [add-replace-field manipulator](/impulse-user-manual/content-manipulators-motators/add-replace-field.md) or the [liquid-field manipulator](/impulse-user-manual/content-manipulators-motators/liquid-field.md).

First we create a job to sync the content. Then we will decided which manipulator to use.

**add-replace**

![](https://651785290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnLYwCtfZtrK4s43AVzb4%2Fuploads%2Fgit-blob-4d94d46ad54b6acd57205a6778582518f5f15198%2Fadd-field-add-replace-prefix.png?alt=media)

This config for the add-replace-field manipulator uses a combination of static values and dynamic values. The static value is the `/` added before the `{{slug}}`. The dynamic value is the `{{slug}}` where the current value for the `slug` field is set here.

**liquid**

![](https://651785290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnLYwCtfZtrK4s43AVzb4%2Fuploads%2Fgit-blob-fead8f4dcd846a6e4ed2974dbefd936e227905bc%2Fadd-field-liquid-prefix.png?alt=media)

This config for liquid-field manipulator uses a liquid template to take the content field `content.fields.value.slug` and uses the [prepend filter](/impulse-user-manual/content-manipulators-motators/liquid-field/filters/prepend.md) to add `/` to the value.

Once this job runs we can see that the destination field now has the `/` character prepended to it's value.

![](https://651785290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnLYwCtfZtrK4s43AVzb4%2Fuploads%2Fgit-blob-ee890ff223445e7c709c4110215547fee77df9a9%2Fadd-field-dest-prepend-success.png?alt=media)

This solution can be used for any static values mixed with another fields value. Such as setting the title value in the middle of a static value.

**add-replace** ![](https://651785290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnLYwCtfZtrK4s43AVzb4%2Fuploads%2Fgit-blob-cb5d554fca90b78a8a808a23db8c11ac720a63fe%2Fadd-field-add-replace-combination-config.png?alt=media)

**liquid** ![](https://651785290-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnLYwCtfZtrK4s43AVzb4%2Fuploads%2Fgit-blob-a12c031489bbc7b27fe016a33e99242e7aaa21f2%2Fadd-field-liquid-combination-config?alt=media)
