Knowledge Base


Filtering With Message Template Variables

Designer: How To – Filtering With Message Template Variables

When designing a Message Template, a filter variable can be defined that acts similar to a pivot table in a spreadsheet.  The variable can be copied and used in Assessments and the Assessment Template PDF.

Data can be displayed in a Message or Assessment for a selected field that is filtered based on a different field in the same Custom Data Type (CDT).

To create the variable, go to Message Template in the left hand menu of Designer.  Then either open an existing template or create a new one by clicking on the orange “+ New” button.

Clicking on the variable button above the message body will open a drawer on the right.  The drawer will display the available variables that can be utilized in the message.  The boxes under “Custom Data Type Variable” are used to filter a variable in the Message template and Assessments.

Use the following steps to create the variable filter:

  1. Choose the CDT containing the field that should be displayed in the message or Assessment by clicking the dropdown box under “Custom Data Type Variable” and selecting the CDT
  2. Select the field to be displayed by clicking the dropdown box under “Data Type Field”
  3. Click the dropdown box under “Filter Field” to pick the field the displayed data will be filtered by
  4. Enter the data that will be in the field used for filtering in the “Filter” box
  5. The displayed information in the message or Assessment can be sorted by the field selected in “Sort Field”
    1. Click the arrow next to the “Sort Field” dropdown box to sort the information in ascending or descending order
  6. Using the up/down arrows or typing in the number, indicate how many records of the field should be displayed
  7. Click the copy button next to the variable to copy it. Then paste the variable in the Message Template body
  8. To use the variable in an Assessment navigate to “Forms” in Designer and paste the variable in a text or question box in the desired Assessment: The variable can be added to an Assessment Template to then display the information in a PDF

In the above example, the ‘medication’ field in the df_medication CDT will be displayed when the ‘status’ field contains “b_active”. The information will be sorted alphabetically by the ‘medication’ field.

More Questions?

If you have any questions, please visit the Welkin Health Knowledge-Base or contact your Implementation/CSM for more information.