How to get the same source file name as my output file name

I’m using Pres Connect designer and will be setting up a basic template in workflow. I will be using Job and Output presets to control the output of the files. my current process is Input Specific CSV filename.csv —> Datamapper —> Designer —> Job Preset —> Output Preset —> CSV filename.pdf —> Delete original file.

Is there a way using the output preset to call the output PDF the same name as the input data file?

I’d prefer not to go through workflow to do this, but if I have to then I will.

Thank you for any input on this issue.

You could pas the original filename “%O” to a job info variable.

Then in your output preset, use the output variable @automation.jobinfoX@.

At the current moment, that syntax is not shown in the documentation but will be very soon.

Yep, this is pretty easily done. In the datamapper, you have access to an automation property that contains the original file name as it was passed in via the workflow. PlanetPress Connect 1.8 User Guide

To begin, you’ll just have to assign that to a data extraction as I’ve done below.

Once assigned to a variable, you’ll be able to pass it through to the metadata via a job preset and finally call it in the output preset as part of the output name.

You can see a little how this process goes here: Adding record data to a custom barcode in print output - OL® Learn

Now, in that example, they’re passing a field value into the metadata for the purpose of using it in a barcode generated on output, but the principle is the same. Pass it to metadata in the job preset and then you’ll be able to access it in the output name mask through corresponding metadata field.

Some extra info on what variables are available on output can be found here as well: PlanetPress Connect 1.8 User Guide

HI I’m trying to work this out now. Did this ever get added to the documentation?

I’m trying AlbertsN solution below but am getting errors

Error while executing plugin: HTTP/1.1 500 Internal Server Error -
An unspecified error occurred which was caused by LoggedApplicationException:
There was an error running the output creation process caused by ApplicationException:
error evaluating expression ‘document.metadata.OrgFileName’ at line 1, column 3 in pattern
‘${document.metadata.OrgFileName}’

Quite possible I’m doing something very wrong here as I’ve only just started working in Connect .

Any help would be greatly appreciated in passing & using the original Data file name as a basis of pdf output.

cheers

Michael

Hi @MichaelEngstrom,

I assume that you haven’t executed the following steps, can you please confirm if this is correct?

  1. Create a new- or open a existing Job Creation Preset file via: Connect Designer application > Print Presets > Job Creation Settings…
  2. Check the option “Include metadata” in the Configuration Selection window (of the Job Creation wizard) and click on the “Next >” button to go to the next window (or windows).
  3. In the Meta Data Options window go to the Document Tags tab.
  4. Add the field “OrgFileName” to the Document Tags tab by executing the following steps:
    1. Click on the “Add meta data” button in the top-right corner of the Document Tags tab.
    2. Select the option “Add field meta data”.
    3. Select the field “OrgFileName” in the Field List of the Field Selection window and click on the “OK” button.
  5. Click on the “Finish” button once you would like to complete and save your Job Creation Preset file.

Hi @Marten,

Thanks for this info.

I have checked everything a few times now and am still getting the error.

I tried one of my data fields instead of the OrgFileName and am still getting that same error .

error evaluating expression ‘document.metadata.CUSTOMERACCOUNT’ at line 1, column 3 in pattern '${document.metadata.CUSTOMERACCOUNT}

cheers

Hi @MichaelEngstrom,

I am sorry to hear that. Could you please share the Job Creation Preset and Output Creation Preset files by which the issue does occur?

Hi @Marten,

I’ve kind of found the issue. It seems like the separation I’m trying to achieve isn’t possible or I’m trying to go about it the wrong way.

What I am trying to get working is use the original data file name as a base of the output pdf filename but split it into 5000 document/record pdfs. Is this sort of split & naming using the metadata possible?

But I seem to be having the issue accessing the metadata when I change the separations settings to Separate by Count.