Adding conditions to a text via Automate Range

Prev Next

You can add conditions to a text so that it is displayed depending on that condition. For example, you want to show a specific message on a training report depending on the participant’s success level.

Steps

  1. Open your Word template.

  2. Go to the dox42 ribbon and select Insert Data Field.

    Toolbar displaying various functions like Generate, Data Map, and Refresh Template options.

    dox42 ribbon

    The dox42 Data Fields pane opens, which contains with all the components of the data map.

  3. Select the text you want to add an condition to.
    In this example we only want to display the text “That was awesome” for the best participants.

  4. Enter and select the text.

  5. Go to the dox42 ribbon and select the Automate Range button.

    The dox42 Automate Range window opens.

  6. Select the Insert Data Field button.

  7. Choose the data field which is required for the condition.
    Example: Participants.Success

  8. Select an operator from the Insert Operator dropdown.

    If more than one condition is need, it is possible to combine the condition with the operators from Insert Logic Operator dropdown.

  9. Enter the desired value for the condition.

    Note

    If the value is a text string you need to set it in quotation marks: “condition text" .

    Example: A condition meaning that the text should only be displayed if the participant’s success level equals the text “Distinction”.
    Configuration settings for dox42 Automate Range with condition for success distinction.

  10. Optional: Select a colour from the Colour dropdown.

    Tip

    We recommend using different colours for your conditions so that you can keep an overview, in case you have various or nested conditions in your template.

  11. Select the Insert button.
    The condition is inserted. You can recognize conditions by the question mark icon (condition tag).

    'That was awesome!' text with condition

    Data field with conditon

    Tip

    By moving the condition tags, you can flexibly move the start and end of the condition, e.g. to include a line break or page break.

Result

You have added a condition to a text. When you generate the document, it will only show this text for participants that have passed with distinction.
Generated document template with 'That was awesome' message