Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
i want to get application ID by name to perform a binary reload.
How to do this on script in qlik cloud ?
Reagrds,
Sophie
You will be able to find the id by name via the Administration area in Qlik Cloud.
Navigate to https://your-qlik-cloud-tenant/admin/content/apps
There you will find the list of app names and their IDs listed.
Hi @Sophie_,
You won't be able to do that programmatically in your Load Script since the BINARY statement must be the very first line of your Load Script.
However, you can do a workaround for this problem. It requires a few steps and knowledge on Qlik Cloud REST APIs.
These are the steps:
1. Create a new Qlik Application. This one will be the application that will have the BINARY Statement.
2. Open the Load Script and add the following lines:
CONSTRAINT vBinaryAppId = {"type":"text"};
SET vBinaryAppId = 'dummyvalue';
3. Reload the application
4. Delete the COSTRAINT and SET lines from the Step #2 and add the following line
BINARY [$(vBinaryAppId)];
Perfect, now you have your Qlik Application ready to receive App IDs dynamically. And how can you do that? You need to use Qlik Cloud POST Rest API, this is the only way: Reloads REST | Qlik Developer Portal. There is a new feature in this endpoint that you can pass to your Load Script variable values.
There are multiple ways to do that. In my example, I have used Postman:
Note that appId is the application I have created on Step #1. The value assigned on the vBinaryAppId, on the line 5, is the app that I would like to binary load.
Ok, great. Now you can start mixing things. Like, you could use Qlik Automate to request an App Name, and from the App Name, you can find the App ID and then call the Reload POST Command with the AppID.
You could create REST API Connections and do the same process in your Load Script - one app calling another app reload.
Please let us know what makes most sense to you and we can help you to implement the solution step-by-step.
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com