Getting started creating object extensions

This section will guide you through the process of creating your first object extension.

Tip: The easiest way to get started building your object extension is to use QlikView Desktop. This section assumes that QlikView Desktop is being used.

Creating the container

Create a folder that will contain your assets. The folder should be created in the following location: \Users\<user>\AppData\Local\QlikTech\QlikView\Extensions\Objects.



Creating the Definition.xml

The next step is to create an XML file called Definition.xml. This is the main file QlikView uses to search for meta-information of the extension. In this example we only define the most basic information.

<?xml version="1.0" encoding="utf-8" ?>
<ExtensionObject  Path="SimpleHelloWorld" 
                  Label="Hello World" 
                  Description="Hello World Extension" 

The following information is set if QlikView loads this file:

  • The path (folder) of the extension is set to SimpleHelloWorld.
  • The label of the extension is set to Hello World and the description of the extension is set to Hello World Extension.
  • We have defined that it is an object extension by setting the Type attribute to "object".

Creating the main script file

Then it is time to create the main script file. This is also placed in the same folder as the Definition.xml file and we name it script.js. Paste the following code into the script file and then save it:

        function () {

            // Set the extension object's inner Html
            this.Element.innerHTML = 'Hello World';


Testing the extension

Now is a good time to test your object extension.

  1. Open QlikView Desktop.
  2. Create a new QlikView document and save it.
  3. Switch to WebView.
  4. Click somewhere on the sheet and then activate the context menu by right clicking the mouse.
  5. Select New Sheet Object.
  6. Unfold the Extension Objects panel.

    You should see the newly created extension in the list.

  7. Drag and drop the Hello World extension to the sheet.

    The extension object on the sheet should look like this:

You have now created your first QlikView object extension.