Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The below ia a "Visualization" extension I wrote to write a value from the window query string into a variable in an app but I can only use it as a chart - i.e. I have do drag the extension onto a sheet for it to work.
How can I use this "application wide" so it is always setting a variable on every sheet without needing to add a chart extension to a sheet?
define( [
'qlik','jquery'
],
function ( qlik ) {
var app = qlik.currApp();
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const company_id = urlParams.get('company_id');
app.variable.setStringValue('vCompanyId' , company_id);
return {
paint: function ( $element, layout ) {
$element.empty();
//..
}
};
} );
Hey @mchrenka you cannot do this wihtout putting your extension in every sheets.
An alternative could be create a backend service which open your Qlik app and put the extensions in all the available sheets, automatically, using Engine APIs.