Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
All,
Is there any way to determine the version of Qlik Sense in which the extension is running BEFORE the define statement in the main.js file? I am asking because I am using a file that has a different path depending on the version of Qlik Sense.
I am looking for something like this:
if(qlik.currVersion() = "2.0") { mPath = "path1"} else { mPath = "path2"};
define([mPath], function (mName) { })
Thanks in advance,
Kind regards
Gregory
Vincenzo,
Thanks for your answer. It seems a feasible way, but in the meantime I've implemented the following solution:
At the top of the paint function:
require(["core.utils/theme"], function (Theme) {
Main(self, Theme);
}, function (err) {
require(["text!themes/old/sense/theme.json"], function (Theme) {
Theme = JSON.parse(Theme);
Main(self, Theme);
});
});
All other code in the paint function is placed in the Main function.
Kind regards
Gregory
You can use the Engine API.
Have a look here
You can benefit from this wrapper
Vincenzo,
Thanks for your answer. It seems a feasible way, but in the meantime I've implemented the following solution:
At the top of the paint function:
require(["core.utils/theme"], function (Theme) {
Main(self, Theme);
}, function (err) {
require(["text!themes/old/sense/theme.json"], function (Theme) {
Theme = JSON.parse(Theme);
Main(self, Theme);
});
});
All other code in the paint function is placed in the Main function.
Kind regards
Gregory