Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I able to use Qlik's C# App traverser to drill down into standard chart objects like tables and bar charts to obtain and update measure definitions via the objects' HyperCubeDef. I'm using an approach similar to the one mentioned here.
However, I'm not able to do this for an extension like Simple KPI. This is because I'm not able to cast the GenericObject to a standard chart type.
Is there a way to access and update the measures that make up a Simple KPI using the Engine API? If so, could you advise me on how to do this using the .NET SDK.
The easiest way is to access the hypercube through the generic get and set methods of the AbstractStructure class. This example illustrates how to work with hyper cubes in the SDK:
https://github.com/kolsrud/qlik-dot-net-sdk-hypercube-usage
This line shows how to get the cube definition:
And this shows how to set it:
The easiest way is to access the hypercube through the generic get and set methods of the AbstractStructure class. This example illustrates how to work with hyper cubes in the SDK:
https://github.com/kolsrud/qlik-dot-net-sdk-hypercube-usage
This line shows how to get the cube definition:
And this shows how to set it:
Thanks, Yko, works like a charm!
For anyone who's interested, the key line that allowed me to drill into the hypercube for a nonstandard generic object was line 79 in this file:
var theHyperCube = theObject.Properties.Get<HyperCubeDef>("qHyperCubeDef");