This is Microsoft Office functionality and Conga support is limited. Refer to Microsoft Office documentation for additional information about "IF" statements.

Regarding Checkbox values: Although the Conga View Data Workbook and the Template Builder show the value as TRUE, they do not work in Microsoft Word. Change your value from TRUE to True.

For example: {If "<<Checkbox_MergeField>>" = "True" "Yes" "No"}}

Nested IF statements, where the else value is another conditional IF statement, work successfully with Conga Composer.

Due to the complicated nature of nested IF statements, Conga does not support nested IF statements in Microsoft Word. The recommended alternative to nested IF statements in Microsoft Word is to use the native IF and CASE Logical Functions in Salesforce formulas.

Mac users can insert If Statements in Word templates with Microsoft Word.

To insert If statements:

  1. In Word, select Insert → Field.
  2. Select Mail Merge in the Category section, and IF in the Field Names section. Click OK. You see what looks like an error message.
  3. Right-mouse click the error message and select Toggle Field Codes.

  4. Remove the text: “\* MERGEFORMAT”, leaving the word IF between the brackets.
  5. The syntax for an IF statement is: {IF <<Expression1>> Operator ExpressionValue “TrueText” “FalseText” }
  6. To insert Expression1, ensure space remains after IF, then from the Insert drop-down menu, again select the Field option.
  7. Select the Mail Merge option in the Category section, select MergeField in the Field Names section, and paste the field name. Click OK.

    Now you’re ready to write the rest of the IF Statement. Here’s an example of proper syntax:

    Example: { IF <<OPPTY_FIELD>> = "True" "Then Populate Data" "Do Not Populate Data" }

    Caveats

    Using Preview in the Conga UI does not always work properly. If you receive an error, run the complete solution to test instead. If you need to replace the field in the Expression1 part of the IF Statement, you cannot delete the field name between the double-chevrons (“<<” and “>>”) and replace with the new field. You must replace the expression by inserting an alternate field using the Insert Field process again. If the final document produced from running the solution does not display the results of the IF statement correctly, this might be resolved by simply right-clicking the IF Statement and selecting Toggle Field Codes.

    Regarding Checkbox values: Although the Conga View Data Workbook and the Template Builder show the value as TRUE, they do not work in Microsoft Word. Change your value from TRUE to True.

    • For example: {If "<<Checkbox_MergeField>>" = "True" "Yes" "No"}}