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: 
noa_elharrar
Contributor
Contributor

Backend Api undefined

Hello, I try to develop an extention for qlik sense. I would want to use the Backend Api but I get this message: 

Uncaught TypeError: Cannot read property 'selectValues' of undefined

  node

                .on("click", function(d){

                    this.backendApi.selectValues(0,[1,2],true);

                });

Where's my mistake?

Thank you!

thank you!!

Labels (2)
1 Reply
Christopher_prem


"this"-  in your code refers to the element for which you have bound the click event.

The Backend API is available for extension developers as this.backend API, in order to have the backend API to work you should use "this" which is referring/points to the extension itself 

Example

var self = this;
// referring to the extension itself  & should be declared within the paint method

$element.on('click',function(){
   var value =[1,2];
   self.backendApi.selectValues(0, value,true);

});