Extend Text Merge Using FlowsLast Updated: 07/27/2016 Introduced in Verision: 2.0
This tutorial explains how users can extend Text Merge using specific Text Merge Flows.
For this example we are going to use Flow Constant in the Text Merge Flow.
To create a Flow Constant navigate to System > Designers > System Constants folder in the Portal. Click Add Flow Constant on the Folder Actions panel.
In the resulting popup window we give the appropriate name to our Constant and select its type from Flow Constant Type dropdown list. For this example we are using Rich String Type because we want our constant to contain an Image.
Next, we add some text into Rich String Value editor and press Insert Image icon to add image.
Image picker pops up and we are able to select an image from our local machine or use URL link to an image on the Internet.
After we confirmed our image selection our Image shows up in Rich String Value box. We can click Ok to save and close this Flow Constant definition window.
Next, we need to create a specific Text Merge Flow that can be used to extend our Text Merge.
We navigate to System > Designers > Text Merge Flows folder in the Portal. Here, we use Create Flow option from the Folder Actions panel.
Then, we name the Flow and click Create to proceed to the Flow Designer.
In the Flow Designer Flow Wizard appears on the workspace. In this wizard we locate Merge To HTML step in All Steps [Catalog] > Data > Text category, and click Add to add this step to our Flow.
To configure this step we navigate to its Properties. Press Show Editor button for Merge Text configuration.
In the Merge Text Editor that pops up we add some text. Notice, System Constants category appears now in the left panel of this Editor. If we expand this category we can observe our Flow Constant here. We drag our Image Constant to the workspace of our Text Merge Editor. When finished, we can click Ok to save and close this Editor.
Back in the Flow Designer we connect our steps as follows.
Next, select End Step and using Step Information Wizard click Add New link to add Output Data to our End Step.
In the resulting popup window we provide our data with Name and select String Type. Click Ok when finished…
Back in the Flow Designer we can use same Step Information Wizard to provide mapping to our Output Data. For Mapping Type we choose Select Value.
We use Path Picker to select data we want to map to. In the resulting popup window we select Merged String (the output from our Merge To HTML step). Click Ok when finished…
This completes our Flow. We can save and close it.
Now we can test this Flow in the Text Merge. Navigate to any Designer Folder and select Create Text Merge > Create Text from Folder Actions.
Name Text Merge and click Create to proceed to the Text Merge Designer.
In Text Merge Designer we add some text to the workspace. Notice that on the left panel of the Text Designer under Data category we can see the output from the Flow we have created in this tutorial. We can simply drag it to our workspace in order to use it in our Text Merge. In this way we extend our Text Merge with the Flow Output.
From the top panel of the Text Merge Designer we click Preview link to preview the results.
In the resulting popup window we are able to see our Text Merge text, the text we have input in our Text Merge Flow and Flow Constant with its Image. We can click Save As PDF button to save our Text Merge.
Next, we confirm that we would like to save this Text Merge.
Decisions platform informs us that the file was saved.
We can locate our PDF file and open it. When opened we observe that our Text Merge file displays as it was configured.