david lopez
david lopez

Reputation: 405

Qlikview selections from an extension

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

Answers (1)

i_saw_drones
i_saw_drones

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:

  • column (integer): the column number to filter
  • toggle (boolean): if true, existing selections will be kept
  • recordsToSelect: Can either be an array or a simple list of parameters.

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

Related Questions