Qlik Community

Qlik Sense Integration, Extensions, & APIs

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

robert_cazaciuc
New Contributor II

Conditional dimension in hypercubes (Capability API)

Hello,

I have a hypercube that uses a conditional statement on a dimension:

=if(ProjectName = vSelectedProjectName, ProjectName)

I have created a callback function that listens to changes in the hypercube but unfortunately, it doesn't get triggered when the variable vSelectedProjectName changes. I have however, discovered that if I add the variable as a standalone expression into the hypercube, any changes in the variable will trigger the callback function.

However, and most importantly, the returned hypercube contains the updated variable vSelectedProjectName but NO UPDATED dimension. The dimensions returned are based on the very first evaluation of the expression and whatever value vSelectedProjectName had when it was created for the very first time.

Does anyone know a workaround for this? I must mention that using a filter selection is not currently an option for the data arragement that we have - we don't want to add ignore statements for all of our expressions.


Please see the full hypercube attached.


I am using this function to write to variables

selectedApp.variable.setStringValue(varName, varValue);

Tags (1)
1 Reply
erik_wetterberg
Honored Contributor

Re: Conditional dimension in hypercubes (Capability API)

Hi,

Try adding $() around your variabler in the expression https://help.qlik.com/en-US/sense/3.2/Subsystems/Hub/Content/Scripting/dollar-sign-expansion-using-v...

Erik

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