Tuesday 17 March 2015

Simpliest Extension Object

A QlikView Extension allows you to visualize your data the way you want to see it.

Let's create brand new Extension Object.
First of all we need to find the folder where QlikView's extensions are placed in.
In my computer path is C:\Users\<user_name>\AppData\Local\QlikTech\QlikView\Extensions\Objects\QlikView\Examples\

 I suggest create a new subfolder inside of Examples folder to store our extension objects (e.g. RusGon).
inside of RusGon we create a new folder SimpliestExtObj. It will be new Extension Object. Inside of this folder shoul be following files:
Definition.xml
Icon.png
Script.js
Definition.xml
<?xml version="1.0" encoding="utf-8"?>
<ExtensionObject Label="SimpliestExtObj" Description="description of SimpliestExtObj" PageHeight="100000">
  <Dimension Label="Dimension1_RS" Initial="State" DropTarget="State"/>
  <Initiate Name="Caption.Text" Value="Caption of SimpliestExtObj" />
</ExtensionObject>
Script.js
 Qva.LoadScript('http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js', function() {  
          Qva.AddExtension('QlikView/Examples/RusGon/SimpliestExtObj', function(){  
                   //Begin extension code.  
                        this.Element.innerHTML =
                        "<HTML><BODY> "+
               
                        "</BODY></HTML>";      

                        $(document).ready(function(){
                                                       
                        });                                                    
          });  
 });
Skeleton of SimpliestExtObj you may download at GoogleDrive

Now the time to see our SimpliestExtObj in work. 
Open QlikView and Turn on WebView

 Choose New Sheet Obect

Under Extension Obects node we see our SimpliestExtObj. Drag it and drop at sheet

Congratulations! New extension object has been created!

No comments:

Post a Comment