Skip to main content

How to Include Dynamic Elements in NPrinting E-mail

cancel
Showing results for 
Search instead for 
Did you mean: 
Stefano_Dalla_Guarda

How to Include Dynamic Elements in NPrinting E-mail

Last Update:

Nov 10, 2015 6:17:02 AM

Updated By:

Stefano_Dalla_Guarda

Created date:

Nov 10, 2015 6:17:02 AM

It is often convenient to include recipient details, reports, measure totals or subtotals and other information in the Subject field and the message Body accompanying reports being distributed by e-mail. This can be done by inserting QlikView variables or dynamic tags in either or both while creating a Report Task. All QlikView variables contained in the connected QlikView document can be used and are present in the Select Tags dialog window. Tags present under Recipients, Reports, QlikView, and Tasks categories are NPrinting dynamic tags. The variables are alphabetically sorted.

Recipients Details

                   
            Recipients-Details.png                   
         

When creating your recipients, you can add details like:

  • Fullname
  • Email address
  • Company
  • Department
  • Office
  • Nickname
  • Title
  • Job Title
  • Custom 1
  • Custom 2
  • Custom 3

Any or all of these details can be inserted into the email subject or message body.

Recipients Variables

                   
            Recipients-Variables.png                   
         

Recipients Variables are automatically replaced with the values of corresponding QlikView variables. This replacement happens after the filters associated with the recipients and the filters associated with the task that generates the email have been applied. Tags are made following the scheme: %%Recipient_Variables_QlikViewDocumentName_QlikViewVariableName%%. Tags can be found in the Recipients node.

For instance:

Create a variable in QlikView called “vTotalSales” and set the value to the formula =money(sum(Sales),'$ #,##0.00')

Add the variable tag “%%Recipient_Variable_SalesDemo_vTotalSales%%” to an email message

When you send the email to your recipients, recipient filters will be applied before the value of the variable is calculated. So, if your recipients have filters based on their sales territories, then the expression =money(sum(Sales),'$ #,##0.00') will show sales in the appropriate territory for each salesman.

We’ve also added the new tag %%Recipient_Current_Selections%%, which when used, is replaced by the QlikView current selections associated with the recipient and task for each connection. This tag does not display report filters because you can attach as many different reports to the same email as you like.

 

Create a variable in QlikView called “vTotalSales”

                   
            Create-a-variable-in-QlikView-called--ldquo-vTotal.png                   
         

After opened your QlikView document:

  1. Select Settings
  2. Click on Variable Overview

Create the New QlikView Variable

                   
            Create-the-New-QlikView-Variable.png                   
         
  1. Click on the Add button
  2. Enter vTotalSales
  3. Click OK

Add a Definition to the QlikView Variable

                   
            Add-a-Definition-to-the-QlikView-Variable.png                   
         
  1. Scroll down using the scroll bar
  2. Select the vTotalSales variable
  3. Enter =money(sum(Sales),'$ #,##0.00') in the Definition box
 

Insert  Tags in Subject Field

                   
            Insert--nbsp-Tags-in-Subject-Field.png                   
         
  1. Enable the Send Email flag
  2. Enter text in the Subject field and click on the tag icon at the right of the Subject field when the cursor is on the tag text position
 

Search the FullName Among Available Tags

                   
            Search-the-FullName-Among-Available-Tags.png                   
         
  1. Select Recipient category in the Recipients node
  2. Start typing FullName in the Select a tag: box
  3. Select the %%FullName%% tag. This will be replaced with the recipient name in the Subject field
  4. Click on OK

You can also use these tags in the e-mail message body.

Select Tag to Insert

                   
            Select-Tag-to-Insert.png                   
         
  1. Select Recipient category in the Recipients node
  2. Select the %%Recipient_Current_Selections%% tag. This will be replaced with the recipient selection active when the report is generated
  3. Click on OK

Repeat the process as many times as is required.

The %%Recipient_Current_Selections%% tag is a recipient filter dependent tag. This type of tag can be used in the subject and body of any email. They are automatically replaced with the values of the corresponding QlikView filters. The values are generated after the Recipient and Task filters have been applied for that Task for that Recipient.

Insert Variable Tags in Message Body

                   
            Insert-Variable-Tags-in-Message-Body.png                   
         
  1. Set the format to Html Text
  2. To open the Html editor, click on the edit page icon to the right of the Body box

Add a Recipient Variable

                   
            Add-a-Recipient-Variable.png                   
         

To insert a Recipient Variable, type in the fixed text of the email then:

  1. Select the tag icon at the right of the Editor toolbar each time you need to insert a tag
  2. Expand the node that contains the tag or variable you need. For instance expand Recipients -> Variables to insert a recipient filter dependent tag
  3. Select the tag, for instance %%Recipient_Variable_SalesDemo_vTotalSales%%. You can insert as many tags as you want in a single email
  4. Confirm with OK

Add a QlikView Variable

                   
            Add-a-QlikView-Variable.png                   
         

To insert a QlikView Variable:

  1. Select the tag icon at the right of the Editor toolbar each time you need to insert a tag
  2. Expand the node that contains the tag or variable you need. For instance expand QlikView -> Variables to insert a QlikView Variable
  3. Select the tag %%Variable_SalesDemo_vTotalSales%%. This type of variable is not filtered by the recipient.
  4. Confirm with OK
  5. Save the email message template

Send the Email

                   
            Send-the-Email.png                   
         

"Save and Close" the report Task and run it by clicking Run in the Task area of the ribbon bar. Then open your email account to check the result. Please note that Recipient variables like %%Recipient_Current_Selections%% which show current selections, are affected only by recipient and task filters. Report filters don't affect the values shown.

Labels (1)
Version history
Last update:
‎2015-11-10 06:17 AM
Updated by: