Qlik Community

QlikView Extensions

Discussion Board for collaboration on QlikView Extensions.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

ahmednuaman
Not applicable

Reducing data before it reaches an extension

Hi all,

So I have a simple extension I've written and tested with limited data (about 500 rows). Now I need to run it in a QVW file with about 150k rows. I'm wonder if there's a way that the row data can be reduced before it reaches the extension. And then if the extension can alter the script to display different sets of data, for example:

Given I have a set of data with columns are:

A, B, C, D, E, F

And let's say that I have 150k rows in this fashion, I want to say "Ok Qlikview, when the extension loads for the first time only give it rows where E == null". Then, in the extension I want the ability to change that query, almost bind a variable to the query so that should the user press a button, the variable could be set to "foo" so that the query would be "E == $variable", for example.

Does that make sense? Is that possible? How else can extensions handle large amounts of data without crashing?

Thanks again.

6 Replies
adamdavi3s
Not applicable

Re: Reducing data before it reaches an extension

The ability for it to handle data depends on how the script has been written really, but they're not the best at handling massive loads in the way that Qlik does

You can read variables in JS, there are a view threads on it and here is one:

Get value of QV variable to use in JavaScript

So you should be able to set up what you want easily enough

ahmednuaman
Not applicable

Re: Reducing data before it reaches an extension

Yep, reading is fine, the problem is that `this.Data.Rows` array has over 150k object items and this causes Qlik to crash. I'm wondering if I can limit the data before it's passed to the JS the `this.Data` object.

adamdavi3s
Not applicable

Re: Reducing data before it reaches an extension

sorry with you now, can you read from an object instead?

Not something I have done but I was sure you could do that, so rather than read from raw data you can read from a pre-filtered object.

However, can you not restrict the data going to it using a variable in the dimension / expression definition when you set the object up? When the user changes the variable then it sends the data...

ahmednuaman
Not applicable

Re: Reducing data before it reaches an extension

Thanks Adam. Yep, I'm using dimensions, but I can't figure out this expression part. Essentially I want to say "when this plugin is loaded for the first time, then run this expression", then when the user begins to interactive with the plugin I want to update that expression on the fly. Just unsure how.

I have looked at using `this.Data.SelectValuesInColumn` but again because the plugin is loaded with 150k rows it just crashes.

adamdavi3s
Not applicable

Re: Reducing data before it reaches an extension

Hmmm I can't see how that is possible really... other than giving the user a button to click to 'activate' the extension.

Or maybe adding a click event to the extension?

Either way with that amount of data you might struggle

websy1985
Not applicable

Re: Reducing data before it reaches an extension

You could use the paging mechanism that extensions provide. Set the PageHeight property in your Definition.xml to something more manageable and then call for more data as required. It won't give you the ability to download specific sets of data but it will at least give you more control over how your 150k rows are downloaded to the client.