Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
edwin
Master II
Master II

destroy session for variable api

hi
i have a mashup that looks up the value of a variable using the variable.getcontent method.  i noticed that the call back is running multiple times  - pretty much like the hypercube callback.  is there a way to kill a session created by this method?  similar to the destroysession for a hypercube?

 

 

app.variable.getContent(<variablenamehere>).then(
variableContent=>{
console.log('VARIABLE', variableContent.qContent.qString)

 

 



my current work around is to create a hypercube with the variable as a measure i am then able to destroy the session.  however, i would prefer to keep it simple and get the variable instead.

has anyone found a way to get over this?

thanks,
edwin

Labels (1)
  • API

1 Solution

Accepted Solutions
alex_colombo
Employee
Employee

Hi @edwin, this sounds strange for me. getContent callback should run once, as soon as the response is ready. I suggest to check your code in order to understand who is triggering getContent method.
I tested to apply multiple selections and variable callback didn't fire.

View solution in original post

2 Replies
alex_colombo
Employee
Employee

Hi @edwin, this sounds strange for me. getContent callback should run once, as soon as the response is ready. I suggest to check your code in order to understand who is triggering getContent method.
I tested to apply multiple selections and variable callback didn't fire.

edwin
Master II
Master II
Author

thanks Alex for the response.  i will definitely revert and do more testing.  for now it is working great as a hypercube though it is definitely cluncky.