Updating / adding data fields after retrieving content sets

I am working on a process where I have several different outputs from the same content:

  1. sample PDFs (virtual stationery overlayed)
  2. PDF documents for DMS
  3. printable files (PostScript, tray selection, duplex / simplex) that require adding information for the postal operator in the address window (e.g. date of posting, number of registered mail - both fields are in DataMapper as empty JavaScript fields).

I have prepared several different sets of Job presets and Output presets for the outputs mentioned above.

First I generate content using “Create Print Content”.

Based on the above, in the same workflow I generate sample PDFs (filter in Job presets) and files for DMS using “Create job” and “Create output”.

After print house employees complete the required fields (date of posting, registered mail number) in our legacy system, in the second workflow process I retrieve Content sets using “Retrieve items”. Using script, I update metadata: e.g. myDoc.Fields.Add (“_ vger_fld_ShipmentNumber”, “12345”);

While debugging I can see in the metadata preview that the “ShipmentNumber” field has changed for each document. In the next step I create the content (“Create Job”) which uses ShipmentNumber field to create document metadata, then in “Create output” this field is used to add additional content. Unfortunately, in the output ShipmentNumber has the same value as was given in the DataMapper.

What am I doing wrong? Is it possible to change the data field for already generated Content sets?

Workflow’s metadata is not automatically passed back to Connect. You have to instruct Workflow to update the database records from the metadata.
So immediately following your script that updates the metadata, insert an Update Data Record task. That will update all database records with the values stored in the metadata.

Works like a charm. Thanks!