Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone
I'm writing a Visualization Extension for QlikSense, and I'm trying to add a custom expression to a measure so it will be evaluated for each row. As a guide, I'm using the example from the accepted answer here: Qliksense custom measure property for extension with expression value
Here's my definition:
definition : {
type : "items",
component : "accordion",
items : {
dimensions : {
uses : "dimensions",
min : 1
},
measures : {
uses : "measures",
min : 1,
items: {
VisibilityExpressionProperty : {
type: "string",
label: "Column visibility condition",
ref: "qAttributeExpressions.0.qExpression",
component: 'expression',
defaultValue: ""
}
}
},
sorting : {
uses : "sorting"
},
settings : {
uses : "settings",
items : {
initFetchRows : {
ref : "qHyperCubeDef.qInitialDataFetch.0.qHeight",
label : "Initial fetch rows",
type : "number",
defaultValue : 50
}
}
}
}
}
In the example I linked above, the author says that this should result in having the expression available in the hypercube, like this:
qHypercube.qDataPages[0].qMatrix.qAttrExps
However, this is not the case. As you can see, my matrix only contains the objects, but not the extra attribute:
Can anyone tell me why?
Also, is this stuff documented anywhere in the official documentation? I only found it by google searching....
Solved it.
Apparently, the attribute only gets added if the value is not null. I thought that setting defaultValue: "" would give me an empty string, but apparently not, its treated as NULL.
Solved it.
Apparently, the attribute only gets added if the value is not null. I thought that setting defaultValue: "" would give me an empty string, but apparently not, its treated as NULL.