home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR2 / DINFO6.ZIP / 1138 < prev    next >
Text File  |  1993-10-28  |  2KB  |  58 lines

  1.                      WordPerfect Corporation
  2.                 InfoShare Information Fax Service
  3.                          (800) 228-9960
  4.  
  5. Title:   Merge: Blank Fields in a Merge
  6. Product: WordPerfect 5.1 for DOS 
  7. Number:  1138-10/93 
  8.  
  9. Problem   
  10. You are creating a merge.  Some of the records in your secondary
  11. file may have at least one blank field.  Depending on your
  12. primary file, this blank field may be on the same line as another
  13. field or on its own line.  If a field is blank, you do not want
  14. an extra space or line to appear in the merged document.
  15.  
  16. Concept
  17. The {IF NOT BLANK} and {END IF} merge commands are used to check
  18. specified fields in your merge to see if they are blank fields. 
  19. If an indicated field is not blank, the commands following the
  20. {IF NOT BLANK} merge command are executed
  21.  
  22. The {IF NOT BLANK} and the {END IF} commands are found in Merge
  23. Codes (Shift+F9), under More (6).
  24.  
  25.  
  26. Solution
  27. Because there are two different types of problems in this
  28. document, we will present two different solutions.
  29.  
  30.  
  31. Method 1
  32. In the following example, the secondary merge file records have a
  33. First Name field, a Middle Initial field, and a Last Name field
  34. on the same line.  Use the {IF NOT BLANK} command to see if the
  35. Middle Initial field is blank.  If it is not blank, each
  36. customer's full name will be printed, including the middle
  37. initial.  If it is blank, the first and last names will be
  38. printed without extra spaces between them.
  39.  
  40. {FIELD}First~{IF NOT BLANK}MI~  {FIELD}MI~{END IF}  {FIELD}Last~
  41. {FIELD}Address~
  42.  
  43.  
  44. Method 2
  45. In this example, not every record in your mailing list has a
  46. company name, so some of the Company fields will
  47. be blank.  Rather than have a blank line between the Name field
  48. and the Address field, use the {IF NOT BLANK}
  49. command to check for the blank field.
  50.  
  51.           {FIELD}Name~{IF NOT BLANK}Company~
  52.           {FIELD}Company~{END IF}
  53.           {FIELD}Address~
  54.  
  55.  
  56. See Also
  57. ∙    Appendix K: Macros and Merge, Programming Commands in the
  58.      WordPerfect 5.1 for DOS reference manual