Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

CapVentis Dimension List (Cycle Group) not working

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?

1 Solution

Accepted Solutions
ErikWetterberg

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

View solution in original post

4 Replies
robert_mika
Master III
Master III

Post your app here.

What is the problem wit the second app?

Anonymous
Not applicable
Author

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?

ErikWetterberg

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

ErikWetterberg

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