6 Replies Latest reply: Dec 17, 2012 9:01 PM by dabaipang RSS

    Sorting in QlikView Extension Objects



      I've been trying for some time now to sort a column (Dimension data) in an extension object. The option isn't there in the (default) properties unless I change the type to Straight table, but then some functionality is lost in my object which is unacceptable.


      The column is the first one as well when loaded. It's numeric data with four digits, 1101, 1102, ... , 1112 for example.. the order right now is based on a different field, and it doesn't matter if you bring it along or not... still the same order...


      Is there anything you can write in the Definition.xml or an option in properties (if you write your own)? Has anyone had the same problem?




        • Sorting in QlikView Extension Objects
          Alexander Karlsson

          Hey Albin,


          You could add this to your script.js,

          this.Layout.SetProperty('Chart.Dimension.0.Sort.ByFrequency.Use', '1', true);


          For different sorting options check out qvprops.htm in the SDK where you will find all the extension properties.




          • Re: Sorting in QlikView Extension Objects

            I used <Initiate Name="Chart.Dimension.0.Sort.ByNumeric.Use" value="1"/>, but it is not working.

            Any ideas?

            Here is my Definition.xml


            <ExtensionObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Definition.xsd" Label="SelectionMapCAFireBug" Description="SelectionMapCAFireBug" PageHeight="20">

                      <Dimension DropTarget="1st Dimension" Initial="=PrescriberId"/>

                      <Measurement DropTarget="Measure" Initial="" />

                      <Measurement DropTarget="Measure" Initial="" />

                      <Measurement DropTarget="Measure" Initial="" />

                      <Measurement DropTarget="Measure" Initial="" />

                      <Initiate Name="Chart.Title" value="Map"/>

                      <Initiate Name="Chart.Expression.0.0.Definition" value="=Sum(Vials)"/>

                      <Initiate Name="Chart.Expression.1.0.Definition" value="=Latitude"/>

                      <Initiate Name="Chart.Expression.2.0.Definition" value="=Longitude"/>

                      <Initiate Name="Chart.Expression.3.0.Definition" value="=ZipCode"/>

                      <!-- !IMPORTANT: Set the initial size of the QV map-->

                      <Initiate Name="Layout.Normal.Width" Value="500" />

                      <Initiate Name="Chart.Dimension.0.Sort.ByNumeric.Use" value="0"/>