Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
devan9876
Creator
Creator

Bind qListObjectDef to a user selected dimension

I want the user to be able to select a field or a master dimension and bind it to he qListObjectDef object. The  panel correctly displays an input expression for allowing a field to be selected but I don't see a dimension picker if the user wants to select a master dimension. I thought the "library-item" component would allow a master dimension to be selected.  For reference I am using the following tutorial as a guide.

 

 

label: {
	type: "string",
	ref: "qListObjectDef.qDef.qFieldLabels.0",
	label: "Label",
	show: true
},
libraryId: {
	type: "string",
	component: "library-item",
	libraryItemType: "dimension",
	ref: "qListObjectDef.qLibraryId",
	label: "Dimension",
	show: function(data) {
		return data.qListObjectDef && data.qListObjectDef.qLibraryId;
	}
},
field: {
	type: "string",
	expression: "always",
	expressionType: "dimension",
	ref: "qListObjectDef.qDef.qFieldDefs.0",
	label: "Field",
	show: function(data) {
		return data.qListObjectDef && !data.qListObjectDef.qLibraryId;
	}
}
								

 

 

 

PropertyPanelCapture.PNG

 

 

Labels (1)
1 Reply
datawizards1234
Partner - Contributor
Partner - Contributor

Hello

I have the same problem, I thought that 

 

expressionType: "dimension",

 

will allow to select dimension either from master dimension list or from field list or expression just as for ex. when setting colors:

datawizards1234_0-1622853885643.png

but it doesn't work like that. That is undocumented and this sample code that comes with qlik sense installation is wrong, because it doesn't work in a way it was intended.

 

Does anyone know how to select dimensions from some kind of list so that I can update qListObjectDef?

With standard component for dimensions:

 

dimensions: {uses: "dimensions"}

 

there is a different problem that from my understanding hypercube needs to be defined, and I don't want to do that, because I only want listobject, any ideas?

Error on selecting dimension with above component and listobject defined in initial properties:

datawizards1234_2-1622855068130.png

From what I observed is that above dimension component automatically creates hypercube even when it's not in initial properties.