Creodocs is new!
Experiencing an issue? Have feedback?


Documentation pages for using Creodocs.

  • Manual Entry

What Is Document Data?

Most business documents that are produced repeatedly contain large sections of text and visual elements that are identical from document to document. This content is static and typically doesn't change very often, such as company contact information, or is informative and applied to all recipients, such as the terms and conditions in an invoice. The information that does change from document to document is dynamic and typically includes customer information, such as the addressee and item lines in an invoice. To produce each document, dynamic information needs to be placed in specific locations amongst the static content, which is exactly what Creodocs does to produce your documents. Document data is the dynamic information which you need to enter to produce a unique document from an existing template.


A single piece of dynamic information is called a variable. In the simplest case, a document can contain one variable that's used in one place, such as a letter notifying customers of an event that merely needs to use the customer's name in the "Dear [name]," greeting. A variable can be used in one or more places in the document but its content is always the same. This means it only needs to be specified once and can be styled as needed wherever it appears in the document.

Most documents will have need for more than one variable, and some of these variables may not need to have values. For example, a letter may contain not only the customer's name but also their address and phone number. The name and address are required for correctly addressing the letter, but the phone number is merely added under the address if it's available and without it the document is still complete. Variables are marked as required if they must have information entered for them, or not required (i.e. optional) if they can be empty. It is the template's job to correctly adjust the document when an optional variable is submitted without content.

In some situations, we may wish to specify the type of a variable to allow only specific kinds of information to be submitted for it. For example, if we have an invoice document where the number of hours and hourly rate are used to calculate the gross and total amounts due, these variables can only contain numbers or the calculations can't happen. In this case we specify the types of these variables as number and a document will not be produced if submitted values contain anything but numbers.

Variables need not strictly store information that is output directly into the document. For example, a value of a variable can be used as an internal switch in the LaTeX code to alter the entire layout of a document without being written to the document.

Variable Groups

Documents typically contain many variables and natural groups arise based on the similarity of information stored in two or more variables. For example, a receipt is likely to have several variables for customer information and several others for the goods purchased, which form two natural groups. Variables that are grouped together can be used independently in different places in a document but are presented together for users entering their information. All variables must belong to a group but a group can contain a single variable if there are no other variables that are similar.


So far we have seen that variables accept a single input value from the user and this value is substituted for the variable in one or more places in the document. However, sometimes it makes sense for a variable (or group of variables) to accept and output multiple sets of values. Consider the case of multiple items in an invoice. Each item has the same information: date, description and cost, but if each variable is only allowed one value, there need to be separate variables for each item, e.g. date1, description1, cost1, date2, description2, cost2, etc. This is cumbersome, repetitive to specify and supports only a fixed number of invoice items.

Multi-groups are a solution to this problem and strongly tie one or more variables together with surrounding static content and/or code. This means the entirety of the multi-group specification in the code is duplicated for each set of content supplied. Using our invoice items example, this means date, description and cost are specified as 3 variables in a multi-group and this allows users to enter multiple sets of content for them. Each set is then output to the document one after another, and any code that is required to create the line is also duplicated to ensure each item is on a separate line and styled correctly.