Reputation: 405
I am writing an extension for qlikview and I want to change the qlikview current selection from the extension script, is there a possibility to do this?
Upvotes: 0
Views: 1513
Reputation: 3506
Yes, you can feed back selections to the parent document. Depending on how your extension is created and the data that feeds it, you can use the SearchColumn
, SelectValuesInColumn
or SelectTextsInColumn
API methods.
Taking the below code from one of my other answers, say we have our Data
set up as follows:
for (var rowIx = 0; rowIx < this.Data.Rows.length; rowIx++) {
var row = this.Data.Rows[rowIx];
myDimensionValue = row[0].text;
myMeasureValue = row[1].text;
}
You can then use the SelectTextsInColumn
method as follows:
this.Data.SelectTextsInColumn(column, toggle, recordsToSelect);
Where:
For the above example:
this.Data.SearchColumn(0, true, "My Selected Value", "My Second Selected Value");
More information on these methods can be found in the JS SDK available from QlikTech.
Upvotes: 2