<< Click to Display Table of Contents >> Creating plain text templates |
To create a plain text template follow the next steps:
1. Open Notepad and include the desired text content.
The next image displays an example for an Invoice template in plain text. In it we include the Customer's information and a table containing the purchased products.
2. Reference the information that will be dynamically obtained from the Bizagi data model, with Tags: information to be retrieved from Bizagi must be specified within Tags, i.e. [AttributeName].
In this case, the Customer's name is referenced with the [CustomerName] Tag.
To make reference to a collection you must use the following tags:
[Foreach:CollectionName]: Indicates the starting point of the Products collection.
[AttributeName]: All attributes between the Foreach and the End tag must belong to the collection.
[End]: Indicates the end of the Products collection.
Note in the image above how the Products collection is referenced by using the [Foreach:Products] sentence. All the tags typed from this tag until the [End] tag are assumed to be attributes of this collection. ([Product],[Quantity],[Price])
•The attribute and collection names can be different to the names given in the data model. This is only a reference to be used when mapping the information. •Tags cannot contain spaces. •Every single tag for the columns of all collection MUST be different from each other. No two columns in a document can be called the same way, even if they are in different tables. •When using Foreach and End tags or phrases be sure to capitalize them as specified. Otherwise, it will not be possible to identify the starting or ending point of the collection. |
3. Save your template.
Once the text structure is completed, save the document as a standard text file. (.txt).
In a single document you can include the same tag multiple times. You will only have to map it once. This DOES NOT apply for tags to collections. There can be ONLY ONE tag for each [Foreach] |
Last Updated 7/14/2023 11:35:31 AM