Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
davwade1
Contributor III
Contributor III

Import Task with Filter containing multiple connections

Hello all,

I am using an Import Task to add filters/users/groups. I want to create a single filter for each user (just as I would do in the Nprinting GUI). But I have several connections within an Nprinting app and cannot figure out how to add multiple fields from multiple connections to a single filter during an Excel Import.

I tried repeating the Filter name in the Excel file, hoping that all the rows would be combined into the same filter, but only the first row for each Filter was created.

Any idea how I can make this happen using a normal Import Task? I would very much like to avoid the effort of writing a script to call the Nprinting API to add all these filters. I am using Nprinting Feb 2021, Qlik Sense Enterprise Feb 2021.

Thanks for your help.

David

Labels (2)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Although I have only partial solution I think your comment is fair and square and I would like to follow up on this. I was in the same boat and I also did not find a way of how to create such filter. I guess it is one of few things you cannot do when using xls import. So far I have identified following issues when using recipient import:

  • Cannot create single filter pointing to 2 different connections
    • workaround is to create 2 separate filters for each user(1 for each connection) - you can do all that using XLS
  • I wish I could create filters with the same name (just like you want it) so they could be linked to one filter value we have to populate on users sheet (instead of 2 unique filter names I suggested in workaround). That would be much cleaner solution.
    • I understand the drawback is that process uploading filters wouldn't know which filter needs updating if they have the same name. Uniqueness of the filter would have to be captured based on some additional parameter (unique id equivalent) which would have to be added to XLS import spreadsheet and maintained
  • There is no way you can create filter with "Clear all" function - which is possible in UI by creating filter, pointing to field, selecting Override and removing all options from "Values" section.

 

summary:

If you dont want to use API use the method I mentioned (create and assign 2 separate filters: 1 for each connection).

Cheers

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

5 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Although I have only partial solution I think your comment is fair and square and I would like to follow up on this. I was in the same boat and I also did not find a way of how to create such filter. I guess it is one of few things you cannot do when using xls import. So far I have identified following issues when using recipient import:

  • Cannot create single filter pointing to 2 different connections
    • workaround is to create 2 separate filters for each user(1 for each connection) - you can do all that using XLS
  • I wish I could create filters with the same name (just like you want it) so they could be linked to one filter value we have to populate on users sheet (instead of 2 unique filter names I suggested in workaround). That would be much cleaner solution.
    • I understand the drawback is that process uploading filters wouldn't know which filter needs updating if they have the same name. Uniqueness of the filter would have to be captured based on some additional parameter (unique id equivalent) which would have to be added to XLS import spreadsheet and maintained
  • There is no way you can create filter with "Clear all" function - which is possible in UI by creating filter, pointing to field, selecting Override and removing all options from "Values" section.

 

summary:

If you dont want to use API use the method I mentioned (create and assign 2 separate filters: 1 for each connection).

Cheers

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
davwade1
Contributor III
Contributor III
Author

I was afraid that would be the case but I was hoping the process had changed in the last few years. Thanks for confirming.

Sebastian_Dec
Creator II
Creator II

Hi Lech, I have a question, I understand that this cannot be done simply in 2023/24 either?

For example, if I have an ABC supplier, I have to create filters:
Stocks.Warehouse.ABC
Send.ABC
Purchase.ABC

Manually, I am able to create 1 ABC filter and add 3 different connections to the value: Name.Supplier = ABC:

Sebastian_Dec_0-1703246567926.png

 

Thanks & Regards,
Please close the thread by marking correct answer & give likes if you like the post.
Ruggero_Piccoli
Support
Support

Hi,

When importing filters from Excel file only one connection for each filter can be used: https://help.qlik.com/en-US/nprinting/May2023/Content/NPrinting/DeployingQVNprinting/Import-Users-Fi... . As per @Lech_Miszkiewicz old answer you can create 3 filters, one for each connection, and associate all of them to the same user. 

Creating filters via API supports multiple connections https://help.qlik.com/en-US/nprinting/May2023/APIs/NP+API/index.html?page=29. The following is an example of the body for fields from two connections:

{
    "appId": "ab53ef11-3cdc-45af-9403-b788eba2b004",
    "enabled": true,
    "name": "Filter with Fields from 2 Connections via API",
    "description": "Example of an advanced filter created via API Postman",
    "fields": [
        {
            "connectionId": "07d36409-1a43-40ae-a682-e17f8929e9c6",
            "name": "Year",
            "overrideValues": false,
            "selectExcluded": false,
            "values": [
                {
                    "value": ">=2018",
                    "type": "advancedsearch"
                }
                ]
        },
        {
            "connectionId": "73f20232-0cad-431c-bb15-0163cef5c25b",
            "name": "Year",
            "overrideValues": false,
            "selectExcluded": false,
            "values": [
                {
                    "value": ">=2018",
                    "type": "advancedsearch"
                }
                ]
        }
                ],
   "variables": []
 }

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
Sebastian_Dec
Creator II
Creator II

Thank you for your answer, in that case I will try to test creating filters via API.

 

But I still think that it would be easier to do it by importing, creating more columns in the Excel file for example:

Name Description App Enabled Connection Values Connection1 Values1 Connection2 Values2
ABC ABC supplier XYZ YES Stocks.Warehouse [Name.Supplier]={ABC} Send [Name.Supplier]={ABC} Purchase [Name.Supplier]={ABC}

 

 

 

Thanks & Regards,
Please close the thread by marking correct answer & give likes if you like the post.