How do I remove or modify Empty Fields, Empty Lines and Empty Table Rows?
This article describes how to modify your Variable Link settings to remove the links when an Empty Field condition is encountered, along with instructions for removing empty or entire lines when an Empty Field condition is encountered. The article also provides information about the other available options for handling Empty Field conditions, including Error, Ignore, and Substitute, as well as information about how to use the Smart Tags feature to fix empty lines in bottom-aligned text frames.
INTRODUCTION
When AccurioPro encounters an empty field in the data file, the default behavior is to flag the condition as an Error by placing the text Empty Field! into the document. Often it is desirable to simply delete the Variable Link data when an empty field is encountered, or to substitute different text when this occurs.
DELETE EMPTY VARIABLE LINKS
To set up a Variable Link to be deleted from the layout if the data for that Link is empty, please follow these steps:
- Open the Variable Links window (AccurioPro > Setup > Variable Links...)
- In the list of Links on the left side of the Variable Links window, select the Link that you wish to modify. This will display the settings for the selected Link on the right side of the window.
- In the Empty Link area on the right side of the Variable Links window, select Delete using the dropdown menu, as shown below:
This will instruct AccurioPro to delete the Link if the field being processed is empty. - If you also want to remove the entire line when the Link is deleted, select the Remove empty line option. This will instruct AccurioPro to remove each line the Link was on only when there are no remaining printable characters on the line. This is useful for situations like an Address 2 line, where you want the entire line to be removed if the Link for the Address 2 field is empty, thereby allowing the lines below it to fill in the gap.
If you wish to remove the entire line even if there are still printable characters on the line, select the Delete entire line option instead. Please see below for more details on each of the available options.
- Click OK to save these new settings and close the Variable Links window.
If you wish to apply these new settings to ALL of the Variable Links you have defined, click the Apply to All button at the bottom of the Variable Links window. Note that using this feature will force all Links to have identical settings, so please be careful when using this feature.
MORE OPTIONS FOR EMPTY VARIABLE LINKS
In addition to deleting empty links, several other options are available to you via the Empty Link dropdown menu. Each of these options is described below.
Error
This is the default setting, which will cause the text Empty Field! to appear in the merged data. You can change this text to something else by editing the AccurioPro preferences (AccurioPro > Preferences...) and entering different text into the No Data item of the Error Messages section.
Ignore
This setting simply ignores the Link when the incoming data is empty and does not change any of the data. This leaves in place the original document text.
Delete
The Delete setting will delete the link when it is empty. This option is described in the previous section.
Enabling the Remove empty line or Remove entire line option will also remove the line ending character at the end of the line. This does not remove any line ending character that preceded the Link. To remove preceding line ending characters, see the How do I remove a preceding Line Ending when a Link is empty? article.
Substitute
This setting allows you to enter text that will be merged when the link data is empty. This value overrides the default Error text for an empty link, and allows you to change the empty link text independently for each Variable Link.
MORE OPTIONS FOR REMOVING LINES
When a Link has been set to be deleted when empty, you have a number of options available for what to do with the line that the link is on. Each option is described below.
Keep empty line
This option simply removes the link from the line. It does not attempt to remove the line afterward, even if the line does not contain any printable characters.
Remove empty line
This option will remove each line the Link was on only when there are no remaining printable characters on the line. See the before/after screen shot below for an example of how the Remove empty line option would behave if the data for Variable 2 were empty.
Notice that in the first example, the entire line was removed because the line did not contain any printable characters after Variable 2 was deleted. In the second example, however, the line was not removed because it still contained printable characters after the link was deleted.
Delete entire line
This option will delete each line the Link was on even if the line still contains printable characters or other links. See the before/after screen shot below for an example of how the Delete entire line option would behave if the data for Variable 2 were empty.
Notice that in the first example, the entire line was deleted after the Variable 2 link was deleted (this is the same behavior as the Remove empty line option). In the second example, however, the line was also completely removed even though the line did contain printable characters after the link was deleted.
SPECIAL CONSIDERATION FOR VERTICAL ALIGNMENT
The same options for removing lines are available regardless of the vertical alignment assigned to the text frame you are working on. However, for bottom-aligned (or center-aligned) text frames, there is a special consideration for removing the very last line of text in the frame, which often ends with an end of story marker instead of a line end character.
In the example below, the very last line ends with the '#' marker, which represents the end of story marker in InDesign. This special marker is visible only when you have the Show Hidden Characters feature enabled (Type > Show Hidden Characters).
In a case like this, when the last line is removed you will notice that this leaves a space at the bottom (caused by the line ending of the preceding line of text). This occurs only because the text frame is set up to be bottom-aligned, and it is not possible to remove the end of story marker at the end of the line.
To resolve this situation, AccurioPro provides a special Preference option called Smart Tags. When the Smart Tags option is enabled, the software senses automatically a line to be removed ends with the end of story marker (instead of a line ending character), and in such case will also then remove the line ending code from the previous line in the text frame as well, thereby eliminating the empty space at the bottom.
To enable the Smart Tags feature, please follow these steps:
- Open the AccurioPro Prefereces.
- Check the Smart Tags checkbox, located in the Variable Links section.
- Click OK to save the preference.
With the Smart Tags preference enabled, when any line is removed that also ends with the end of story marker, the line ending code for the preceding line (if present) will also be removed. In our example of a bottom-aligned text frame, when the last line is removed, enabling the Smart Tags feature eliminates the empty space at the bottom of the frame, as shown below:
REMOVING TABLE ROWS (INSTEAD OF LINES)
In the above example, you can use the Delete entire line option to remove complete rows in a table that is formatted as individual text lines or tab-separated text. However, if your layout contains an actual Adobe InDesign table, then the remove/delete empty line options listed above will work only within the table Cell where the link has been placed.
If would like to remove empty table rows, you can use the MPS Variable Table feature that is available as a part of the Pro Pack module, which is an add-on module for AccurioPro software. Please see the Pro Pack article for more details about how to use this feature.