Punctuation and Spacing Control for Empty Link Conditions

Sometimes, you need to have a space in between two Variable Text Links, but only when *both* of the links contain data.

For example, your Data may contain a Salutation (Mr., Ms., Mrs., etc.), and also a Name, but the Salutation may not be available for every record. In this example, you want a space between the Salutation link and the Name link, but if the Salutation is missing from the data, then you do not want the extra space (the one between the Salutation and the Name) to appear.

This scenario can be handled quite easily by using the Prefix/Suffix feature of the Variable Link setup, or by using a Rule. The two examples are presented below:

1) Using Prefix/Suffix Feature

1a) Edit the settings for the Salutation Variable Link.

1b) Add a single space in the Suffix area for the Salutation link. This will add a space after each and every Salutation that is placed in the document.

1c) Set up the Salutation link to Delete if Empty.

1d) Save the changes you have made to the Salutation Link.

1e) In your document layout, position the Salutation and Name links so they are right next to one another with no space in between.

That's it! Now when you merge, if there is a Salutation in the data, it will be inserted with a space right after it to provide separation from the Name link. If there is no Salutation, then the Salutation link will be deleted, leaving the Name link visible with no space appearing ahead of it.

2) Using a Rule

2a) First, as in the previous example, you need to modify the Salutation Variable Link and set it up to Delete if Empty.

2b) Create a Link Rule with the following criteria:

if <<Salutation>> is not empty, then
    Add Suffix: " "

2c) Save the changes you have made to the Rule.

2d) In your document layout, position the Salutation and Name links so they are right next to one another with no space in between.

2e) Now, apply the Rule to your Salutation link.

This now has the same effect as in Example 1. When you merge, if there is a Salutation in the data, it will be inserted with a space right after it to provide separation from the Name link. If there is no Salutation, then the Salutation link will be deleted, leaving the Name link visible with no space appearing ahead of it.

For more information and an example of setting up Variable Links in a DDF and assigning Links to text in a document, see Tutorial #1a (The Basics) in the DesignMerge Tutorial Manual.

For more information and an example of setting up a Link Rule and assigning the Link Rule to a Text Link in the document, see Tutorial #1b (Rules) in the DesignMerge Tutorial Manual.

DesignMerge documentation is available at www.meadowsps.com/documentation