Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
I'm trying an extention CapVentis Dimension List (Cycle Group). In my firs app, he's working great. I try include this extension to my second app and he's not working absolutely. Where is the problem? Wheter the problem is with .js file?
I have forked this and made the fix. My updated version is available here:
erikwett/com.capventis.DimensionList · GitHub
Seems to solve the problem, though I have made only very basic testing.
Erik
Post your app here.
What is the problem wit the second app?
The problem is that, if I comment the line _app.variable.create(varName); in .js, the extension not create a new variable of a cyclic group, otherwise when the line _app.variable.create(varName); is not commented, I see an error message "An error occurred. A variable with this name already exists. Please choose another name.". And I have to play: when I need to create a variable, I uncomment the same line, later I have to comment that line to not throw an error. How to avoid this game?
Hi Laura,
I have had the same problem in my variable extension. The problem is that in earlier versions this error was just ignored, since the UI didn't handle variables. In 2.1 it does, but on the other hand you can now also check if the variable already exists. I did this like this:
function createVariable ( name ) {
var app = qlik.currApp();
//from 2.1: check if variable exists
if ( app.variable.getByName ) {app.variable.getByName( name ).then( function () {
//variable already exist
}, function () {//create variable
app.variable.create( name );} );
} else {
//create variable - ignore errors
app.variable.create( name );}
}
This might help in this extension too.
Erik
I have forked this and made the fix. My updated version is available here:
erikwett/com.capventis.DimensionList · GitHub
Seems to solve the problem, though I have made only very basic testing.
Erik