3 Page Conditional Simplex/Duplex Document

See edit below

I have a print run that I wish to create a single template for. The data contains records for email or post only. Therefore using the EmailAddress field searching for the “@” symbol. I need some advice as to the best way to achieve the following.

The email page has its own background image and is a simplex document.

The post pages has two background images and is a duplex document.

I hope to be able to set up a condition once I get this to workflow that will branch all the email simplex documents to its own PDF and all the post duplex pages to their own PDF.

Any ideas would be greatly appreciated.

Regards,

Sharne

EDIT:

Managed to find a solution. Created two sections, one for each making post a duplex. Then added a control script as follows.

if (record.fields[“EmailAddress”].indexOf(“@”) >= 0) {
merge.template.contexts.PRINT.sections[‘PostOnly’].enabled = false;
}
else {
merge.template.contexts.PRINT.sections[‘EmailPage’].enabled = false;
}

If anyone has a better way, I’m all for better ideas/methods. Thanks.

Hi Sharne,

I think that you are a little mixed up.

  1. If you mean email, then no PDF is rendered.

  2. If you mean PDF, then it has two background images

  3. If you mean to render Email context into a PDF, this is incorrect.

You must create a data mapping and then a design template with both context email and print (duplex) and send it to the workflow. Then you will be able to make a process that will looks like the image below. And do the automation part.

Best Regards,

Juan

Hi Juan,

I see why you confused my question with the email part. I was not referring to PP Connects email template/context option. What I was referring to was that from a single database I need to make print PDF’s and email PDF’s. We have our own online system for email distribution. So my solution in the edit in my first post is what I needed.

Thanks for responding to me. The automation part that you show in workflow will help me with some other stuff I will need to accomplish.

Regards,

Sharne

Hi Sharne,

The way that you use to trigger your section is the only way to select the proper section otherwise is going to take them all. So i think that your solution is the best one in this case.

For your workflow you can be inspired on the picture below,

Please use the next step to set up your plugins:

  1. Data mapping plug in: output type will be ‘Output records in Metadata’.

  2. Metadata Filter: on Document you will select your field and make a condition to trigger your data that contains ‘@’.

  3. Create Print Context: must be checked ‘Update Records from Metadata’.

  4. Create Job: Default.

  5. Create Output: Select ‘Trough Workflow’

I hope that can help you with your solution.

Best Regards,

Juan

Hi Juan,

In the metadata filter when making the condition. I don’t see any fields to select in the drop down menu. So I tried @field@, just field and ‘field’. Is there no way to get sample data into workflow that shows the mapped fields. (the data I’m using cannot be mapped using the ‘old’ emulation options.)

The output PDF files are giving me a error when trying to open them.

Acrobat could not open sample.pdf because it is either not a supported file type or because the file has been damaged…

Any ideas? I even tried a process with only execute/create print/create job/create output and still the same. Its as if it is making a blank PDF with no pages.

Regards,

Sharne

Hi Sharne,

To make your filter you are going to run your process on ‘Debug’ mode and going trough the workflow step by step, as the image below.

As you can see on the image the ‘View Metadata’ its disable, that’s mean that we don’t have any data to work with, yet.

Now you can continue to step, and then you will see that the ‘View Metadata’ it’s available, so now we have some data to work with.

Click on the ‘View Metadata’ and you will see the ‘Data Selector’ window that will show you all the records (documents) with theirs fields as the image below.

Then step until ‘Metadata Filter’ and open click on it; so now you could make your conditions for your filter.

On the ‘Metadata Filter Properties’ you must select ’Document’ and click on the ‘…’ button as on the image below.

Then you can define your conditions, click on the ‘Insert a Condition’ icon as shown on the image below.

Then you will be able to select your field, click on the ‘Choose information’ part and you will see a dropdown menu that will show up then you can select the field that you want to test, as the image below.

Then you must choose your operator and set the expression as on the images below; if you have another condition you can do the same steps for example in your case you should add two conditions; one to test if the field ‘email’ contains a ‘@’ character and other one to test if it’s not empty.

Note: please don’t forget to create an output from the ‘Designer’ and send the files to the workflow, cause you will use select it on your ‘Create Ouput’ plug in.

Please try it in this way and let me know if it works, i hope that will help you out with your project.

PS: If you are interested, OLLearn is a self paced training option for any customer with current OLCare. The link is http://learn.objectiflune.com/en

Best Regards,

Juan

Perfect! Thank you for your very detailed responses. Much appreciated.

Another issue was error “W3001 : Error while executing plugin: HTTP/1.1 401 Unauthorized” which I found a fix for here.

Many thanks.

Sharne