Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sort dimension by extension?

Hello,

how can I sort dynamicly a dimension by an extension?

I define the dimension in definition.xml:

...

<Dimension  Initial=""/>

  <Initiate Name="Chart.Dimension.1.Field" Value="AdvertiserPageNumber" />

...

I tried this code in the extension:

Qva.AddExtension(name, function(){

    var

          me = this,

          $this = $(this.Element),

          $btn = $('<div/>')

                         .text('sort')

                         .click(function(){

                              me.Layout.SetProperty('Chart.Dimension.1.Sort.PrimarySort.Use', '0', false);

                              me.Layout.SetProperty('Chart.Dimension.1.Sort.PrimarySort', '3', false);

                              me.Layout.SetProperty('Chart.Dimension.1.Sort.PrimarySortOrder', '1', true);

          });

     $this.append($btn);

});


If I start the application in the web view and press the button, nothing happends. The annonym function is called and no data is sorted. I hope you can helf me.

Regards

Heinz Beck



Labels (1)
0 Replies