Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
agigliotti
Partner - Champion
Partner - Champion

Recipient filter - how to create a dynamic filter

Hi,
I'd need to distribute an excel report to sales agents applying the correct data reduction using the sales agent code as filter.
Is it possible to create a unique filter for all sales agents in order to send the right data (filtered on sales agent code) to the right person?
Please let me know.
Many thanks in advance for your time.
Best Regards

@Ruggero_Piccoli @Andrew_Kruger @Frank_S @JonnyPoole 

Labels (3)
24 Replies
anat
Master
Master

@Supersmurf ,appreciate if you share your findings ,it will help others too..

Supersmurf
Partner - Contributor III
Partner - Contributor III

Here you go;

  • The delete filters automation (.json)
  • A sample app (.qvf)

The reason for having the automation and not just the app, is that deleting a filter requires using REST DELETE and this is not supported by the Sense REST-connector as of now.

As you soon will see the filter import is really simplistic, but can easily be extended to handle multi values and more than one dimension.

Regards

jan@tallmaker.no

samarastaub
Contributor
Contributor

Tenho um problema semelhante ao exposto... Será que é possível criarmos filtros com base no "Name", por exemplo... ao importar esse arquivo colocaria o nome ou codigo do agente de vendas, e na criação do filtro colocaria um [Campo Nome Agente Venda] = "Name", que realizaria o filtro conforme cada agente específico mas de forma global... sem ter que criar um filtro em cada agente...

Segue modelo de exemplo em anexo... seria possível?

yousrarami96
Contributor II
Contributor II

Hello @Supersmurf ,

I tried to load your application but I got this error which I didn't understand why nor how to solve it, knowing that the filter name is different "Dim1=A" and "Dim1=B"

 

{"code":409,"message":"Filter name conflict. The filter name must be unique.","errors":[{"code":"REP-409043","meta":{"appErrors":[{"appId":"3326c4f1-1a97-4946-88b3-f37cff8a15a5","method":"CreateFilter"}]},"title":"Filter name conflict. The filter name must be unique."}]})
Emplacement de l'erreur :
MakeFilters:
SQL SELECT
"OriginalURL",
"__KEY_root"
FROM JSON (wrap on) "root" PK "__KEY_root"
WITH CONNECTION(
URL "https://tenant.region.qlikcloud.com/api/v1/apps/3326c4f1-1a97-4946-88b3-f37cff8a15a5/report-filters",
BODY "{""name"": ""Dim1=A"",""filterType"": ""REP"",""filterV1_0"": {""fieldsByState"": {""$"": [{""name"": ""Dim1"",""values"": [ {""valueType"": ""string"",""valueAsText"": ""A""}],""overrideValues"": false,""selectExcluded"": false}]}},""description"": ""jan@tallmaker.no"",""filterVersion"": ""filter-1.0""}",
HTTPHEADER "Content-Type" "application/json"
)

Supersmurf
Partner - Contributor III
Partner - Contributor III

Hi! If the same filter allready exists in the app then you will get this error. If you delete all filters, does the reload execute ok then. The automation I shared are deleting all filters before we create them again.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Supersmurf 

Do you have any details regarding the REST connection setup, authentication there etc.. I know later you use "WITH CONNECTION..." and token, but prior?

How do you configure those connections for your app:

  • LIB CONNECT TO 'Qlik Reporting Delete Filter Automation'
  • LIB CONNECT TO 'Qlik Reporting POST'

 

cheers

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.
madelonjansen
Partner Ambassador
Partner Ambassador

Thanks for sharing!

igorgois_
Partner - Creator
Partner - Creator

Is it possible to create filters from an Excel file, similar to how we can generate a bulk list of Recipients from Excel?

This is a critical factor for a major client project.

P.S.: This refers to the Reporting section of the app.

Thank you in advance!

Supersmurf
Partner - Contributor III
Partner - Contributor III

Hi @Lech_Miszkiewicz!

The connection Qlik Reporting Delete Filter Automation is just the url for the delete filter automation. I think I forgot to mention that the start block must have run mode = triggered. The url is the GET one.

The connection Qlik Reporting POST points to this API endpoint https://<tenant>.<region>.qlikcloud.com/api/v1/apps/1<app-id>/report-filters.

Regards

Jan

 

 

Supersmurf
Partner - Contributor III
Partner - Contributor III

Hi @igorgois_ !

I hope Qlik is close to make filter import a easy out-of-the-box feature. But while we wait, importing filters from a source like Excel is exactly what my shared automation and qvf is doing. Just shoot if I have explained it badly.

Best regards

Jan