6 Replies Latest reply: Dec 15, 2016 11:18 AM by Alexander Karlsson RSS

    Get data from table or chart

    Sergey Biryuzov

      Hi all!

      I'm new with qlik sense and it's API.

      I've made extension which paints button. We have table with manages and another table with their results. After selecting manager content of the second tables filled with his results. How can I reach this data in my extension after clicking button?

      define(["jquery", "qlik", "text!./lib/css/CommandButton2.css"], function($, qlik, cssContent) {

        $("<style>").html(cssContent).appendTo("head");

          return {

           paint: function ($element, layout) {

             // Display Extension Visualization
             var html = html = '<button id="modal-open2" class="btn btn-primary">Work</button>';

            $element.html(html);

          

             // Open modal
             $("#modal-open2").on('click', function(){

               alert('ok');

               console.log('Data returned: ', layout.qMadeSelections);

               // Do some job
               return false;

             })

          }

        }

      });