Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
exist any possible use hidden script in Qlik Sense?
Regards.
Hi,
If you use the Engine API or the .Net SDK you could obfuscate the script. By storing the script in a custom property and setting the script with an empty script. Note that when you need to reload you will have to set the script again. See code snippets how this can be done.
private void hideScript()
{
var script = ActiveApp.GetScript();
var prop = ActiveApp.GetAppProperties().As<NxAppProperties>();
prop.Set("HiddenScript", script);
ActiveApp.SetAppProperties(prop);
ActiveApp.SetScript(string.Empty);
ActiveApp.DoSave();
}
private void reloadHiddenScript()
{
var prop = ActiveApp.GetAppProperties().As<NxAppProperties>();
ActiveApp.SetScript(prop.Get<string>("HiddenScript"));
ActiveApp.DoReload();
ActiveApp.SetScript(string.Empty);
ActiveApp.DoSave();
}
private void unhideScipt()
{
var script = ActiveApp.GetScript();
var prop = ActiveApp.GetAppProperties().As<NxAppProperties>();
ActiveApp.SetScript(prop.Get<string>("HiddenScript"));
prop.Set("HiddenScript", string.Empty);
ActiveApp.SetAppProperties(prop);
ActiveApp.DoSave();
}
Best Regards
Lars-Göran Book
Hi Paulo,
Hidden script is not available in Qlik Sense, because of the nature of how the apps are created and published when using Qlik Sense Enterprise (server / online). (There is technically no reason to hide the script as access to the data load editor can be controlled with security rules and permissions)
Let me know if you need more information.
Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.
Regards,
Mike Tarallo
Qlik
Hi,
If you use the Engine API or the .Net SDK you could obfuscate the script. By storing the script in a custom property and setting the script with an empty script. Note that when you need to reload you will have to set the script again. See code snippets how this can be done.
private void hideScript()
{
var script = ActiveApp.GetScript();
var prop = ActiveApp.GetAppProperties().As<NxAppProperties>();
prop.Set("HiddenScript", script);
ActiveApp.SetAppProperties(prop);
ActiveApp.SetScript(string.Empty);
ActiveApp.DoSave();
}
private void reloadHiddenScript()
{
var prop = ActiveApp.GetAppProperties().As<NxAppProperties>();
ActiveApp.SetScript(prop.Get<string>("HiddenScript"));
ActiveApp.DoReload();
ActiveApp.SetScript(string.Empty);
ActiveApp.DoSave();
}
private void unhideScipt()
{
var script = ActiveApp.GetScript();
var prop = ActiveApp.GetAppProperties().As<NxAppProperties>();
ActiveApp.SetScript(prop.Get<string>("HiddenScript"));
prop.Set("HiddenScript", string.Empty);
ActiveApp.SetAppProperties(prop);
ActiveApp.DoSave();
}
Best Regards
Lars-Göran Book
Hi Lars,
you can give me example for this?
Regards.
Any one?
Hi Paulo,
I have posted an tool on Qlik Branch that you can use to hide scripts and reload hidden scripts.
Best regards
Lars-Göran Book
Hi Mike Tarallo
So where the security rules and permissions applied on the script at the server level. Can you please send the steps or provide the video link showing this setup.
Thanks
Regards
Sajid
Hi Sajid,
Note Lars example is for custom built apps and is not out of the box.
Out of the box, security rules are applied in the QMC. I have not recorded a video on this yet, but my colleague has - you can register for the free on demand webinar here:
Qlik Sense Security Rules: Centralized, Consistent & Accurate | Qlik
Note that rules are not really action specific and are not specific to the script / load editor - they are specific to the apps / objects and resources available to the user and roles / groups set in the rules you create. You can have a user have access to an app and create chart objects, but not access to the script etc.
Also check out the online help: http://help.qlik.com/sense/2.0/en-US/online/#../Subsystems/ManagementConsole/Content/design-access-c...
Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.
Regards,
Mike Tarallo
Qlik
Hi,
Can any one explain me the procedure to use above script.
Regards,
Vinod Gadiputi
Hi Lars-Göran Book,
Can you help me explain how it works
Please can you contact me via email: dongocduyen113@gmail.com
Best regards
Ngoc Duyen,