Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm struggling to find an API that offers functionality for editing the data load script of a Qlik app.
I have a scenario where I have a stream of template apps that are going to be copied over to multiple customer streams. In that regard I'd like to edit the datasource, through API functionality, of each app copy, so that I can load data from the corresponding customer database.
Thanks in advance! 🙂
Regards
Jørn
For .NET it's the Qlik.Engine.App class:
-Rob
You can get and set the script using Doc.GetScript/SetScript
There are also command line utilities that can set script.
What language are you using?
-Rob
Great, thanks! I will look into this 🙂 I'm using .NET Core when communicating with the APIs.
For .NET it's the Qlik.Engine.App class:
-Rob
Hi Rob. I was curious about your statement that "There are also command line utilities that can set script". I'm working on some automation using Powershell and Qlik CLI, and am able to duplicate apps and download them as QVF files (for copying/importing into upper environments). But first I need to make changes to the load script of those duplicate apps to update the binary load statements in them, and I simply cannot figure out how to get Powershell/CLI to accomplish that. I wasn't sure if it was possible or not with those tools - so I thought I'd reach out. Any help you could give me would be appreciated. Thanks!
@Steve_Rosebrook you are likely looking to use the "app script set" command in the the cli https://qlik.dev/toolkits/qlik-cli/app/app-script-set/
the example shows using a qvs file as the new script.
Thanks @chriscammers. I should have mentioned that I'm using the Windows client-managed version of Qlik - not Qlik SaaS. Does the link you shared work for client-managed? I tried that code and it's giving me an error so I wanted to check.
The documentation says Qlik Cli supports client managed and saas deployments. I realize concepts like spaces would not be a thing in client managed but the only thing you can do is try it out.
Please let us know how it goes.
I am able to use CLI on our client-manager version of Qlik. However, I think the syntax/functions/cmdlets must be different between the SaaS version of CLI and the client-managed version. Here's the error message I get when trying to use the "qlik app script set" command:
There are two things named "Qlik-CLI".
1) Original "qlik-cli" https://github.com/ahaydon/Qlik-Cli-Windows a powershell module for client-managed. You can likely set the script on client managed using this one.
2) New qlik-cli https://qlik.dev/toolkits/qlik-cli/ for Qlik-SaaS and some client-managed functions.
-Rob