- 11 Dec 2024
- 12 Minutes to read
- Print
- DarkLight
Remote Execution in Qlik Cloud
- Updated on 11 Dec 2024
- 12 Minutes to read
- Print
- DarkLight
Intro
In Qlik Cloud, you can create a shareable link via OAuth, user credentials, or Qlik JWT authentication to trigger ancoreShare report generation remotely. This link can be used for manual access or integrated with automation tools like Qlik Application Automation, Microsoft Power Automate, or with any other application like for example the Windows Scheduler, enabling scheduled or automated report execution.
Automation: Triggering vs. Sharing
It's important to distinguish between these two functionalities in automations like Qlik Application Automation (QAA):
- Automate Triggering or Executing a Report: This option allows you to remotely initiate report generation to create new report files and is covered in this article. Because this process uses ancoreSoft Azure services, it requires a specific license or service level.
- Automate Sharing Generated Report Files: Once a report file has been created, whether through an automation or any other form of execution, a separate QAA flow can be set up to distribute or share the generated file(s). This sharing process does not require the same additional license or service level as the remote execution and is explained in a separate article here.
While these two functionalities can work together for full automation of report creation and distribution, they must be set up independently within automation flows, where different tools and options can also be combined.
With this distinction clarified, the next section explains how to create a shareable link for remotely triggering an ancoreShare report in Qlik Cloud, outlined step by step.
Access Link Window
To start creating a shareable link, click the button with the link symbol in the action bar. This opens the configuration window, where you can specify all settings for the link. | |
Note The link generated at the end of this process contains all the settings configured during creation. If you need to adjust these settings later, you will need to generate a new link and update it wherever the previous link was used. Step 1 - CredentialsThe Credentials tab is the first step in creating the shareable link. Here, you configure the authentication method and related settings to ensure secure access to the report. The following fields and options are available:
Once all the fields are completed, click Next to proceed with Verification. IDP ProviderThe IDP Provider field lets you configure the authentication method for the shareable link. There are currently two options, with a third (OAuth) coming soon: (A) Qlik Login and PasswordThis option uses a Qlik user’s email and password for authentication. Best Practice For better security and streamlined management, use a dedicated report user account instead of personal credentials. This approach ensures that report generation remains independent of individual users and supports consistent automated processes. | |
(B) JWT (JSON Web Token)JWT is the preferred authentication method in environments where it is set up, offering greater security and convenience compared to using credentials with a password. Once JWT is configured in the environment, it becomes the default IDP Provider, simplifying the process for users. | |
After the initial setup, the authentication details are applied automatically when creating a remote execution link, reducing user effort and ensuring a secure connection. While OAuth will provide an even more flexible option in the future, JWT remains an excellent choice for secure and efficient report execution. To configure or update the JWT setup:
(C) OAuth (Coming Soon)An upcoming option will allow for more flexible and secure authentication through OAuth. Details will be added when this feature becomes available. VerificationOnce all the fields in the Credentials tab are completed, click Next to verify your credentials. Before moving to the next tab, a verification email is sent to the address specified in the Qlik Login field (a notification will appear in the top-right corner of the screen confirming that the verification email has been sent successfully). Simply check your inbox (and spam folder if necessary), enter the verification code in the pop-up window, and click Verify. Once the verification is successful, the system will automatically proceed to the next tab Options. Step 2 - OptionsIn the Options tab, you can configure specific settings for how the report will be executed when the link is triggered. The following fields are available:
Once all options are configured, click Next to proceed to the Execution Link tab. SelectionsThe Selections field allows you to define specific Qlik field selections to apply when the report is executed. This can save time and provide flexibility in defining or modifying selections for the report. Best Practice Any selections made in the app at the time you start creating the link will be automatically pre-populated in the Selections field. This approach saves time, minimizes errors, and ensures accurate notation. It’s recommended to make your selections in the app before starting the link creation process. Editing Selections in the URLThe selections defined during the link creation process will be clearly visible in the generated URL. While this allows pro users to modify or update selections directly in the URL without recreating the link, caution is required to avoid mistakes in the string’s notation. This visibility also enables other programs, such as Qlik Application Automation (QAA), to dynamically replace or adjust the selection string for complex use cases, such as loops or conditional selections. Tip Selections can be dynamically configured in Qlik Application Automation (QAA). This enables advanced use cases such as creating loops, applying conditional selections, or generating multiple reports with varying criteria - all from the same base link. Selection NotationFor advanced users, the selection string follows a specific format:
In the URL, a space is represented by "%20". When selections are made before starting the link creation process, all spaces will automatically be replaced with %20 in the string. In most contexts, such as the Selections field in the link creation window or the parameter box in Qlik Application Automation, it’s not necessary to replace spaces manually, as this conversion happens automatically during execution. However, if the URL is edited directly, it’s strongly recommended to replace spaces with %20 to ensure browsers interpret it correctly as a URL. Otherwise the browser might redirect to a search engine instead of calling the link. Here’s an example of a selection string:
This string applies the selection of "Bagels", "Eggs" and "Jelly" from the Qlik field "Product Sub Group Desc", as well as "Central" and "Western" from the "Region Name" field. Step 3 - Execution LinkIn the final step, the generated execution link is displayed based on the settings and options configured in the previous steps. This link is now ready to be used for triggering the report remotely. Make sure to copy it before closing the window. | |
| |
For QAA users, the Copy Qlik Automation Blocks to Clipboard button generates a preset of automation blocks to simplify integration. See the next section for detailed guidance on using this feature. Once the link is ready, you can close the window. Ensure you have copied the link or the QAA blocks first, as this section will no longer be accessible once the window is closed. If needed again, the process must be restarted from Step 1, including re-verification and all settings. |
Qlik Application AutomationNote This section focuses on automating the triggering and execution of reports. To automate the distribution of already generated report files, consult the relevant documentation. By integrating ancoreShare with QAA, you can create sophisticated workflows that automate report generation and distribution, enhancing efficiency and responsiveness in your reporting processes. |
To integrate the generated ancoreShare report execution link into Qlik Application Automation (QAA) to remotely trigger your report, follow these steps:
- Copy the Prepared QAA Blocks: In Step 3 of the link creation window, click the Copy Qlik Automation Blocks to Clipboard button. This action copies a pre-configured automation block tailored for your report execution, including all preset parameters.
- Access Qlik Application Automation: Navigate to "Automations" in Qlik Cloud main menu either via "Analytics" or "Data Integration" (see image on the right). Here, you can create a new automation or open an existing one. If you don't see those options, your Qlik user might not have sufficient access rights.
- Paste the Copied Blocks: Within the automation editor, right-click on the canvas and select Paste block(s). The pre-configured block will appear on the canvas. Position it appropriately within your automation flow. (See image below for reference.)
- Configure Block Parameters: Select the newly added block to view their parameters in the properties panel. You can modify settings such as export type and selections or for dynamic scenarios, consider using variables or expressions for example to handle selections loops.
For comprehensive guidance on building and managing automations, refer to Qlik's official documentation: Qlik Application Automation
For even greater automation possibilities, you can combine this step with configuring automated deployment of the exported reports. This involves setting up a second automation in QAA dedicated to sharing or distributing the generated files. For detailed instructions, see the Qlik Automations article under the Sharing Reports section.
QAA Example: Looping Through Selection Values
This example demonstrates how to use Qlik Application Automation (QAA) to loop through selection values in a Qlik field and trigger an ancoreShare report for each value. In this case, the automation will loop through all sales representatives of the Qlik demo app Consumer Sales whose names begin with "A" and execute the report for each selection.
1. Select Field Values By Query
| |
2. List Dimension Values
| |
3. ancore Share Report Execution
| |
4. Running the Automation
|
Next Steps
- Learn details about Export Formats
- Explore Sharing and Deployment of your reports
- Discover the free add-on ancoreScript for next level app customization