Skip to main content

How to add a list of values in a selection to a report in Qlik Application Automation

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Emile_Koslowski
Employee
Employee

How to add a list of values in a selection to a report in Qlik Application Automation

Last Update:

May 10, 2022 1:34:28 PM

Updated By:

Jamie_Gregory

Created date:

Feb 8, 2022 10:44:45 AM

This article explains how a list can be used as values for the Add Selection To Report and Add Selection To Sheet blocks in the Qlik Reporting connector in Qlik Application Automation.

You might have noticed that the Values input field in these blocks only allows you to specify values one by one. But in some scenarios, you'll want to specify a list of field values instead of adding them one by one.

If you're new to reporting, please read our Reporting tutorial first.

Preparation

The source of these values can either be the List Values Of Field block from the Qlik Cloud Services connector or any List ... block from a 3rd party storage tool like Microsoft Excel. In this example, we'll use the List Values Of Field block.

The example automation used in this article looks like this:

Emile_Koslowski_1-1644244589568.png

And this is what the example output of the List Values Of Field block looks like:

Emile_Koslowski_0-1644244502210.png

Solution

In this case, the qText parameter is required as the value to make selections. Go to the Add Selection To Report block, make sure to specify the same field name as the one used in the List Values Of Field block, and enable the "Raw input" mode:

Emile_Koslowski_1-1644334586940.png

 

Remove the square brackets from the input field and click it to select the "Output from List Values Of Field" as the input for the Values input field:

Emile_Koslowski_0-1644334522980.png

 

This will take you to the output of the List Values Of Field block and then click the qText parameter. And choose "Select all qText(s) from list ListValuesOfField" in the next screen.

Emile_Koslowski_4-1644245182696.png

 

That's it! When the automation now runs, a list of strings is mapped as the value for this selection. You can verify this by toggling the view mode in the automation's chronological output view:

Emile_Koslowski_3-1644334923683.png

 

If you want to use multiple selections for this report, add additional Add Selection To Report or Add Selection To Sheet blocks.

The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.

Related Content

Reporting tutorial

How to send a bursted report in Qlik Application Automation

Labels (2)
Comments
adamhughes_ometis
Partner - Contributor II
Partner - Contributor II

Hi @Emile_Koslowski ,

Is it possible to do similar to this but using an input block and variable instead of a list values block? I have a multi-select input which I have then tried passing into either a string or list variable and then use this as the selections to add to the report but I am having no joy, the selections just do not get applied. The values are picked up ok as I use them in the report title and this correctly presents the values.

adamhughes_ometis_0-1662475286164.pngadamhughes_ometis_1-1662475328350.png

Using either of the options here in the add selection block do not seem to work

adamhughes_ometis_2-1662475456907.png

Any thoughts?

Thanks

 

Emile_Koslowski
Employee
Employee

Hi Adam,

It's hard to say what's could be going wrong here from the screenshots alone.
So I've built a basic automation that grabs values from the multi-select as an example, please share your automation if the example doesn't help. (It looks like I can't attach it to this comment so I'll send it to you via private message)

Emile_Koslowski_4-1662724309584.pngEmile_Koslowski_5-1662724332853.png

Emile_Koslowski_6-1662724348894.png

 

 

On another note, is the CalendarFinancialPeriodNumber in your app an autoCalendar field? I'm asking because these fields have both a textual and a numeric value. If you want to apply a selection on them, you need to specify the numeric value. A tip here is to first try to build an example Values array in the Add Selection To Report block by using the "+ Add Value" button in combination with the "Do Lookup" functionality:

Emile_Koslowski_0-1662724063311.png

 

Once you have a few values, you can toggle the 'Raw input' and this will show you what an example array should look like. See the below example for such a field from my demo app:

Emile_Koslowski_3-1662724167255.png

 

Emile_Koslowski_2-1662724154592.png

 

Kind regards,
Emile

 

 

QFabian
Specialist III
Specialist III

Hi @Emile_Koslowski @adamhughes_ometis , thanks for this article, exactly what i was looking for

Marketa_K
Contributor
Contributor

Hi @Emile_Koslowski ,

would it be possible to share the same automation with me as well? I'm also having trouble applying variable values to the Add selections block and I'm looking for pointers.

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @Marketa_K I am looking to get this template for you. Would you be okay with me sending it by email once I have it? 

all the best,
Sonja 

Marketa_K
Contributor
Contributor

Hello @Sonja_Bauernfeind, thank you for getting back to me, yes that would be ok.

Posting my use case and my provisional solution in case someone starting out with QAAs finds it helpful.

I was trying to pass a list of values as a filter from an Excel file. I wanted to pass these values to a variable first and then apply this variable to the Add selection to report block.

I didn't manage to find the correct formatting for this yet, so my solution for now is to skip using the variable and pass the values directly in this manner:
Excel with multiple values of a field - use format: "country"

Marketa_K_0-1698313438614.png
In the Add selections block, toggle to raw input and put the output from List Rows with Headers in [ ]:

Marketa_K_1-1698313551891.png

 

Hospitalresidencial
Contributor
Contributor

Ola boa tarde, estou conseguindo fazer um filtro de valro, mas gostaria de usar uma função que sempre retornasse o mes atual. tipo monthname(today()) 
tem uma ideia de como adicionar esse filtro?

Sonja_Bauernfeind
Digital Support
Digital Support

Hello!

Please post your request directly in our Analytics App Development forum, where our active support agents and your Qlik peers are able to assist you directly.

Automated Translation:

Publique sua solicitação diretamente em nosso fórum de desenvolvimento de aplicativos de análise, onde nossos agentes de suporte ativos e seus colegas da Qlik poderão ajudá-lo diretamente.

All the best,
Sonja 

Version history
Last update:
‎2022-05-10 01:34 PM
Updated by: