2023.1:Merge (Activity): Difference between revisions

From Grooper Wiki
// via Wikitext Extension for VSCode
// via Wikitext Extension for VSCode
Line 92: Line 92:


# Click the ellipsis icon to the right of the '''''Attachment Name''''' property.  
# Click the ellipsis icon to the right of the '''''Attachment Name''''' property.  
# When the "Attachment Name" window pops up, insert an expression for how you want to name the attachments. In our example we have used a String Interpolation expression to name the document with a random GUID. <pre>$"{Guid.NewGuid}.pdf</pre>
# When the "Attachment Name" window pops up, insert an expression for how you want to name the attachments. In our example we have used a String Interpolation expression to name the document with a random GUID: <pre>$"{Guid.NewGuid}.pdf</pre>
# Click "OK".
# Click "OK".


[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 08.png]]
[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 08.png]]
#<li value=4> Click the save icon at the top right of the middle property grid to save your changes.


[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 09.png]]
[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 09.png]]
#<li value=5> Click over to the "Activity Tester" tab.
# Select the '''Batch Folder''' containing the document to be merged in the Batch Viewer.
# Click the Test icon at the top right of the Batch Viewer.


[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 10.png]]
[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 10.png]]
#<li value=8> The file has now been merged, named, and replaced the existing file in the '''Batch'''. You can see the new name of the file on the '''Batch Folder''' underneath the Classification label.


[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 11.png]]
[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 11.png]]
# Under our '''Content Model''', we have a '''Data Model''' with two '''Data Fields''': Company Name and Contact Name. Let's say we want to use these two '''Data Fields''' to name the file.
# Click on the hamburger icon to the right of the '''''Content Type''''' property to access the drop down.
# Navigate to and select the '''Content Type''' that contains the information you want to include in your naming expression. In this case, we're selecting the '''Content Model''' containing the '''Data Fields''' we want to use to name the file.


[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 12.png]]
[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 12.png]]
#<li value=4> Click the ellipsis to the right of the '''''Attachment Name''''' property.
# Start your String Interpolation expression with <code>$"</code> then add a <code>{</code> to bring up the intellisense and choose the first part of the code to call.
# The intellisense will show you what you can use in your expression within the scope of your specified '''Content Type'''. We can see that we have access to both of the '''Data Fields''' we want to use for the naming convention.


[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 13.png]]
[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 13.png]]
#<li value=7> Finish your expression. In our example, we used: <pre>$"{Company_Name}.{Contact_Name}.pdf"</pre>
# Click "OK" in the top right of the "Attachment Name" pop-up window.


[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 14.png]]
[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 14.png]]
#<li value=9> Click the save icon at the top right of the middle property grid.


[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 15.png]]
[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 15.png]]
#<li value=10> Click over to the "Activity Tester" tab.
# Select the '''Batch Folder''' containing the document you want to merge in the Batch Viewer.
# Click the Test icon in the top right of the Batch Viewer.


[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 16.png]]
[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 16.png]]
#<li value=13> The file has been merged, named, and replaced the original file. You can see the new name under the Classification label on the '''Document Folder''' in the Batch Viewer.


[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 17.png]]
[[File:2023.1 Merge-(Activity) 02 How-To 02 Configure 17.png]]

Revision as of 08:35, 26 July 2024

WIP

This article is a work-in-progress or created as a placeholder for testing purposes. This article is subject to change and/or expansion. It may be incomplete, inaccurate, or stop abruptly.

This tag will be removed upon draft completion.


This article is about an older version of Grooper.

Information may be out of date and UI elements may have changed.

20252023.1

file_save Merge is an Activity that creates a PDF, TIF, XML or ZIP file from the page and data content of a Batch Folder and saves it to that Batch Folder.

Glossary

About

So, you've gone through the first 4 phases of Grooper: Aquire, Condition, Organize, and Collect.

You have extracted data from your documents and you want to now build a document. The Export activity can build the document and export it outside of grooper all in one step. However, you might have a desire to build the document before executing the Export step in your Batch Process. You can do this with the Merge activity.

The Merge activity builds a document from the Pages in a Batch and saves that document to the Batch Folder. You can choose to build your document in a specific format such as a PDF or TIFF file. You can also automatically rename the documents as their built.

How To

Creating the Batch Process Step

The first thing we need to do is add a Merge Batch Process Step to our Batch Process and set the Scope at which the step will run.

  1. Right-click on the Batch Process.
  2. Hover over "Add Activity", then hover over "Transform". Finally, Click on "Merge..."
  3. When the "Add Activity" window pops up, feel free to change the name of the step in the Step Name property. For this tutorial we will be using the default of "Merge".
  4. Click "EXECUTE" located in the top right hand corner of the pop up window.


  1. Now you should have a Merge step in your Batch Process.
  2. Your scope should be set to the Folder Level containing the pages that will be combined into a document. In our case that is Folder Level 1, so we have set the Scope property to Folder and the Folder Level property to 1.


Configuring the Merge Activity

  1. Click the hamburger icon to the right of the Merge Format property and select the desired file type from the drop down list. For this tutorial, we will select PDF.


  1. You can set a name for the resulting merged document using either the Custom Filename or Attachment Name property. Ignore the Save As property as it is currently broken in 2023 and 2023.1.

The Custom Filename Property

  1. Enter in a name you want to name the PDFs in the Custom Filename property located in the rightmost property grid. Include the file extension in the file name.
  2. Click the save icon at the top right of the middle property grid.


  1. Click over to the "Activity Tester" tab.
  2. Select the Batch Folder containing the document you want to Merge.
  3. Click the Test icon at the top right of the Batch Viewer.


  1. Navigate through your Test Batches in the node tree to the Batch Folder you tested the Merge activity on.
  2. Click on the "Advanced" tab.
  3. Under "FILES" on the right-hand panel, you should see the new merged PDF file.


Why You Need to Include the File Extension

  1. If you do not include the file extension in your Custom Filename...


  1. ... you will still get an attached file, but it will not be a PDF or other useable file type.


The Attachment Name Property

  1. Click the ellipsis icon to the right of the Attachment Name property.
  2. When the "Attachment Name" window pops up, insert an expression for how you want to name the attachments. In our example we have used a String Interpolation expression to name the document with a random GUID:
    $"{Guid.NewGuid}.pdf
  3. Click "OK".


  1. Click the save icon at the top right of the middle property grid to save your changes.


  1. Click over to the "Activity Tester" tab.
  2. Select the Batch Folder containing the document to be merged in the Batch Viewer.
  3. Click the Test icon at the top right of the Batch Viewer.


  1. The file has now been merged, named, and replaced the existing file in the Batch. You can see the new name of the file on the Batch Folder underneath the Classification label.


  1. Under our Content Model, we have a Data Model with two Data Fields: Company Name and Contact Name. Let's say we want to use these two Data Fields to name the file.
  2. Click on the hamburger icon to the right of the Content Type property to access the drop down.
  3. Navigate to and select the Content Type that contains the information you want to include in your naming expression. In this case, we're selecting the Content Model containing the Data Fields we want to use to name the file.


  1. Click the ellipsis to the right of the Attachment Name property.
  2. Start your String Interpolation expression with $" then add a { to bring up the intellisense and choose the first part of the code to call.
  3. The intellisense will show you what you can use in your expression within the scope of your specified Content Type. We can see that we have access to both of the Data Fields we want to use for the naming convention.


  1. Finish your expression. In our example, we used:
    $"{Company_Name}.{Contact_Name}.pdf"
  2. Click "OK" in the top right of the "Attachment Name" pop-up window.


  1. Click the save icon at the top right of the middle property grid.


  1. Click over to the "Activity Tester" tab.
  2. Select the Batch Folder containing the document you want to merge in the Batch Viewer.
  3. Click the Test icon in the top right of the Batch Viewer.


  1. The file has been merged, named, and replaced the original file. You can see the new name under the Classification label on the Document Folder in the Batch Viewer.