Duaer

Organizations and data

How items stay linked through a run

Each output item remembers which input item it came from. .item in an expression follows that link backward. A one-to-one list, a one-to-many list, or a reorder can be linked automatically.

Why an output item links to an input item

A later node often needs a field from an earlier step, not only from the node immediately before it. You look up a customer, then their orders, and the email still has to come from the customer. The email is not on the order item, so the run follows “which customer this order came from”.

That is what .item does. It is not “index 0 of the array”. It is “the input item this output item came from”.

When Duaer links items automatically

  • Same number of items in and out, one to one. Output 2 remembers input 2.
  • One input becomes many outputs. Those outputs all remember that one input.
  • Same count, different order. Each item still points at the input it came from.
  • When only one item came in, later items can all point at it without an extra mark.

When Duaer cannot link items automatically

If the counts differ, and the relationship is not a clear one-to-many split, automatic linking stops. A Code node that returns brand-new objects without pairedItem produces items that do not know where they came from.

An expression that uses .item then errors, instead of quietly using item 0. Errors when items are not linked explains the messages. Mark item links in the Code node explains how to mark the link yourself.

Questions

Which row does .item refer to in Duaer?

In Duaer, .item is the input item that belongs to the current output item. It is not always index 0 of the array. Each output item remembers which input item it used, and an expression follows that link back to a field on an earlier node.

When does Duaer link items automatically, and when does it not?

Duaer links items automatically when the counts match one to one, when one input becomes many outputs, when the count is unchanged and only the order changes, or when only one item came in. It does not link automatically when the counts differ without a clear one-to-many split, or when a Code node returns new objects without pairedItem.

In this section