Thank you for your feedback.

Was this useful?

What is an IF Statement and how do I add it to my IRIS Automail Template

Article ID


Article Name

What is an IF Statement and how do I add it to my IRIS Automail Template

Created Date

11th August 2008


IRIS AutoMail


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 knowledgebase article will explain 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:
  • From the IRIS Main Menu, click on IRIS AutoMail and login
  • The AutoMail – Letter Request Browser will be displayed, Click on the Templates button.
  • The AutoMail – Letter Template Maintenance Screen will be displayed, highlight a template and click on the Edit button to edit the template.
  • The template will then be displayed
  • Toggle on the Field codes (Press ALT + F9 on your keyboard. For information on how to turn on field codes in MS Word please refer to KB IAS-119390.
  • 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’
  • Minimize Word, the tag selection screen will be displayed
  • Open the folder the Particular Client | Individual | Place a Tick next to Is Female
  • Click on the Refresh button
  • Maximise Word. (You are now ready to enter the tag in the document) NOTE: To check for versions of Word, Click on ‘Help | About’ when in a Word Document. For Versions of MS Word 2007 or later:
  • Click on the Mailings Tab | In the Write & Insert Fields section, click on the Rules down arrow
  • Select “IF…Then…Else…”
  • The Insert Word Field : IF screen will be displayed, In the field name, select LMCLISFemale by clicking on the down arrow
  • In the “Comparison” field, Select Equal to
  • In the “Compare to” field Enter 1 – Note: 1=True (Yes), 0=False (No)
  • In the “Insert this” text field, enter the word “Madam”
  • In the “Otherwise insert this” text field , enter the word “Sir”
  • Click on the OK button
  • This then enters the IF statement in the template, which will be displayed as: {IF {MERGEFIELD LMCLIsFemale} = 1 “Madam” “Sir”}
  • Minimize Word and Click on the Save Button in the Tag selection Screen
  • This should display the desired result when Generating the letter for a client. Related articles : KB IAS-7078 : How do I setup my own custom AutoMail templates? KB IAS-6864 : What Microsoft Word skills may I need to edit AutoMail templates KB IAS-11940 : How to change the date format in AutoMail. KB IAS-6589 : How to change the date format of an IRIS tag in AutoMail. KB IAS-6678 : Tax refund does not show in the tax return cover

    Share This Page
    E mail 64 | What is an IF Statement and how do I add it to my IRIS Automail Template twitter | What is an IF Statement and how do I add it to my IRIS Automail Template

  • Thank you for your feedback.

    Was this useful?