Qlik Sense Engine (qix)

The JSON-RPC API over WebSocket API that enables you to interact with the Qlik Associative Engine for Qlik Sense applications.

Download specification

Variable

Variable ForceContent

(qs, qd)
Deprecated
Use GenericVariable::SetProperties method instead

Sets the value of a dual variable overriding any input constraints.

Parameters

  • qsstring
    Required

    String representation of a dual value. Set this parameter to "", if the string representation is to be Null.

  • qdnumber
    Required

    Numeric representation of a dual value.

Response

object

Errors

array

ForceContent(qs, qd)

const result = await variable.ForceContent([
  "value",
  123
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "ForceContent",
  "params": {
    "qs": "value",
    "qd": 123
  }
}

Response

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

Variable GetContent

()
Deprecated
Use GenericVariable::GetProperties method instead

Returns the calculated value of a variable.

Response

  • qContentobjectDeprecated
    Show qContent properties
    • qStringstring

      Calculated value.

    • qIsNumboolean

      Is set to true if the value is a numeric.

Errors

array

GetContent()

const result = await variable.GetContent({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qContent": {
      "qString": "value",
      "qIsNum": true
    }
  }
}

Variable GetNxProperties

()
Deprecated
Use GetProperties method instead

Gets the properties of a variable.

Response

  • qPropertiesobjectDeprecated
    Show qProperties properties
    • qNamestring

      Name of the variable.

    • qNumberPresentationobject

      Sets the formatting of a field. The properties of qFieldAttributes and the formatting mechanism are described below.

      Formatting mechanism

      The formatting mechanism depends on the type set in qType, as shown below:

      In case of inconsistencies between the type and the format pattern, the format pattern takes precedence over the type.

      Type is DATE, TIME, TIMESTAMP or INTERVAL

      The following applies:

      • If a format pattern is defined in qFmt , the formatting is as defined in qFmt .
      • If qFmt is empty, the formatting is defined by the number interpretation variables included at the top of the script ( TimeFormat , DateFormat , TimeStampFormat ).
      • The properties qDec , qThou , qnDec , qUseThou are not used.

      Type is INTEGER

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the formatting mechanism uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
      • If no format pattern is defined in qFmt , no formatting is applied. The properties qDec , qThou , qnDec , qUseThou and the number interpretation variables defined in the script are not used .

      Type is REAL

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
      • If no format pattern is defined in qFmt , and if the value is almost an integer value (for example, 14,000012), the value is formatted as an integer. The properties qDec , qThou , qnDec , qUseThou are not used.
      • If no format pattern is defined in qFmt , and if qnDec is defined and not 0, the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
      • If no format pattern is defined in qFmt , and if qnDec is 0, the number of decimals is 14 and the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

      Type is FIX

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
      • If no format pattern is defined in qFmt , the properties qDec and qnDec are used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

      Type is MONEY

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of any script ( MoneyDecimalSep and MoneyThousandSep ).
      • If no format pattern is defined in qFmt , the engine uses the number interpretation variables included at the top of the script ( MoneyDecimalSep and MoneyThousandSep ).

      Type is ASCII

      No formatting, qFmt is ignored.

      Show qNumberPresentation properties
      • qTypestring

        Can be one of: "U""A""I""R""F""M""D""T""TS""IV"

      • qnDecinteger

        Number of decimals. Default is 10.

      • qUseThouinteger

        Defines whether or not a thousands separator must be used. Default is 0.

      • qFmtstring

        Defines the format pattern that applies to qText . Is used in connection to the type of the field (parameter qType ). For more information, see Formatting mechanism. Example: YYYY-MM-DD for a date.

      • qDecstring

        Defines the decimal separator. Example: .

      • qThoustring

        Defines the thousand separator (if any). Is used if qUseThou is set to 1. Example: ,

    • qIncludeInBookmarkboolean

      Set this property to true to update the variable when applying a bookmark. The value of a variable can affect the state of the selections. The default value is false.

    • qUsePredefListedValuesboolean

      The value of a variable can be an enumeration. Set this property to true to reflect the predefined values in an enumeration.

    • qPreDefinedListarray of strings

      List of enumerations. This property is used if qUsePredefListedValues is set to true.

Errors

array

GetNxProperties()

const result = await variable.GetNxProperties({})

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qProperties": {
      "qName": "value",
      "qNumberPresentation": {
        "qType": "U",
        "qnDec": 10,
        "qUseThou": 123,
        "qFmt": "value",
        "qDec": "value",
        "qThou": "value"
      },
      "qIncludeInBookmark": true,
      "qUsePredefListedValues": true,
      "qPreDefinedList": [
        "value"
      ]
    }
  }
}

Variable GetRawContent

()
Deprecated
Use GenericVariable::GetProperties method instead

Returns the raw value of a variable.

Response

  • qReturnstring

Errors

array

GetRawContent()

const result = await variable.GetRawContent({})

Request

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

Response

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

Variable SetContent

(qContent, qUpdateMRU)
Deprecated
Use GenericVariable::SetProperties method instead

Sets a value to a variable.

Parameters

  • qContentstring
    Required

    Value of the variable.

  • qUpdateMRUboolean
    Required

    If set to true, the value is added to the Most Recently Used (MRU) list.

Response

  • qReturnboolean

Errors

array

SetContent(qContent, qUpdateMRU)

const result = await variable.SetContent([
  "value",
  true
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SetContent",
  "params": {
    "qContent": "value",
    "qUpdateMRU": true
  }
}

Response

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

Variable SetNxProperties

(qProperties)
Deprecated
Use SetProperties method instead

Sets some properties to a variable.

Parameters

  • qPropertiesobjectDeprecated
    Required

    Information about the properties of the variable

    Show qProperties properties
    • qNamestring

      Name of the variable.

    • qNumberPresentationobject

      Sets the formatting of a field. The properties of qFieldAttributes and the formatting mechanism are described below.

      Formatting mechanism

      The formatting mechanism depends on the type set in qType, as shown below:

      In case of inconsistencies between the type and the format pattern, the format pattern takes precedence over the type.

      Type is DATE, TIME, TIMESTAMP or INTERVAL

      The following applies:

      • If a format pattern is defined in qFmt , the formatting is as defined in qFmt .
      • If qFmt is empty, the formatting is defined by the number interpretation variables included at the top of the script ( TimeFormat , DateFormat , TimeStampFormat ).
      • The properties qDec , qThou , qnDec , qUseThou are not used.

      Type is INTEGER

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the formatting mechanism uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
      • If no format pattern is defined in qFmt , no formatting is applied. The properties qDec , qThou , qnDec , qUseThou and the number interpretation variables defined in the script are not used .

      Type is REAL

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
      • If no format pattern is defined in qFmt , and if the value is almost an integer value (for example, 14,000012), the value is formatted as an integer. The properties qDec , qThou , qnDec , qUseThou are not used.
      • If no format pattern is defined in qFmt , and if qnDec is defined and not 0, the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
      • If no format pattern is defined in qFmt , and if qnDec is 0, the number of decimals is 14 and the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

      Type is FIX

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
      • If no format pattern is defined in qFmt , the properties qDec and qnDec are used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.

      Type is MONEY

      The following applies:

      • If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of any script ( MoneyDecimalSep and MoneyThousandSep ).
      • If no format pattern is defined in qFmt , the engine uses the number interpretation variables included at the top of the script ( MoneyDecimalSep and MoneyThousandSep ).

      Type is ASCII

      No formatting, qFmt is ignored.

      Show qNumberPresentation properties
      • qTypestring

        Can be one of: "U""A""I""R""F""M""D""T""TS""IV"

      • qnDecinteger

        Number of decimals. Default is 10.

      • qUseThouinteger

        Defines whether or not a thousands separator must be used. Default is 0.

      • qFmtstring

        Defines the format pattern that applies to qText . Is used in connection to the type of the field (parameter qType ). For more information, see Formatting mechanism. Example: YYYY-MM-DD for a date.

      • qDecstring

        Defines the decimal separator. Example: .

      • qThoustring

        Defines the thousand separator (if any). Is used if qUseThou is set to 1. Example: ,

    • qIncludeInBookmarkboolean

      Set this property to true to update the variable when applying a bookmark. The value of a variable can affect the state of the selections. The default value is false.

    • qUsePredefListedValuesboolean

      The value of a variable can be an enumeration. Set this property to true to reflect the predefined values in an enumeration.

    • qPreDefinedListarray of strings

      List of enumerations. This property is used if qUsePredefListedValues is set to true.

Response

object

Errors

array

SetNxProperties(qProperties)

const result = await variable.SetNxProperties([
  {
    "qName": "value",
    "qNumberPresentation": {
      "qType": "U",
      "qnDec": 10,
      "qUseThou": 123,
      "qFmt": "value",
      "qDec": "value",
      "qThou": "value"
    },
    "qIncludeInBookmark": true,
    "qUsePredefListedValues": true,
    "qPreDefinedList": [
      "value"
    ]
  }
])

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "handle": 3,
  "method": "SetNxProperties",
  "params": {
    "qProperties": {
      "qName": "value",
      "qNumberPresentation": {
        "qType": "U",
        "qnDec": 10,
        "qUseThou": 123,
        "qFmt": "value",
        "qDec": "value",
        "qThou": "value"
      },
      "qIncludeInBookmark": true,
      "qUsePredefListedValues": true,
      "qPreDefinedList": [
        "value"
      ]
    }
  }
}

Response

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