Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
l_sakalauskiene
New Contributor II

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
erik_wetterberg
Honored Contributor

Re: CapVentis Dimension List (Cycle Group) not working

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

Erik Wetterberg
https://extendingqlik.upper88.com/
4 Replies

Re: CapVentis Dimension List (Cycle Group) not working

Post your app here.

What is the problem wit the second app?

l_sakalauskiene
New Contributor II

Re: CapVentis Dimension List (Cycle Group) not working

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?

erik_wetterberg
Honored Contributor

Re: CapVentis Dimension List (Cycle Group) not working

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

Erik Wetterberg
https://extendingqlik.upper88.com/
erik_wetterberg
Honored Contributor

Re: CapVentis Dimension List (Cycle Group) not working

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

Erik Wetterberg
https://extendingqlik.upper88.com/