Qlik Community

Qlik NPrinting Documents

Documents related to Qlik NPrinting.

Filter Syntax, Parameters, and Options for Importing Recipients

Not applicable

Filter Syntax, Parameters, and Options for Importing Recipients

Adding Recipients to NPrinting files by hand can be tedious and error prone, so import them complete with filters and distribution groups. During the process you will create mapping between fields from the data source and the columns in the recipient database in the NPrinting file. Some mappings are straight transferal of text, but others require specific syntaxes. Here are examples and explanations for filter syntaxes.

NOTE: In NP 16, there is a hierarchy of filtering.

Filtering Priority/Order as follows:

-Chart (object filters)

-Level/Page

-Report

-Cycle

-Recipient

-Task

Multiple filters, same field on multiple objects, Only one will be applied

Chart filters have the highest priority and Task filters have the lowest priority


Therefore, filters applied at the top of this chain will take priority and override lower priority filters. Thus, filter behavior is dependent on where the filter is applied. 

      

Recipient List Stored in Excel File

                
            Recipient-List-Stored-in-Excel-File.png                
      

Here is a short list of recipients with many fields stored in an Excel file. Column headings can be imported with the data to help the mapping process when importing these recipients into an NPrinting Project File.

    

    

    

      

Filter1 Field in C:\NPrintingTraining\Recipients\RecipientsFiltersComplete.xlsx

                
            Filter1-Field-in-C--NPrintingTraining-Recipients-R.png                
      

Here is the first filter field, there can be more than one.

  • row 8 has the value of the Full Name field set to Rob Carsson as you can see in the first image above
  • the first word is the name of the field to be filtered, Salesman
  • the field is to be filtered for the value enclosed in braces, Rob Carsson

This filters for a specific value in a specific field.

    

    

    

      

Single Field and Multiple Values

                
            Single-Field-and-Multiple-Values.png                
      
  • row 6 has the value of the Full Name field set to Leif Shine as you can see two images above
  • the field to be filtered is Salesman
  • the field is to be filtered for the comma separated list of values enclosed in braces, Leif Shine, Ingrid Hendrix, and Joan Callins

This filters for a series of values in a specific field.

    

    

    

      

Filter Parameters

      

Filters can have the following Parameters activated by adding a comma separated list of values enclosed in angle brackets, '<' and '>', after the closing brace:

  • drop: When you reduce a QlikView file, the reduced .qvw file will not contain this field
  • unlock: This will unlock fields that are locked in QlikView
  • lock: This will lock a field in QlikView for all other filters applied to the same report
  • verify: If your filter creates an empty report no report will be produced
  • select excluded: If you select this check box, you will filter for all values of the field that you have not selected. For instance, if you filter the Gender field for Male and flag Select Excluded, the report will be filtered for Female. Not available for filters based on Linked Fields
  • clearselections: when a filter with this flag activated is applied, the selections of the field are cleared. The selections are cleared only for the specific fields with the clearselections option activated. The selections on other fields remain active. Once the flag is checked, all other flags will be disabled, except "Unlock if locked". Subsequently, you will not be able to add new field's values. However, it will be possible to add values and to create a filter as usual and then finally to be able to enable the flag. In this case the values will no longer be used, they will be ignored so these selection will not affect the final dataset used in the report.

Filters are applied with the priority sequence: Task, Recipient, Cycle, Report, Level/Page, Chart so the final dataset depends on where the filter with clearselections activated is applied. This option is useful, for instance, when you have a Report with the filter Category=Babyware and you want to insert, in the same report, a table with the overall sales, unfiltered. So you'll apply the filter with clearselection on the field Category only to the QlikView chart with totals.

In the log you'll see the an entry for the clearselection action.

This flag also works with Linked Fields filters. All the fields that are composed of the Linked Fields will be cleared.

Note that parameters are not case sensitive.

    

    

    

      

Single Field, Single Value & Filter Parameters

                
            Single-Field--Single-Value--amp--Filter-Parameters.png                
      
  • row 7 has the value of the Full Name field set to Lennart Skoglund as you can see three images above
  • the field to be filtered is Salesman
  • the field is to be filtered for the single value in the braces enclosed list, Lennart Skoglund
  • the comma separated list between angle brackets following the closing brace indicates which Filter Parameters are to be activated
    

    

    

      

Multiple Fields & Filter Parameters Activated only for Second Field

                
            Multiple-Fields--amp--Filter-Parameters-Activated-.png                
      
  • row 10 has the value of the Full Name field set to Tom Lindwall
  • the fields to be filtered are Salesman and ProductName, there could be more and they are separated by commas
  • the Salesman field is to be filtered for the two values, Tom Lindwall and Lennart Skoglund
  • the ProductName field is to be filtered for the values, Minnki Pälsii, Snake Boots, Davenport, Feiss Fleece Trousers, and Atles Lussekofta
  • the comma separated list between angle brackets following the closing brace is valid only for the ProductName field and indicates which Filter Parameters are to be activated, in this case: drop, unlock, and verify
    

    

    

      

Multiple Fields & Different Filter Parameters Activated for Each Field

                
            Multiple-Fields--amp--Different-Filter-Parameters-.png                
      
  • row 9 has the value of the Full Name field set to Rock Roll
  • the fields to be filtered are Salesman and ProductName, they are separated by commas
  • the Salesman field is to be filtered for the single value, Rock Roll
  • the comma separated list between angle brackets following the closing brace is valid only for the Salesman field and indicates which Filter Parameters are to be activated, in this case: drop, lock, and verify
  • the ProductName field is to be filtered for the values, Minnki Pälsii, Snake Boots, Davenport, Feiss Fleece Trousers, and Atles Lussekofta
  • the comma separated list between angle brackets following the closing brace is valid only for the ProductName field and indicates which Filter Parameters are to be activated, in this case: unlock, and verify
    

    

    

      

Other Options

                
            Other-Options.png                
      
  • ClearFilterRefList: if set to yes, true or 1, eliminates references between filters and recipients and applies all of the filters included in the file that is being imported. It will not delete the reference between the recipient and the filter with the same name that was imported in the past. If you change the field of the filter and then re-import, the filter will be updated with the new values. Neither filters nor recipients are canceled from the .nsq file. The default value for the column is false and so filters included in the file being imported are added to those already in the .nsq file. The field is case insensitive. It's also possible to use "1" for true and "0" for false.
  • CustomFilterConnection: this is the connection to the QlikView document associated with the filter. The predefined connection is used if a value is not specified
  • CustomFilterID: this applies the specified pre-existing filter to the recipient being imported
  • CustomFilterPrivate:  if set to yes or true, the filter is private and isn't visible in the filter list. It is also applied to the recipient for which the filter was created. This helps keep the filter simple and uncluttered with one-use filters.
    

    

    

      

Set Groups while Importing

                
            Set-Groups-while-Importing.png                
      

Syntax

Recipients can be associated with as many groups as desired when importing them. Reports can have one or more recipient groups, making maintenance easy. It is enough to remove a Recipient from a group to stop distribution of the relevant reports to that Recipient, or add a Recipient to start distribution to her.

Here are examples of  Recipient associations with group. All groups could be listed in the Group1 column as a comma separated list, but two columns have been used here. The Group 1 column is dedicated to country groups, while the Group 2 column is used for business unit or management units.

Options

  • clearGroupList: if set to yes or true, the Recipient is removed from all groups it was a member of before, and made a member of the new groups listed in the file. Default: False.
    

    

    

      

CC and BCC Email Addresses

                
            CC-and-BCC-Email-Addresses.png                
      

During the columns mapping of your Excel file it's also possible to import CC (Carbon Copy) and BCC (Blind Carbon Copy) information. Refer to the tutorial "How to Create and Import Recipients with Filters and Distribution Groups".

    

    

    

      

Inspect Recipient Imported with Filters

                
            Inspect-Recipient-Imported-with-Filters.png                
      

Inspect Tom Lindwall's profile after importation.

    

    

    

      

Eliminate Recipients while Importing

      

Recipients that have been imported from a data source by a Recipient Import Task and have been eliminated from the data source can be deleted automatically from the .nsq file by rerunning the exact same Recipient Import Task. See: How to Delete Recipients Automatically When Importing.

For more explanation also see "Advanced Filters Syntax on Recipients Import".

    

    

Comments
marcelo_7
Not applicable

The explanation of CustomFilterID is not correct. CustomFilterID creates a filter with the name used in this column. It is not used to reference a pre-existing field, although that's what I would have needed. Here's from the help:

Custom Filter ID: allows you to give a custom name to a new filter. The default is FullName.


*FilterRef1 on the other hand allows me to create Filters in Nprinting and reference them in the import excel.

Version history
Revision #:
1 of 1
Last update:
‎04-23-2015 08:45 AM
Updated by: