How to automate placeholder assignments using the Convert Text Pattern to Variable Links utility
This article describes how to automate the assignment of Variable Links to text ranges in a document that have been identified using a specific pattern. The approach documented here can be useful for working with documents previously tagged using a different variable data product.
OVERVIEW
If your document contains text that matches a specific pattern, then it may be possible to search for that text and automatically assign Variable Link placeholders to the text range. To do this, you will use a built-in utility function of AccurioPro VDP software called Convert Text Pattern to Variable Links.
WHAT IS A TEXT PATTERN?
A text pattern is simply a series of characters that bracket a range of text in the document, and serve to identify where a variable item should be placed. For example:
In the above example the << and >> characters serve as brackets that are used to identify the range of text that will be variable. The text in between the brackets (NAME, ADDRESS, etc) is expected to be the name of the AccurioPro VDP Variable Link that you wish to assign to that range of text.
HOW TO USE THE FEATURE
To use the Convert Text Pattern to Variable Links feature, you start by running the standard AccurioPro VDP setup to create a set of Variable Links. You must create a set of Variable Links that match the names identified in the bracketed text of your document.
Using the previous example, after running through the AccurioPro VDP setup you should have the following Variable Links defined:
These will be the Variable Links assigned to the bracketed ranges of text in the document. Follow the steps below to complete the process.
- Choose AccurioPro > Utilities > Link > Convert Text Pattern to Variable Links... This will open the following dialog:
- Using the dropdown menu, select the Text Pattern that is used in your document. If a matching pattern is not available, simply enter the bracketing characters manually on either side of the dropdown menu.
- Click the Continue button
The process will scan the entire document and search for the specified text pattern. When located, it will use the bracketed text to assign a Variable Link of the same name. This process is very fast and should take seconds to complete. When finished, you will be presented with a summary dialog indicating how many text patterns were converted.
POTENTIAL ISSUES
As mentioned above, the text that is contained within the bracket characters will be used as the name of the Variable Link to assign to the overall range of text. These Variable Links are expected to be defined for the current document setup.
The software does not check for the definition of the Variable Links as it is assigning the links in the document. As a consequence, it is possible for the process to assign a Variable Link name to a range of text where that Variable Link definition has not been created. This is what we refer to as a Bad Tag condition.
To detect Bad Tag conditions, simply run a Variable Link Report.
The report will show you all of the links assigned in your document and indicate where any Bad Tags may exist.
To repair a Bad Tag condition, you must create a Variable Link definition of the same name, or reassign the existing placeholder in the document to use the correct Variable Link name. More details about how to identify and repair Bad Tag conditions can be found in the following article:
How to fix Empty Field!, Bad Tag!, No Match!, EOF!, SP, and other merge errors