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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
siddheshr
Contributor
Contributor

How To Set Value of Qlik Sense Variable From an Extension

Hi,

I'm new to Qlik Sense Extension development and I'm trying to create a simple extension which would take user input from a textarea and save it to the sense app variable on click of a button on the extension.

"

var commentValue;

commentValue = $.trim($("#commentBox").val());

app.variable.setStringValue('vCommentValue',commentValue).then(function(){

                               commentValue = $.trim($("#commentBox").val());

                              });

app.variable.setStringValue('vMYVAR','=(1+1)');
"

 

I can see the text from the textarea is available in the  var commentValue of the JS but the variable in the qlik sense is not being updated with the same , I don't see any error though during execution.

 

Can you please help understand why the "variable.setStringValue" is not working as expected.

Labels (2)
2 Replies
TJO235
Partner - Contributor II
Partner - Contributor II

Hi, 

 

Qlik has that functionality with the 'Variable Input' extension under the Qlik dashboard bundle that comes with Qlik

AronC
Partner - Creator II
Partner - Creator II

@siddheshr 

Hi, trying to solve same problem. In the extension in the dashboard bundle there is only an input-box. I need a textarea as you also were trying to accomplish.

Did you manage to solve it?

Cheers Aron