Item Property Copy
Configuration reference for the Item Property Copy Pipes valve and its supported options.
Valve for copying item properties. The operation is performed on one item at a time and does not support copying between items.
Use item_include_expr to control which items are processed (see Item).
Configuration
Section titled “Configuration”| Name | Description | Default | Mandatory | Expanded |
|---|---|---|---|---|
src | Property to copy from. | |||
dest | Property to copy to. | |||
replace | Replace destination. If true existing value of dest will be replaced with new values (overwritten), otherwise new values will be added. | false | ||
filter | Include value predicate. Expression controlling if a value should be copied or not. If not specified, all values are copied. For more information see below. |
{ "name":"ItemPropertyCopy", "config":{ "item_include_expr": "item.id.startsWith('tmp_')", "src": "from", "dest": "to", "replace": false, "filter": "value !== ''" }}Include value predicate
Section titled “Include value predicate”Predicate expression that determines whether a value should be copied. The expression is written in JavaScript and must return true (to copy the value) or false (to skip it).
Scopes
Section titled “Scopes”The following scopes are available:
| Name | Description | Example |
|---|---|---|
| value | The current value | "value.startsWith('__')" |
| item | The current item | "item.id === 'tmp'" |
| session | The current session | "session.addProp === true" |
| state | The current pipe state | "state.itemComplete === false" |
| request | The current pipe (NOT HTTP) request. Contains all parameters sent to the pipe. | "request.username != null" |
| items | The current set of items | "items.size > 1" |
| exports | The current exported (from authenticators or other valves) properties | "!exports.done" |