Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I've been having an issue for an extension I'm implementing, the issue is the following:
The problem:
When I do the initial fetch the returned Cube contains the appropriate dimension/s and measure/s but once you add another measure or dimension from the properties panel they appear in the qDimensionInfo and qMeasureInfo arrays but within the matrix I still see the same amount of initial dimensions, technically the cube is only updated partially (I believe).
My Question:
With that said my question is, how do I get the HyperCube updated properly?, so every time I add a new dimension or expression through the properties panel its shown within the Cubes Matrix, do I have to use the backendApi for that or is there another approach?
If you create your extension with high qWidth from the beginning it will work as you want. If you initially created it with a low qWidth (and your problem description sounds like it) there is no easy way to change it.
Have you tried this? Might be that you have another problem.
Erik Wetterberg
Hi
Check the qWidth parameter in qInitialDataFetch. You can actually set it pretty high, to the maximum number of columns you will ever have in most cases.
Also remember that since it is in initialProperties, you need to recreate the extension object for your changes to have effect.
Erik Wetterberg
Hi and thank you for your response but at the moment I only have 1 dimension and 1 expression in the extension and added a couple more through the properties panel, the qWidth is set to 10 and the max dimensions and measures is 10, so i don't understand whats going on.
And you have recreated the extension object? If you increase qWidth in the code it will have no effect on already existing charts, it will only affect new ones you create after that.
Erik Wetterberg
And how do I go about doing that programmatically?
Programatically is pretty complicated. But drag your extension to a sheet and you will get a new chart. In most cases you can also convert it to itself, by dropping your extension on your already existing chart.
Erik Wetterberg
But that is not what I want, I want the object to be updated without the hassle of having to do that, so the hypercube has to be updated once the measures/dimensions are added through the properties panel. is this not possible?
If you create your extension with high qWidth from the beginning it will work as you want. If you initially created it with a low qWidth (and your problem description sounds like it) there is no easy way to change it.
Have you tried this? Might be that you have another problem.
Erik Wetterberg
So funny,
I had exactly this same problem today.
In my case, it had something to do with the qWidth and qHeight (as erik.wetterberg mentioned). I had used 10 as qWidth and 10,000 as qHeight, so the total possible number of cells was 100,000. Apparently, 10,000 is the limit for cells. Now, the data I was testing with didn't actually have over 10,000 cells, but it still seemed to make Qlik . I reduced qHeight to 1000 and it seemed like Qlk was .
As Erik also mentioned (he answers all my questions, by the way), changing the source code for initial properties doesn't seem to have an effect on the original Qlik object, you have to delete it and recreate. But, if you are creating a new extension, such things should be expected.
Good luck.
It turns out you were right, I did not realise that the qWidth has to be higher, thank you.