跳转到内容
Agentic Workflowdocs
v0.8.2免费安装

节点 / builtin / datatransformation

Edit Fields

Modify, add or remove item fields

数据 扩展程序网页应用

此内容尚不支持你的语言。

Build a new item with exactly the fields you list, each with a name, a type and a value.

工作流 · first-workflow.awf 3 个步骤

My first workflow:包含 3 个步骤的工作流,从 When Started 开始,到 Edit Fields 结束。

Edit Fields outputs an item made of the fields you define in Fields, and nothing else. 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.

Fields from the incoming item are not kept automatically. To keep one, add it with an expression such as {{ $input.title }}. To remove a field, simply leave it out. To rename one, add it under its new name.

The node runs once per incoming item, so ten items in give ten edited items out.

  • 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 or Sort treat it correctly.
  • To rename keys while keeping all other fields, use Rename Keys. To pull out a single field, use Pick Field.
设置项类型作用
Fields (必填)Key-value pairs

How each type treats the value:

  • Number: text that is not a number becomes 0.
  • Array: type a JSON list such as ["a", "b"]. Text that is not a valid list becomes an empty list.
  • Object: type a JSON object such as {"plan": "pro"}. Invalid JSON stops the run with an error.
  • Date-Time: pick a date and time; it is passed on as a date.
  • String: the value is passed on as typed, after expressions are filled in.
  • Output

Each output item holds only the fields you defined, with the types you chose. Read them downstream with {{ $input.fieldName }}.

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

  1. Get Page Metadata reads the current page.
  2. Edit Fields defines title (String, {{ $input.title }}), savedFrom (String, AWFlow) and priority (Number, 2).
  3. Data Store saves the tidy item.
  • A field from the previous node is missing. Edit Fields only outputs what you list. Add the field with an expression such as {{ $input.url }}.
  • “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.
  • An array field is empty. The value was not a valid JSON list. Use double quotes inside it: ["a", "b"].
Fill and submit a web form from saved values 中级 · 8 分钟 无需设置
编辑此页

最近更新:

Was this page useful?
向 Aria 询问“Edit Fields”