Using Database Fields

Professional Version Only


Table of Contents   Previous Page  Next Page    

Inserting database fields into a document means that the appropriate data for the record being printed will be substituted for the field name. In other words, if a document uses Membership Fields, you could select the First Name field from the field list. This would create something like:

When the document is printed, the system will substitute "John" for "<<First Name>>" when it prints a letter for the "John Smith" record.

Database fields can be used anywhere in the document (including within tables) with the exception of Text Frames.  Embedded fields will not work inside a Text Frame because the frame isn't treated as a part of the document for finding/replacing text.

Using database fields involves:

Adding fields to the document from the Field List
Choose the records to be printed by entering criteria settings

Adding Fields to a Document

1Choose File > Workspace > Documents
2Click the Show Fields button. The field list will contain the fields appropriate to the type of document.

 Note: The default document that is automatically created when the Documents window opens uses Membership Data. To use Group data instead, create a new document and pick Group Data for the available fields.

3Place the cursor where the field should go, and then click the field name in the list. The field name will appear in the document.

Choose the Records to Print (criteria)

1Click the Settings button to open the criteria for the document.
2Document criteria works just like report criteria, or search criteria on the membership/group list. For more information and examples see Entering Advanced Search Criteria.
 
Use the settings window to enter the required criteria, then click Save to return to the document.
3To see the records that will be found by the criteria, click the Show Data button.

 Note: The columns displayed are only to help verify that the correct records were selected. They do not necessarily correspond to the fields that have been used on the document.
 
There are two Processing Style options on the Show Data window that control how the document will print:

Generate and print each document immediately - this is the default option, simply meaning that the system will generate a document, fill in any embedded fields, and preview/print it immediately.
Generate all documents and print as one - this options causes the system to append every document for every record into one large "master" document, and then send that one large document to the printer.  This only makes sense on small jobs, when printing to a PDF file.
4To return to the document, click Hide Data.

Preventing Blank Lines

There are situations where telling the system to "delete the line" when the only thing on it is blank, is helpful. We cannot force the software to do this automatically though, because there are times when it wouldn't be appropriate. So this section explains how to "tell the system" what you want to do.  For example, consider an address block like this:

<<Name (First/Last Name)>>
<<Address Line 1>>
<<Address Line 2>>
<<City/State/ZIP Code>>

If a record is missing data for Address Line 2, the output will show a blank line, like this:

John Smith
100 Main Street
 
Dallas, TX 75025

In order to prevent this, create the address block and add a leading "@" symbol ahead of any field that should get special treatment when blank, like this:

<<Name (First/Last Name)>>
@<<Address Line 1>>
@<<Address Line 2>>
@<<City/State/ZIP Code>>

The "@" symbol is never printed, but instead causes the system to effectively hit the backspace key. So if the field is the first thing on the line, the "backspace" causes it to delete the line break and jump up to the previous line.  The resulting output looks like this:

John Smith
100 Main Street
Dallas, TX 75025

This trick can also be used when fields are lined up on the same line.  For example:

Hello @<<First Name>>!

Becomes:

Hello John!

or if there is no first name,

Hello!