Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
May 10, 2022 1:34:28 PM
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.
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:
And this is what the example output of the List Values Of Field block looks like:
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:
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:
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.
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:
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.
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.
Using either of the options here in the add selection block do not seem to work
Any thoughts?
Thanks
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)
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:
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:
Kind regards,
Emile
Hi @Emile_Koslowski @adamhughes_ometis , thanks for this article, exactly what i was looking for
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.
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
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"
In the Add selections block, toggle to raw input and put the output from List Rows with Headers in [ ]:
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?
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