1 Reply Latest reply: Mar 17, 2018 3:11 AM by Erik Wetterberg RSS

    Selection and Copy of Cell/Table (included in mashup)

    Ricardo Sousa

      Hi all

      Believe this issue is somehow "old", but I didnt found an answer... also couldnt found the issue I'm facing exactly explained in the exact terms...

       

      QlikSense (ServerEdition)

       

      2 scenarios:

       

      Scenario 1 (not ideal, but aceptable) -- select and copy a specifc table included in one container (mashup)

      By default, each cell of table is a point of selection/filter... hence the behaviour after click action (of drag over) doesnt allow selection (and then right click windows menu with normal options).

       

      My first attempt to reach some solution was to disable the SELECTION (filter action) behaviour by edit java module

      app.getObject('QV-A-01','kGDdR',{noSelections: true, noInteraction: false});


      This disables the filter action (click action over table/cells) don't work; OK


      Now I thought (before I get scenario 2 solution) ... let's call the entire table as an object and place the content (as text) in clipboard

      For that, created a function (on Java module)


      function myFunction() {

        var copyText = document.getElementById('QV-A-01",'kGDdR');

        copyText.select();

        document.execCommand("Copy");

        alert("Table copies: " + copyText.value);

      }


      And then, created a button on html module (onclick, to copy) -- image below

      <button onclick="myFunction()">Copy Table</button>


      It doesnt work...

       

      Qlik_q1.PNG

       

      Scenario 2 (ideal) -- select and copy 1 cell of a specifc table.

      User will point over a specific cell (table) and context menu (mouse right click will open -- copy option available).

      Only cell text will be copied to clipboard

       

      Anyone can help...?

      Thanks in advance