Using Complex Logic in a CommGen Template


BI Publisher in Microsoft Word provides numerous options for customizing which information is displayed in a communication.

When writing a communication, you may want to include additional information which is dependent upon the recipient meeting certain conditions. As examples, there may be information you want to display to only transfer students, or only non-US citizens. BI Publisher uses If and End If statements to allow for this dynamic variability.

Before beginning work in your template, understand what If and End If statements you need. This involves determining the data field and the criteria value. For example, if you want to include information for only transfer students, the field to use is ADMIT_TYPE, and the value that identifies a transfer student is 4.

There are two different ways to insert logic into an .rtf template. It is important to understand both methods.

Option 1 - Using the Field Browser

This method involves using fields from the Field Browser and inputting logic behind the field name. It is helpful for those new to using logic within communications. This is a more guided process than option 2, because the tool provides some of the syntax required to add logic.

View instructions on using the Field Browser

Option 2 - Directly entering logic

This method involves typing your logic directly into the template without using the Field Browser. Many users have switched to this method after becoming more familiar with BI Publisher logic and coding syntax. This option can sometimes be visually confusing and is not recommended for those new to the CommGen process.

View instructions on directly entering logic

Note: The instructions for both processes assume your template is open in Microsoft Word and your XML file has been loaded. See the Creating a CommGen Template page for instructions on setting up your template.