Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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)
14 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.