Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 vegard_bakke
		
			vegard_bakke
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I've tries setting up a qListObject in a mashup, with one dimension, and one extra expression.
However, the expression is always returning blank:
The definition I've been trying is this:
"qFrequencyMode": "R",
"qDef": {
"qFieldDefs": [
"RegionNo"
],
"qSortCriterias": [
{
"qSortByExpression": 1,
"qExpression": {
"qv": "=RegionNo"
}
}
]
},
"qExpressions": [
{
"qDef": {
"qDef": "=Count(RegionNo)"
},
"qLabel": "=Count(RegionNo)",
"qLibraryId": null
}
],
"qInitialDataFetch": [
{
"qHeight": 20,
"qWidth": 2
}
],
"qLibraryId": null
},onDataTest);
The current =Count(RegionNo) is just attempt to avoid any mistakes in Qlik expression. Ideally, it should be replaced by =Only(RegionName).  
Both return qText: "-", qNum: "NaN".
 
					
				
		
 vegard_bakke
		
			vegard_bakke
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you, Erik! Your insight is always appreciated! 
Here is a fully working "list", with both a RegionNo, and the RegionName.
It is a hypercube, but it returns all rows, not just the selected rows, like a hypercube does by default.
"qInitialDataFetch": [
{
"qHeight": 20,
"qWidth": 2
}
],
"qDimensions": [
{
"qDef": {
"qFieldDefs": [
"RegionNo"
]
},
"qNullSuppression": true,
"qShowAll": true
}
],
"qMeasures": [
{
"qDef": {
"qDef": "MinString( {< Region=,RegionNo=,RegionName= >} RegionName)"
},
"qLabel": "Region",
"qLibraryId": null,
"qSortBy": {
"qSortByState": 0,
"qSortByFrequency": 0,
"qSortByNumeric": 0,
"qSortByAscii": 1,
"qSortByLoadOrder": 0,
"qSortByExpression": 0,
"qExpression": {
"qv": " "
}
}
}
],
"qSuppressZero": false,
"qSuppressMissing": false,
"qMode": "S",
"qInterColumnSortOrder": [],
"qStateName": "$"
}, onDataTest);
(Sorry Erik, for marking my own answer as correct. But the full code might be better for other people later. Thanks again!)
 
					
				
		
 ErikWetterberg
		
			ErikWetterberg
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
The documentation is sometimes hard to read, but I think it should be:
qExpressions: [
{
qExpr: "=Count(RegionNo)"
}
]
Please let us know if this helps.
Erik Wetterberg
 
					
				
		
 vegard_bakke
		
			vegard_bakke
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you for your reply!
Unfortunately, qExpr: "=Count(RegionNo)" yields the same result, qText: "-", qNum: "NaN".
The code above is generated by Qlik Sense Feb 2018 SR1, when using the 'Add List' (or 'Add Hypercube'), to the right under Options in Mashup DevHub editor.
I hope that Qlik is generating code that itself understands. But, I guess this is an area that's not used or tested that much, maybe...
 
					
				
		
 ErikWetterberg
		
			ErikWetterberg
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Didn't realize you used the Mashup Generator, have you tried reporting this as a bug??
Erik Wetterberg
 
					
				
		
 ErikWetterberg
		
			ErikWetterberg
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
You could try with a HyperCube instead. Set qShowAll on the dimension, it should give you all values, like a ListObject.
Erik Wetterberg
 
					
				
		
 vegard_bakke
		
			vegard_bakke
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you, Erik! Your insight is always appreciated! 
Here is a fully working "list", with both a RegionNo, and the RegionName.
It is a hypercube, but it returns all rows, not just the selected rows, like a hypercube does by default.
"qInitialDataFetch": [
{
"qHeight": 20,
"qWidth": 2
}
],
"qDimensions": [
{
"qDef": {
"qFieldDefs": [
"RegionNo"
]
},
"qNullSuppression": true,
"qShowAll": true
}
],
"qMeasures": [
{
"qDef": {
"qDef": "MinString( {< Region=,RegionNo=,RegionName= >} RegionName)"
},
"qLabel": "Region",
"qLibraryId": null,
"qSortBy": {
"qSortByState": 0,
"qSortByFrequency": 0,
"qSortByNumeric": 0,
"qSortByAscii": 1,
"qSortByLoadOrder": 0,
"qSortByExpression": 0,
"qExpression": {
"qv": " "
}
}
}
],
"qSuppressZero": false,
"qSuppressMissing": false,
"qMode": "S",
"qInterColumnSortOrder": [],
"qStateName": "$"
}, onDataTest);
(Sorry Erik, for marking my own answer as correct. But the full code might be better for other people later. Thanks again!)
 
					
				
		
 vegard_bakke
		
			vegard_bakke
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		No, I haven't. Unfortunately, a bug takes longer to get fixed, than making a work around. 😕
 
					
				
		
 vegard_bakke
		
			vegard_bakke
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Just an additional comment:
The qShowAll is not enough. There has to be an expression as well.
