---
title: Edit Fields
description: Modify, add or remove item fields
---

Add, set or reshape fields: each with a name, a type and a value. Keep the other fields of the item, or only the ones you list.

## Try it

## What it does

Edit Fields sets the fields you define in **Fields**. Each field has a name, a type (*String*, *Number*, *Boolean*, *Date-Time*, *Array* or *Object*) and a value. Values can be fixed text or expressions that read the incoming data. The step runs once per incoming item, so ten items in give ten edited items out.

### Version 2 (new steps in AWFlow 0.9)

* **Keep other input fields**: **None** (only your fields), **All** (every input field, plus yours), **Only these…** or **All except…** (pick in **Fields to keep**).
* **Dots make nested fields**: a name like `customer.email` builds `{ "customer": { "email": … } }`, and `items[0].name` builds a list.
* **Mode › JSON**: write the whole item as JSON with `{{ }}` holes. Values are inserted correctly (escaped inside a string, real numbers and lists outside), so the JSON stays valid.
* **If a value doesn't fit its type**: **Stop the step** (naming the field and the item), **Keep the text** (with a warning in the run log), or **As older steps** (text in a number field becomes 0).
* A new Edit Fields step opens with **one blank row**, its name ready to type. It is saved only once you give it a name or a value.
* **Add all fields from previous step** adds one row per incoming field; tapping a value in the Input pane adds a row for it.

### Steps saved before AWFlow 0.9

They output only the fields you list: incoming fields are **not** kept. To keep one, add it with an expression such as `{{ $input.title }}`. **Update** in the step's header moves to version 2 while keeping literal names (a dot stays a dot) and the old conversions.

## When to use it

* Shape the data for the next step: keep only `title` and `url`, and add a fixed `source` field.
* Combine values, for example a `fullName` field set to `{{ $input.first }} {{ $input.last }}`.
* Turn text into a real number, list or object so later nodes such as [Math](/nodes/builtin/datatransformation/math/) or [Sort](/nodes/builtin/datatransformation/sort/) treat it correctly.
* To rename keys while keeping all other fields, use [Rename Keys](/nodes/builtin/datatransformation/renamekeys/). To pull out a single field, use [Pick Field](/nodes/builtin/datatransformation/pickfield/).

## Inputs and settings

How each type treats the value (with **As older steps**, and in steps saved before 0.9):

| Type | Accepts | Otherwise |
| --- | --- | --- |
| **Number** | a number, or text that is one (`"42"`) | `0`, with a warning in the run log |
| **Boolean** | `true`/`false`, and `yes`/`no`, `on`/`off`, `1`/`0` in any case; empty text is *false* | other text is *true*, with a warning |
| **Array** | a JSON list such as `["a", "b"]`, or text with commas (`a, b`), which is what a mapped list turns into | an empty list |
| **Object** | a JSON object such as `{"plan": "pro"}` (line breaks and accents are kept) | the step stops with an error |
| **Date-Time** | a date and time | — |
| **String** | anything, after expressions are filled in | — |

A field holding only `{{ … }}` keeps the mapped value: a mapped number stays a number in a *Number* field, a mapped `false` stays false.

## Outputs

Each output item holds the fields you defined (plus the input fields you chose to keep), with the types you chose. Read them downstream with `{{ $input.fieldName }}`.

## Dependencies and credentials

None. This node needs no connection and has no slots for other nodes.

## Example workflow

1. [Get Page Metadata](/nodes/extension/getpagemetadata/) reads the current page.
2. Edit Fields defines `title` (*String*, `{{ $input.title }}`), `savedFrom` (*String*, `AWFlow`) and `priority` (*Number*, `2`).
3. [Data Store](/nodes/builtin/core/datastore/) saves the tidy item.

## Common issues

* **A field from the previous step is missing.** Set **Keep other input fields** to **All** (version 2), or add the field with an expression such as `{{ $input.url }}`.
* **"Name already used"**. Two rows have the same name; only the first is kept until you rename one.
* **"Failed to parse object …"** A field of type *Object* does not contain valid JSON. Check quotes and braces, or change the type to *String*.
* **A number field shows `0`.** The value was not a number, often because an expression returned text with a currency sign or a comma. Clean it first, for example with [Regex](/nodes/builtin/datatransformation/regex/).
* **An array field is empty.** The value was not a valid JSON list. Use double quotes inside it: `["a", "b"]`.

## Recipes with this node

## Related nodes

* [Rename Keys](/nodes/builtin/datatransformation/renamekeys/): rename fields and keep the rest.
* [Pick Field](/nodes/builtin/datatransformation/pickfield/): take out one field.
* [Text / Formatter](/nodes/builtin/datatransformation/text-formatter/): change the text inside a field.
* [Code](/nodes/builtin/core/code/): for reshaping that needs logic.