Skip to contents

Produces create rows in the destination library from the given records. Items carrying imported files are refused: moving files needs the upload protocol, which this plan builder does not perform.

Usage

ztBlockMoveCreate(records, toLibrary, collectionKey)

Arguments

records

A data.table with itemKey, payload (list column of item fields) and hasFile (logical).

toLibrary

Destination library.

collectionKey

Destination collection key.

Value

A guarded-flow plan of create rows, one per record, whose order matches records.

Examples

Records <- data.table::data.table(
  itemKey = "OLD1",
  payload = list(list(itemType = "book", title = "Reviewed book")),
  hasFile = FALSE
)
ztBlockMoveCreate(Records, toLibrary = "5107760", collectionKey = "DEST")
#>    action library itemKey   payload
#>    <char>  <char>  <char>    <list>
#> 1: create 5107760    <NA> <list[3]>