Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Loop and Reduce will remove an app's section access that was defined through the load script. Offline usage needs to be enabled in your tenant's management console in order to use the Loop And Reduce block on an app outside a personal space. More information on offline usage.
See How to Loop and Reduce with always one selected value fields if your app contains always one selected value fields.
This article explains how a loop and reduce operation can be performed on a Qlik Sense app by using Qlik Application Automation. It covers two examples, in the first one, the reloaded apps will be (re)published to one space. In the second example, each reduced app will be (re)published to a separate space.
This article covers two advanced examples, a more basic example can be found here .
The source app used in this article can be downloaded here.
Attached to this article are 2 files of the exported automations used in this article. More information on importing automations can be found here.
In this example, all reduced apps will be (re)published to the same space.
Create a new automation and follow these steps to perform a loop and reduce action on a Qlik Cloud app:
An example of a completed automation:
Attached example file: loop_and_reduce_to_same_space.json
In this example, each reduced app will be published to a different space. We'll use the Insurance Claims app and the automation for the first example again. Since this app reduces on the field CountryName, we'll start by creating a managed space for each unique value that's found for CountryName.
Next is to create a mapping for each unique reduction value and the corresponding space's id. There are multiple ways to achieve this. In this example, this mapping is stored in a JSON list of objects with the keys reduction_value and space_id. Feel free to use an automation to create the managed spaces and build this list.
Example:
[
{
"reduction_value": "Scotland",
"space_id": "6138a3062c1054d8158c189a"
},
{
"reduction_value": "Northern Ireland",
"space_id": "6138a318faed485d36ae911f"
},
{
"reduction_value": "England",
"space_id": "6138a337faed485d36ae9126"
},
{
"reduction_value": "Wales",
"space_id": "6138a33f98b0d0bf7e719dfb"
},
{
"reduction_value": "Guernsey",
"space_id": "6138a349faed485d36ae912b"
},
{
"reduction_value": "Isle of Man",
"space_id": "6138a35aba392246d331e611"
},
{
"reduction_value": "Jersey",
"space_id": "6138a3653ec592fe53a8d55b"
}
]
The next step is to store the mapping in the automation. Execute the following steps to do this:
Attached example file: loop_and_reduce_to_mulitple_spaces.json
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.