Qlik Sense Engine (qix)

GenericDimension

GenericDimension ApplyPatches

(qPatches)

Applies a patch to the properties of an object. Allows an update to some of the properties. It should not be possible to patch "/qInfo/qId", and it will be forbidden in the near future.

Applying a patch takes less time than resetting all the properties.

Parameters

  • qPatches array of objects
    Required

    Array of patches.

    Show qPatches properties
    • qOp string

      Can be one of: "add""remove""replace"

    • qPath string

      Path to the property to add, remove or replace.

    • qValue string

      This parameter is not used in a remove operation. Corresponds to the value of the property to add or to the new value of the property to update. Examples: "false", "2", ""New title""

Response

object

Errors

array

ApplyPatches(qPatches)

enigma.js
const result = await genericDimension.applyPatches([
{
"qOp": "add",
"qPath": "value",
"qValue": "value"
}
])

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ApplyPatches",
"params": {
"qPatches": [
{
"qOp": "add",
"qPath": "value",
"qValue": "value"
}
]
}
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}

GenericDimension Approve

()

Adds the generic dimension to the list of approved objects

This operation is possible only in Qlik Sense Enterprise.

Response

object

Errors

array

Approve()

enigma.js
const result = await genericDimension.approve()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "Approve"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}

GenericDimension GetActiveField

()
Experimental

Get a cyclic dimension's active field.

This operation is only possible for cyclic dimensions.

Response

  • qReturn integer

Errors

array

GetActiveField()

enigma.js
const result = await genericDimension.getActiveField()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetActiveField"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": 123
}
}

GenericDimension GetDimension

()

Returns the definition of a dimension.

The definition of the dimension is returned.

Response

  • qDim object
    Show qDim properties
    • qGrouping string

      Can be one of: "N""H""C"

    • qFieldDefs array of strings

      Array of dimension names.

    • qFieldLabels array of strings

      Array of dimension labels.

    • qLabelExpression string
    • qAlias string

      Alias of the dimension.

    • qScriptGenerated boolean Deprecated
    • qOrigin string

      Can be one of: "PROGRAM""SCRIPT""DATA_PRODUCT"

Errors

array

GetDimension()

enigma.js
const result = await genericDimension.getDimension()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetDimension"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qDim": {
"qGrouping": "N",
"qFieldDefs": [
"value"
],
"qFieldLabels": [
"value"
],
"qLabelExpression": "value",
"qAlias": "value",
"qScriptGenerated": false,
"qOrigin": "PROGRAM"
}
}
}

GenericDimension GetInfo

()

Returns the type and identifier of the object.

Response

  • qInfo object
    Show qInfo properties
    • qId string

      Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

    • qType string

      Type of the object. This parameter is mandatory.

Errors

array

GetInfo()

enigma.js
const result = await genericDimension.getInfo()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetInfo"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qInfo": {
"qId": "value",
"qType": "value"
}
}
}

GenericDimension GetLayout

()

Evaluates a dimension and displays its properties, including the dynamic properties.

Response

  • qLayout object

    Is the layout for GenericDimensionProperties.

    Show qLayout properties
    • qInfo object
      Show qInfo properties
      • qId string

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qType string

        Type of the object. This parameter is mandatory.

    • qMeta object

      Layout for NxMetaDef.

      Show qMeta properties
      • qName string

        Name. This property is optional.

    • qDim object
      Show qDim properties
      • qGrouping string

        Can be one of: "N""H""C"

      • qFieldDefs array of strings

        Array of dimension names.

      • qFieldLabels array of strings

        Array of dimension labels.

      • qLabelExpression string
      • qAlias string

        Alias of the dimension.

      • qScriptGenerated boolean Deprecated
      • qOrigin string

        Can be one of: "PROGRAM""SCRIPT""DATA_PRODUCT"

    • qDimInfos array of objects

      Cardinal and tags related to the dimension. Length of the longest value in the field.

      Show qDimInfos properties
      • qApprMaxGlyphCount integer

        Length of the longest value in the field.

      • qCardinal integer

        Number of distinct field values

      • qTags array of strings

        Gives information on a field. For example, it can return the type of the field. Examples: key, text, ASCII

      • qIsSemantic boolean

        If set to true, it means that the field is a semantic.

      • qAndMode boolean

        If set to true a logical AND (instead of a logical OR) is used when making selections in a field. The default value is false.

Errors

array

GetLayout()

enigma.js
const result = await genericDimension.getLayout()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetLayout"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qLayout": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMeta": {
"qName": "value"
},
"qDim": {
"qGrouping": "N",
"qFieldDefs": [
"value"
],
"qFieldLabels": [
"value"
],
"qLabelExpression": "value",
"qAlias": "value",
"qScriptGenerated": true,
"qOrigin": "PROGRAM"
},
"qDimInfos": [
{
"qApprMaxGlyphCount": 123,
"qCardinal": 123,
"qTags": [
"value"
],
"qIsSemantic": true,
"qAndMode": true
}
]
}
}
}

GenericDimension GetLinkedObjects

()

Lists the linked objects to a generic object, a dimension or a measure.

Response

  • qItems array of objects
    Show qItems properties
    • qRootId string

      Identifier of the root object. If the linked object is a child, the root identifier is the identifier of the parent. If the linked object is an app object, the root identifier is the same than the identifier of the linked object since the linked object is a root object.

    • qInfo object
      Show qInfo properties
      • qId string

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qType string

        Type of the object. This parameter is mandatory.

Errors

array

GetLinkedObjects()

enigma.js
const result = await genericDimension.getLinkedObjects()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetLinkedObjects"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qItems": [
{
"qRootId": "value",
"qInfo": {
"qId": "value",
"qType": "value"
}
}
]
}
}

GenericDimension GetProperties

()

Shows the properties of an object. Returns the identifier and the definition of the dimension.

If the member delta is set to true in the request object, only the delta is retrieved.

Response

  • qProp object
    Show qProp properties
    • qInfo object
      Show qInfo properties
      • qId string

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qType string

        Type of the object. This parameter is mandatory.

    • qDim object
      Show qDim properties
      • qGrouping string

        Can be one of: "N""H""C"

      • qFieldDefs array of strings

        Array of dimension names.

      • qFieldLabels array of strings

        Array of dimension labels.

      • qLabelExpression string
      • qAlias string

        Alias of the dimension.

      • qScriptGenerated boolean Deprecated
      • qOrigin string

        Can be one of: "PROGRAM""SCRIPT""DATA_PRODUCT"

    • qMetaDef object

      Used to collect metadata.

      Properties

      Semantic type with an empty structure.

Errors

array

GetProperties()

enigma.js
const result = await genericDimension.getProperties()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetProperties"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qProp": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qDim": {
"qGrouping": "N",
"qFieldDefs": [
"value"
],
"qFieldLabels": [
"value"
],
"qLabelExpression": "value",
"qAlias": "value",
"qScriptGenerated": false,
"qOrigin": "PROGRAM"
},
"qMetaDef": {}
}
}
}

GenericDimension Publish

()

Publishes a dimension.

This operation is not applicable for Qlik Sense Desktop.

Response

object

Errors

array

Publish()

enigma.js
const result = await genericDimension.publish()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "Publish"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}

GenericDimension SetActiveField

(qIx)
Experimental

Set a cyclic dimension's active field directly.

This operation is only possible for cyclic dimensions.

Parameters

  • qIx integer
    Required

    Index of the new active field.

Response

object

Errors

array

SetActiveField(qIx)

enigma.js
const result = await genericDimension.setActiveField(123)

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SetActiveField",
"params": {
"qIx": 123
}
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}

GenericDimension SetProperties

(qProp)

Sets some properties for a dimension.

Parameters

  • qProp object
    Required

    Information about the dimension.

    Show qProp properties
    • qInfo object
      Show qInfo properties
      • qId string

        Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.

      • qType string

        Type of the object. This parameter is mandatory.

    • qDim object
      Show qDim properties
      • qGrouping string

        Can be one of: "N""H""C"

      • qFieldDefs array of strings

        Array of dimension names.

      • qFieldLabels array of strings

        Array of dimension labels.

      • qLabelExpression string
      • qAlias string

        Alias of the dimension.

      • qScriptGenerated boolean Deprecated
      • qOrigin string

        Can be one of: "PROGRAM""SCRIPT""DATA_PRODUCT"

    • qMetaDef object

      Used to collect metadata.

      Properties

      Semantic type with an empty structure.

Response

object

Errors

array

SetProperties(qProp)

enigma.js
const result = await genericDimension.setProperties({
"qInfo": {
"qId": "value",
"qType": "value"
},
"qDim": {
"qGrouping": "N",
"qFieldDefs": [
"value"
],
"qFieldLabels": [
"value"
],
"qLabelExpression": "value",
"qAlias": "value",
"qScriptGenerated": false,
"qOrigin": "PROGRAM"
},
"qMetaDef": {}
})

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SetProperties",
"params": {
"qProp": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qDim": {
"qGrouping": "N",
"qFieldDefs": [
"value"
],
"qFieldLabels": [
"value"
],
"qLabelExpression": "value",
"qAlias": "value",
"qScriptGenerated": false,
"qOrigin": "PROGRAM"
},
"qMetaDef": {}
}
}
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}

GenericDimension StepCycle

(qStep)
Experimental

Step active field in a cyclic dimension.

This operation is only possible for cyclic dimensions.

Parameters

  • qStep integer
    Required

    The number of steps made through the dimension. Positive values step forward and negative values step backward.

Response

object

Errors

array

StepCycle(qStep)

enigma.js
const result = await genericDimension.stepCycle(123)

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "StepCycle",
"params": {
"qStep": 123
}
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}

GenericDimension UnApprove

()

Removes the generic dimension from the list of approved objects

This operation is possible only in Qlik Sense Enterprise.

Response

object

Errors

array

UnApprove()

enigma.js
const result = await genericDimension.unApprove()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "UnApprove"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}

GenericDimension UnPublish

()

Unpublishes a dimension.

This operation is not applicable for Qlik Sense Desktop.

Response

object

Errors

array

UnPublish()

enigma.js
const result = await genericDimension.unPublish()

Request

{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "UnPublish"
}

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}