Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
igoralcantara
Partner - Creator II
Partner - Creator II

Automation to receive selections from App and pass it to a report

Good day Qlik community,

I have an unusual requirement. I want my users to be able to click on a button on an app and call an automation sending their selections to the automation and applying the selections to the report. The first part is easy and it is working. I can pass and receive the selections in the automation.

The part that I cannot get it right is the one to pass the selection to the report. For some strange limitation, if I apply a bookmark to my automation, the report totally ignores it. I have to explicitly pass each field selection to the report using the Add Selections to report.

It does work if I create one of these blocks for each field but would require for me to know fields the user will select, which I don't. What I want is to loop through each field and apply the selection for that field.

I am using the block "List Current Selections" to loop these fields. This seems to work. Inside that loop, I am trying to use the block Add Selectiction to Report". That one does not work. It forces me to pick a field by the index (0, 1, 2) instead of do what any loop does and get the index for the corresponding loop iteration.

Ideas?

These are some screenshots that might help:

igoralcantara_1-1711725061434.png

igoralcantara_2-1711725085340.png

 

igoralcantara_3-1711725107227.png

 

----
datavoyagers.net
Labels (1)
2 Replies
igoralcantara
Partner - Creator II
Partner - Creator II
Author

I think I have it almost figure it out. I understand now that "List Current Selections" is not a loop, so I added a loop after to loop through these items. 

However, this only works if the number of fields I have selected in my app is exactly 3. If I select more, anything after the 3rd field is ignored, if it is less than 2, it fails because the 3rd item is null.

igoralcantara_0-1711737020617.png

 

Any idea why the List Current Selections does not get the currect number of fields from the bookmark?

----
datavoyagers.net
igoralcantara
Partner - Creator II
Partner - Creator II
Author

One additional thing. Because some fields are text and some are numeric, I had to edit the expressions for "Add Selection to Report" manually:

igoralcantara_0-1711740208257.png

 

----
datavoyagers.net