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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Aryasmank
Contributor III
Contributor III

How to use input from HTML page to Qlik Sense KPI ?

 Hi all,

I have created a Qlik Sense Mashup and I have a input field in HTML with type="number". I want to show the same input number to a Qlik sense KPI object that I have embedded in HTML page .

 I have tried a lot of things , but couldn't find a proper solution .

IMG_6299.jpeg

 this is the screenshot of my web page.

IF you have anything please share.

Thanks in advance

Regards,

M

 

Labels (5)
1 Solution

Accepted Solutions
Aryasmank
Contributor III
Contributor III
Author

Hi All, Got the Solution.

 I have use Variable API to get the result .

First, created a variable in Qlik Sense app, assign a random value and then used this variable in KPI .

Then, Used app.variable.setStringContent('variable_name',value);

You can check this result using

app.variable.getContent('variable_name', function(reply){

             console.log(reply);

});

Note: setStringContent()  takes  the value as a string datatype.

For more information follow the links:

setStringContent() Method  and getContent() method .

Thanks,

M

View solution in original post

3 Replies
karthiccr
Contributor II
Contributor II

Simple embedding will not work. Create a simple mashup project and handle the logic in js.

Aryasmank
Contributor III
Contributor III
Author

Thanks for the reply @karthiccr ,

I'm working on a mashup project but having difficulty with that logic in JS .

If you have any , it will really help.

Thank you 

M

Aryasmank
Contributor III
Contributor III
Author

Hi All, Got the Solution.

 I have use Variable API to get the result .

First, created a variable in Qlik Sense app, assign a random value and then used this variable in KPI .

Then, Used app.variable.setStringContent('variable_name',value);

You can check this result using

app.variable.getContent('variable_name', function(reply){

             console.log(reply);

});

Note: setStringContent()  takes  the value as a string datatype.

For more information follow the links:

setStringContent() Method  and getContent() method .

Thanks,

M