Getting Started
This library is used to build QlikView extensions or to build websites with QlikView Workbench. Here are some examples. These examples assume a Workbench QvObject control has been added to the web page and the "CustomInitialization" property has been set to "True". The QlikView document being opened is the "Movies Database" example document.
Example 1: Capture the event when a selection have been made in a listbox.
Example 1: Capture the event when a selection have been made in a listbox.
var doc; var lb; qvInit = function () { doc = Qv.GetCurrentDocument(); lb = doc.GetObject("LB36"); lb.SetOnUpdateComplete(listboxUpdated); } listboxUpdated = function () { var selected = this.Data.GetSelected(); //"selected" is now an array of objects alert(selected.length + " selected items"); //loop through the array for (var i = 0; i < selected.length; i++) { //get the "text" property var text = selected[i].text; } } Qv.InitWorkBench({ View: "Movies Database", BodyOnLoadFunctionNames: "qvInit" });
Example 2: Clear selections in a listbox. The function "clearSelection" must be called from your code.
var doc; var lb; qvInit = function () { doc = Qv.GetCurrentDocument(); lb = doc.GetObject("LB36"); } clearSelection = function () { lb.Data.ClearSelections(); } Qv.InitWorkBench({ View: "Movies Database", BodyOnLoadFunctionNames: "qvInit" });