Replace Bookmarks With Text
  • Updated on 12 Jan 2015
  • 3 minutes to read
  • Print
  • Dark
    Light

Replace Bookmarks With Text

  • Print
  • Dark
    Light

Overview

This tutorial demonstrates how to use Replace Bookmarks With Text step from Data > Documents category in the ToolBox . This step gets bookmarks from the Constant Word Document , replaces them with a desirable Text , and returns an updated Document File.

Example

We begin in theDesigner Folder by clicking Create Flow on the Folder Actions panel.
2018-08-20_155158.jpg

Then, we Name our Flow and click Create to proceed to the Flow Designer .
2018-08-20_155406.jpg

First, in the Flow Designer , we add a form that we have created to take an Invoice . We will use this Form to get user inputs for our Bookmarks . In this example we add this Form from Flows, Rules, Forms and Reports > Forms [Interactions] > [Parent Folder] > Replacing Bookmarks With Text category.

2016-12-20_093845.png

This form was designed for Replacing Bookmarks With Text (Dynamic) tutorial. It has Text Boxes and Date Pickers for user inputs, and a Submit Button control to submit the Form .

2016-12-20_093948.png

Next, we add Replace Bookmarks With Text step from All Steps [Catalog] > Data > Documents category in the Quick Add Step dialog.

2016-12-20_094532.png

We select this step on the workspace and Step Information Layer pops up. In the Configuration section we use Pick Document File selector to pick ourWord Document File.

2016-12-20_094615.png

Document File for this Example looks as following. It is a Template for Invoice with Bookmarks everywhere where text enclosed with square brackets.

originalWordDoc.png

In the Flow Designer , we select Edit Input Mapping option from Replace Bookmarks With Text step’s Options Menu .

2016-12-20_094923.png

In the Mapping Editor we connect the Outcome Data Fields from the Form to the respective Bookmark fields. We click Ok to save and close Mapping Editor.

2016-12-20_095135.png

Back in the Flow Designer we add Download Document Form from Flows, Rules, Forms and Reports > Forms [Interactions] > [Parent Folder] > Replacing Bookmarks With Text category in the Quick Add Step dialog*.*

2016-12-20_095357.png

This Form was designed for Replacing Bookmarks With Text (Dynamic) tutorial. It has two controls. Done Button control from Actions category for closing the Form . And, Download File Download control from File Handling category.

2016-12-20_095451.png

Back in the Flow Designer we connect Done outcome from the Download Document Form to the End Step , and Failed outcome from the Replace Bookmarks With Text step to the End Step in our Flow . Then, we call Mapping Editor for our Download Document Form step.

2016-12-20_095542.png

In the Mapping Editor we connect OutputDocumentFile outcome from the Replace Bookmarks With Text step to the FileHere File Download control on the Form . Then, we save and close Mapping Editor.

2016-12-20_095714.png

This completes our Flow . We click Debug Flow link on the Top Panel in the Flow Designer to test our Flow .

2016-12-20_112550.png

Our Invoice Form opens in the Debugger . We fill in all required fields and click Submit

2016-12-20_112804.png

Then,Download Document Form opens. We click Download

2016-12-20_112835.png

Next, we confirm download process, Name our updated Document file, and save it at the desirable location.

2016-12-20_112908.png

Next, we click Done on the Download Document Form in the Debugger .

2016-12-20_113001.png

The Form closes and Diagram Tab in the Debugger indicates that our Flow ran to the End Step with no errors.

2016-12-20_113040.png

Finally, we locate our downloaded file and open it. We can see that all Bookmarks were replaced with user’s data from the Invoice Form.

Was this article helpful?