Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

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

1 Reply
ErikWetterberg

Hi,

You can get some limited support for selecting text with css user-select user-select - CSS | MDN

By default Qlik Sense turns off user-select. But be careful, sometimes it has unwanted side effects.

Erik Wetterberg