Conditional IF statement

The IF statement is used in the document template to make decisions about optional content to be inserted into the document. If statements use the value of fields from the form or other hardcoded values to evaluate. IF statements can use and, or and use bracketing for precedence.

In addition the designer must place a bookmark around the IF statement in the Document Template, this will define what is to be removed if the statement evaluates to false.

This figure shows an IF statement contained in a Word 2007 bookmark.

Syntax

Shows how to test a text value, note the use of quotes """ around the values
«IF»"textvalue"="textvalue2" Then Conditional content here «/IF»

Shows how to test a numeric value, quotes are not required
«IF» numbervalue=numbervalue2 Then Conditional content here «/IF»

 

Example

This Example shows two fields being evaluted to select conditional content

«IF»"«Trustee_Type»"="Company" Then«Trustee_Name» (A.C.N. «Trustee_ACN») of «Trustee_Address»«/IF»«IF»"«Trustee_Type»"="Individual" Then«Trustee_Name» of «Trustee_Address»«/IF»

 

powered by metaPost



Created by Bruce in 5/16/2009 5:42:13 PMprint



rating
  Comments

  
Copyright 2009 by Zumesoft Pty Ltd Privacy StatementTerms Of Use
Small width layoutMedium width layoutMaximum width layoutMaximum textMedium textSmall text