Using variable in the outPut file with retrieve content item

Hi Everyone,

I have some questions regarding using variable in the outPut file with retrieve content item.

As I know, when I’m using variable in the output file, I have to add it first once I created the Job creation file

That was fine if I use it directly in the workflow

However, what if i need to retrieve content item first?


Since retrieved content items’ meta is different from the original meta data which does not contain variable field, so that it will keep showing error

[0008] W3001 : Error while executing plugin: W4206 - Metadata does not contain valid Content Set Item Collection

Any idea?

Many thanks
Cain

Anyone can help plz…

The first thing I do when debugging this sort of issue is check the metadata after the retrieve step. What’s it returning to you? Does it actually get a set based on the retrieval conditions?

Thanks for reply,

It does get sets but retrieved item metadata only contains recordID and contentID, which does not have ‘sInsert’ variable thats why bring the error msg.

So is there any easy way to add varaible in the retrieved metadata?

Cheers

Anyone can help plz…

Anyone can help plz…

To help you properly we would need to see the Template and reproduce the issue. I suggest you open a technical support ticket through our website.
This way a technician will be able to help craft a solution based on your need, environment and any others infos required.

Hi Hamelj,

Thanks for you reply.
My template was just empty. Its just a general question.
You can see in the main branch the meta data has variable sInsert1

However once I use retrieve content Item, it shows metadata has been changed to contentItem Id and record id, in this case the create job function will not work since there is no variable sInsert1 in the current meta data

I was thinking it should have a easy way to solve this simple issue but if i cannot get answer then i will try to create a support ticket then

Thx

My previous post stands. Sorry.

no worries, just helps me keep this post up then XD

Admittedly I didn’t read the entire thread, but perhaps adding custom properties on content items at merge time is of some help. See:
https://help.objectiflune.com/en/planetpress-connect-user-guide/2021.1/#designer/API/contentitem_Object.htm

Hi Erik,

Thanks for your help.
It doesn’t work but I think i found the answer from your link


I guess when i use retrieve item i cannot use any variable in the Job Preset and Output preset is that correct?

Cheers
Cain

Hi CainZ,

You may want to have a look at runtime parameters. This would allow you pass info from Workflow to the Job Creation process (but it depends on what you need).
https://help.objectiflune.com/en/planetpress-connect-user-guide/2021.1/#designer/Output/Runtime_Parameters.htm?TocPath=Output%257C_____5

Erik

I have similar situation. I need to pass the metadata from data mapper to output preset

Same issue when I have to do batching/commingling using Retrieve Items plugins, most the metadata fields will be lost and it will retain only the sortkeys, record ids, and content record ids. The content sets id is also lost why the Job Present will trigger exception Metadata does not contain valid Content Set Item Collection . I can return back the individual values of runInsert of the metadata by using scripts but I need the Job Preset to ignore the contentset id and just pass the values in metadata to Output Preset?