What is an IF Statement and how to add it to an IRIS AutoMail Template  

Introduction

IRIS AutoMail uses the interface of Microsoft Word to generate correspondence. To create your own Bespoke AutoMail templates you will require knowledge of Microsoft Word to the level of complexity that your bespoke template requires.

The IRIS support team are not Microsoft Word experts and cannot provide support, advice or maintenance services with respect to Microsoft Word. However, we have provided some documentation to help you with some of the program features.

This topic explains what an 'IF statement' is and how to use it.

 

An IF statement is a conditional statement that contains the keyword IF, followed by an expression in the condition, the action that needs to be carried out once the results have been derived, and an option i.e. alternative action.

It is possible to insert text subject to evaluation of a condition within the template code. For example, different paragraphs of text could be printed on the same letter depending on whether the client is a business or a personal client. The main tool in creating conditional text is the IF statement.

Many IRIS templates use IF Statements. For example, if you would like to insert his/her in the document when writing to a client that is Male/Female. You would like it addressed to Madam/ Sir instead of a Formal/Informal salutation.

Below is an example of how to create an IF statement. In this example we have chosen to show how to add an IF statement for the IRIS tag 'Is Female', and how to insert the relevant text if the client is Female or Male.

  1. From the IRIS Main Menu, click IRIS AutoMail.

  2. The AutoMail - Letter Request Browser displays. Click Templates.

  3. The AutoMail - Letter Template Maintenance screen displays. Highlight a template and click Edit.

The template will display.

  1. Toggle on the Field codes (press ALT + F9 on your keyboard). For more information, click here.

  2. Left-click on the document where you would like to enter the IF statement. For this example, it would be next to the word 'Dear'

  3. Minimize Word, the tag selection screen displays.

  4. Open the folder the Particular Client | Individual | and select Female.

  5. Click Refresh.

  6. Maximise Word. (You are now ready to enter the tag in the document).

  7. To check for versions of Word, Click on 'Help | About' when in a Word Document.

 

For Versions of MS Word 2007 or later:

  1. Click on the Mailings tab | In the Write & Insert Fields section, click on the Rules down arrow.

  2. Select "IF...Then...Else..."

  3. The Insert Word Field : IF screen displays.In the field name, select LMCLISFemale by clicking on the down arrow.

  4. In the "Comparison" field, select Equal to.

  5. In the "Compare to" field enter 1 -

  6. 1=True (Yes), 0=False (No).

  1. In the "Insert this" text field, enter the word "Madam".

  2. In the "Otherwise insert this" text field , enter the word "Sir"

  3. Click OK.

This then enters the IF statement in the template, which will be displayed as:

 {IF {MERGEFIELD LMCLIsFemale} = 1 "Madam" "Sir"}

  1. Minimize Word and click Save in the Tag Selection screen.

This should display the desired result when generating the letter for a client.

 



Related topics

How to set up custom AutoMail templates

What Microsoft Word skills may I need to edit AutoMail templates

How to change the date format in AutoMail

How to change the date format of an IRIS tag in AutoMail

Tax refund does not show in the tax return cover