Passing record values to Output Preset

Hi,

I have a setup to collate different type of documents based on collationID in datamapper field into one document set. Aside from this collationID in datamapper, there are other few fields that I need to pass to Output Preset to show it on the first page of each document set which can be easily done through combination of passing values from Job Preset to Output Preset using Add additional content options.

In workflow, I have used Retrieve Items plugin and Batching/Commingling option to do the collation of documents. Unfortunately, I cannot use my Job Preset where already documented here in one of highlighted notes where only option is to use Default (Use IDs)???

https://help.uplandsoftware.com/objectiflune/en/pres_workflow/2023.1/Workflow/TasksProperties/OLConnect-RetrieveItems.html?cshid=6085

Is there any way how to do this even doing it using scripts to pass these values to Output Preset?

I assume that you are grouping on Document Set based on the collationID field, is that right? If so, then I assume that you simply have to execute steps similar to the following ones:

1. Job Preset

  1. Check the option Include meta data in the Job Creation wizard
  2. Click on Next to go to the Meta Data Options page
  3. Go to the Document Set Tags tab
  4. Click on the Add meta data button
  5. Select the option Add field meta data to add the necessary fields to the list of Document Set Tags
  6. Click on Finish to save the Job Preset

2. Output Preset

  1. Check the option Add additional content in the Output Creation wizard
  2. Select the saved Job Preset next to Job Preset
  3. Go to the Additional Content page
  4. Click on the Add button and select the option Text
  5. Click on the Add button on the right side of the Text input field once the Aditional Text window is loaded and select the option Document set meta data field to insert the necessary fields in the Text input field

Yes Marten. I have also added condition in Output Preset in Additional text window to display the fields on first page only (page.nr == 1) of the document set

Any hint or at least workaround ?

Hello @rommiei, were you able to achieve what you were looking for by the information shared by this reply? If not, can you let us know please what kind of issues you are encountering?

Hi Marten. Yes I done all the information you shared. But the issue is when applying it to workflow, I cannot use the Job Preset due to this error due RetrieveItems plugins removing the contentset and retains only content IDs
image
[0042] W3001 : Error while executing plugin: W4206 - Metadata does not contain valid Content Set Item Collection

I checked the documentation and confirms it

I need a way to pass values from metadata onto Output preset to display these on the document sets

Well… a solution is to not execute the two Set Job Infos and Variables tasks (Workflow plugins) and the Set Properties and Retrieve Items tasks–or at least not the Retrieve Items task–before the Create Job task in this case. :slight_smile:

Can you let us know please for what purpose these four tasks are being executed before the Create Job task?

Hi Marten,

I stored unique id (%u) onto variable and used it as property in Content Item and then used it for condition in Retrieve Items so it extracted only belongs to this run. This setup comes from different data sources so we have different data mappers executed/merged on the workflow (not shown) and Print Content/Template have quite number of Print contexts which has switch control script controlling what to print. The original problem is I have to collate these documents into set and I will not know which order document goes first in the set, only until they been collated together. So I find RetrieveItems solves the issue using Batching/Commingling. But I still have to print additional info on document set particularly on the first page of the set so I ended up using CreateOutput through Additional content. I just stored contentset id into local variable for the purpose using it script later on.

image
image
image

Hi Rommiei, There is a way, but you will need to use OL Connect REST API. Screenshot below is from a workflow process doing sorting, grouping, and outputting with additional text.


First four steps are there just to show content creation. Run Script @5 uses REST API to create the job. Then the job & jobset IDs are added to an empty metadata so Create Output plugin can be used as usual.

In the Run Script @5 you need to:

  1. Find, sort and group content items
    Find Data Entity

  2. Prepare job set structure based on the found items
    JSON Job Set Structure

  3. Create job set using prepared structure
    Process Job Creation (By Job Set Structure) (JSON)

  4. Get IDs of first job in the job set
    Get Jobs for Job Set

  5. Get IDs of first segment
    Get Job Segments for Job

  6. Get sets for the first segment
    Get Document Sets for Job Segment

  7. Update document and/or set metadata from contentitem properties
    Get Documents for Document Set
    Get Content Item Properties
    Get Document Set Metadata Properties
    Update Document Set Metadata Properties
    Update Document Metadata Properties

Thanks JohnDoe. I’m really looking on scripting direction. It may take time for me to work on this