Set Up Content to Appear in Only Email or In-App Workflow Notifications

The same .rtf report layout template is used for both email and in-app notifications. When you edit a copy of predefined templates, you can make content conditional. For example, add an attribute and have it appear only in email notifications.

The logo, action buttons, and links at the end of email notifications are predefined to appear only in emails, based on the subtemplate. The approval history is usually predefined to also appear in the body of only email notifications. Any conditional setting you apply to these components in the .rtf template won't override the predefined setup.

Prerequisites

Generate sample report data from the data model used for the report, and save the .xml file to your computer.

Defining Conditional Regions

To define a conditional region of content that appears only in email or in-app notifications:

  1. Open your .rtf report layout template in Microsoft Word.

  2. On the ribbon, open the Analytics Publisher tab and click Sample XML within the Load Data group.

  3. Select the .xml file you downloaded to import sample data from the data model.

  4. In your .rtf document, select the content you want to make conditional.

  5. On the ribbon, click Conditional Region within the Insert group.

  6. In the Conditional Region dialog box, on the Properties tab, select BINDISONLINENOTIF from the Data field list in the General section. The values in this list come from the sample data you imported from the data model.

  7. Select Date/Text from the next list.

  8. In the Condition 1 section, select Equal to from the Data field list.

  9. In the corresponding text field, enter true for content to appear only in in-app notifications, or false for content to appear only in emails.

  10. Make sure that form fields containing the conditional logic are inserted around your selected content. The beginning form field, C, should be immediately before the conditional content, and the closing form field, EC, should be immediately after. Move the form fields as needed.

    Tip:

    To make sure you're looking at the correct form fields, double-click the C form field to open the Conditional Region dialog box and see the BINDISONLINENOTIF setting.

  11. Save your changes in Word.

Entering Conditional Code

If the data model for your report doesn't have the BINDISONLINENOTIF attribute, then:

  1. In your .rtf report layout template, put your cursor immediately before the content you want to make conditional.

  2. Enter the following code, which functions the same as the C form field:

    • <?if:BINDISONLINENOTIF='true'?> for in-app only

    • <?if:BINDISONLINENOTIF='false'?> for email only

  3. Put your cursor immediately after your conditional content.

  4. Enter <?end if?>, which functions the same as the EC form field.

  5. Save your changes in Word.