Navigation: TeamConnect Setup and Development > Enterprise Customization Help > Using EasyDocs Step 1: Create RTF with Merge Fields |
Scroll Prev Top Next More |
The first step for creating a Document Generator template through EasyDocs is to create a Rich Text Format file (RTF) using Microsoft Word or Corel WordPerfect that includes mail merge fields. The RTF file will become the template in TeamConnect.
Important: Make sure that you have the appropriate rights assigned to you, as listed in Required TeamConnect User Group Rights.
1.Create a Word or WordPerfect document that you want to convert to a Document Generator template. 2.Insert a separate field of the type "MergeField" for each spot in your document where you would like to retrieve data from TeamConnect. For example, if you want a contact name to appear in a letter, you must insert two merge fields, one for the first name and one for the last name, because this is how the name is stored in TeamConnect. Be sure to read the tips in step 3 to avoid errors in the fields that you insert. Note: Merge fields appear in your document as field names surrounded by angle brackets, such as <<assignee>>. However, you cannot simply type such names directly into your document. You must use the special menu commands and procedures in Word or WordPerfect to create merge fields. Here is an example of inserting a merge field in Microsoft Word 2002: oPosition your cursor at the point in your document where you want the merge field to appear. oChoose menu items Insert | Field. oA dialog appears like that shown in the merge field in Microsoft Word 2002 image. Choose "MergeField" from the list box on the left. Type a "Field name" for your merge field where prompted. Click OK. The merge field appears in the document. The simple field names RTF sample image shows an example of an RTF with merge fields that map to TeamConnect data. Most of the merge field names are designed to be easy to read. If you use simple, easy names you must manually use Object Navigator, later, to map each merge field name to its proper data attribute. The advanced field names RTF sample image shows a similar RTF, but this one uses precise syntax rules to create more complex names for most of the fields. The advantage of using this special syntax is that the data mapping procedure is done automatically for fields that have names in this syntax. If you already know the relationships between your objects and you know the syntax rules, you can save time by typing field names in this syntax. Both RTF files use the special "filter@" and "loop@" tags that will be explained later in this chapter. Both RTF files produce exactly the same output (shown in the sample output from EasyDocs image). The only difference between them is the use of special syntax in some of the field names in the advanced field names RTF sample image. For more information about how to set up your merge fields in the RTF, see the following: ▪Automatically Mapped System Fields ▪Automatically Mapped Custom Fields ▪loop@ Merge Fields for Automatically Selecting Related or Sub-objects ▪filter@ Merge Fields for User-selected Related or Sub-objects ▪if@ Merge Fields for Conditional Text ![]() Creating a merge field in Microsoft Word 2002 3.While inserting merge fields, keep the following in mind: oDo not insert two merge fields immediately next to each other. You must type a space or other text between merge fields to avoid errors. oMerge field names can include these characters: "A-Z", "a-z", "0-9", "." and "_". Do not include spaces in merge field names. oDo not include other types of fields in the RTF file that are possible in Word or WordPerfect, such as the current date. TeamConnect only recognizes mail merge fields. To insert the current date, create a basic merge field, which you can later map to the current date. oIf you use the same merge field name more than once in an RTF to identify the same piece of information, you only have to map it once in TeamConnect. oIf you need to include multiple merge fields that identify similar data, make sure to give them distinctly different names, because later they will all be listed in a single drop-down list when you are mapping them. 4.Save the RTF file. 5.Upload the RTF file as described in Step 2: Upload RTF File to TeamConnect, after completing your merge fields. If you need to, you can make changes after uploading the file and mapping the merge fields that you created so far. ![]() Sample RTF File (simple field names) ![]() Sample RTF File (advanced field names) ![]() The sample output from the EasyDocs templates in the previous images |