createGenericObject method

This API is reliable and breaking changes are unlikely., callback)

Creates a generic object and registers a callback to receive the data. The generic object can contain the following:

  • qHyperCubeDef
  • qListObjectDef
  • qStringExpression
  • qValueExpression

The callback method is called whenever the selection state changes in a way that affects the generic object. The parameter is the evaluated version of the definition.

Version history

Introduced 1.0



Type: Object

Generic object definition.


Type: Function


Callback method. Registers a callback that is executed every time data is returned.


A promise of an object model.

Tip: For more information regarding a promise, see$q#the-promise-api.


app.createGenericObject( {
	user: {
		qStringExpression: "=QVUser ()"
	version : {
		qStringExpression: "=QlikViewVersion ()"
	fields: {
		qValueExpression: "=Count (DISTINCT $Field)"
}, function ( reply ) {
	var str = "Version:" + reply.version + " Fields:" + reply.fields;
	if ( reply.user ) {
		str += " User:" + reply.user;
	$( "#info" ).html(str);

See also:


Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?