Skip to main content

How to: Loop and reduce with Qlik Application Automation (basic)

No ratings
Showing results for 
Search instead for 
Did you mean: 

How to: Loop and reduce with Qlik Application Automation (basic)

Last Update:

Dec 6, 2022 6:00:05 AM

Updated By:


Created date:

Sep 10, 2021 5:16:03 AM


Note: 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 this article if your app contains always one selected value fields.

This article explains how a basic loop and reduce operation can be performed on a Qlik Sense app by using Qlik Application Automation. 

A more advanced example can be found here

The source app used in this article can be downloaded here

Attached to this article is a file of the exported automation used in this article. More information on importing automations can be found here.

Loop and reduce + (re)publish to managed space

Create a new automation and follow these steps to perform a loop and reduce action on a QCS app:

  1. Go to the Qlik Cloud Services connector and search for the block "Loop And Reduce". Drag this block inside the automation editor.
  2. Specify the id for the app that should be used as a source app. The reduction will be performed on this app. Next, specify the field name over which the loop should run, for each unique value of the specified field name, a reduced app will be created. In this example, CountryName will be used as the reduction value.



  3. The reduced apps are stored on the Temporary File services. The Loop And Reduce block will return a list of file ids together with the unique value of the reduction field and a list of sheet ids for the sheets that were public on the source app.
  4. The next step is to import the reduced apps and publish them to a managed space. In this basic example, this is done by one block: "Publish Reduced App To Managed Space". If you want to know what's happening inside this block, visit this article for an advanced example on loop and reduce.
  5. Search for the block "Publish Reduced App To Managed Space" and drag it inside the loop created by the Loop And Reduce block.
  6. Apply the following mapping in the publish block:
    1. Exported App Id -> the "exportId" from each item in the list.


    2. Name -> specify a name for the reduced app. Use the "reduced_value" from each item in the list to create distinct app names. 


    3. Public Sheets ->  the "publicSheets" from each item in the list. 


    4. Space Id -> id for the managed space to which the reduced app should be (re)published.


  7. Click run to execute the integration.

Below is an image of the full example. A JSON export of this example is attached to this article as loop_and_reduce_basic.json.





Labels (2)
Partner - Contributor III
Partner - Contributor III

Thanks a lot for this article!

I have two "problems" when using this block:
- the application on which we want to do the "Loop and reduce" must be in my personal space, otherwise it doesn't work
- a favorite is created in the application for each loop
Is this normal?



Version history
Last update:
‎2022-12-06 06:00 AM
Updated by: