home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR2
/
DINFO6.ZIP
/
1138
< prev
next >
Wrap
Text File
|
1993-10-28
|
2KB
|
58 lines
WordPerfect Corporation
InfoShare Information Fax Service
(800) 228-9960
Title: Merge: Blank Fields in a Merge
Product: WordPerfect 5.1 for DOS
Number: 1138-10/93
Problem
You are creating a merge. Some of the records in your secondary
file may have at least one blank field. Depending on your
primary file, this blank field may be on the same line as another
field or on its own line. If a field is blank, you do not want
an extra space or line to appear in the merged document.
Concept
The {IF NOT BLANK} and {END IF} merge commands are used to check
specified fields in your merge to see if they are blank fields.
If an indicated field is not blank, the commands following the
{IF NOT BLANK} merge command are executed
The {IF NOT BLANK} and the {END IF} commands are found in Merge
Codes (Shift+F9), under More (6).
Solution
Because there are two different types of problems in this
document, we will present two different solutions.
Method 1
In the following example, the secondary merge file records have a
First Name field, a Middle Initial field, and a Last Name field
on the same line. Use the {IF NOT BLANK} command to see if the
Middle Initial field is blank. If it is not blank, each
customer's full name will be printed, including the middle
initial. If it is blank, the first and last names will be
printed without extra spaces between them.
{FIELD}First~{IF NOT BLANK}MI~ {FIELD}MI~{END IF} {FIELD}Last~
{FIELD}Address~
Method 2
In this example, not every record in your mailing list has a
company name, so some of the Company fields will
be blank. Rather than have a blank line between the Name field
and the Address field, use the {IF NOT BLANK}
command to check for the blank field.
{FIELD}Name~{IF NOT BLANK}Company~
{FIELD}Company~{END IF}
{FIELD}Address~
See Also
∙ Appendix K: Macros and Merge, Programming Commands in the
WordPerfect 5.1 for DOS reference manual