

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Extension with qListObjectDef and extra expressions
I'm trying to make an extension that uses qListObjectDef, instead of qHyperCubeDef. Reason being that I want to receive all rows for the dimension, even though one of the values have been selected. (Such as for a Filter. And not as a Table.)
In addition to that, I need a couple of extra expressions per value.
I know you can do this as a mashup, using 'qExpressions' and app.createList().
But how do I get the properties definition right in an extension to do the same?
Hoping for any hints,
Vegard 🙂
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to evaluate expressions for the values, then list objects is probably not the way to go as those structures only allow you to have one dimension. But I have two ideas that might do the trick for you:
- Create an alternate state and use that for the object containing your hypercube. This object will then not be affected by the selection in the default state.
- Keep the hypercube in the default state, but add a column with an expression that refers to the global state. For instance like this: "Count({1} 1)" That will force the hypercube to compute values across all values.
I'd consider 2) to be sort of a hack though, but the advantage is that you don't need to create any new alternate state in your app.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want to evaluate expressions for the values, then list objects is probably not the way to go as those structures only allow you to have one dimension. But I have two ideas that might do the trick for you:
- Create an alternate state and use that for the object containing your hypercube. This object will then not be affected by the selection in the default state.
- Keep the hypercube in the default state, but add a column with an expression that refers to the global state. For instance like this: "Count({1} 1)" That will force the hypercube to compute values across all values.
I'd consider 2) to be sort of a hack though, but the advantage is that you don't need to create any new alternate state in your app.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, yko. This extension is for one dimension, only, although I need a few extra measures per dimension value. Therefore qListObjectDef would have been perfect, as it does not collapse to selected rows only.
I find it strange that it works for app.createList() in a mashup, but not in an extension, though.
Nevertheless, thanks for you suggestion. I'll think I'll stick to the hack (no. 2) for this one. 🙂


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found: https://github.com/alner/qsSimpleList, which had an example with expressions on a qListObjectDef!
Unfortunately, the expression was only calculated for the selected value.
So I tried the 'Test 2' below, storing the variable in a temporary property ('extra'), building up an 'Only( {1} )' expression using his change() trick.
Seems to be working in my current tests at least. 🙂
My definition is currently:
