Sense client objects

Sense Client Objects consists of a collection of properties for defining different types of objects compatible with Qlik Sense Client

Download specification

appProperties object

appProperties

Properties

  • chartAnimations boolean

    Enable chart animations for all sheet objects Default:true

  • disableCellNavMenu boolean

    Disables the hover menu for all sheet objects Default:false

  • qExtendsId string
    Required

    Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.

  • qInfo object
    Required
    Show qInfo properties
    • qId string
      Required

      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. Default:appprops

  • qMetaDef object
    Required

    Used to collect meta data.

    Properties Semantic type with an empty structure.

  • qStateName string

    Name of the alternate state. Default is current selections $ . Default:$

  • rtl boolean

    Right to left layout for right-to-left languages Default:false

  • sheetLogoPosition string
    Required

    Position of the sheet logo. right|left|center

  • sheetLogoThumbnail object
    Required
    Show sheetLogoThumbnail properties
    • qStaticContentUrlDef object
      Required

      In addition, this structure can contain dynamic properties.

      Show qStaticContentUrlDef properties
      • qUrl string
        Required

        Relative path of the thumbnail.

  • sheetTitleBgColor string
    Required

    Color of the sheet background. Left side color when using gradient

  • sheetTitleColor string
    Required

    Color of the sheet title text

  • sheetTitleGradientColor string
    Required

    Right side background color when using gradient

  • theme string

    The theme used across the app Default:horizon

appPropertiesList object

appPropertiesList

Properties

  • qAppObjectListDef object
    Required

    Defines the list of objects in an app. An app object is a generic object created at app level.

    Show qAppObjectListDef properties
    • qData object
      Required

      Contains dynamic JSON data specified by the client.

      Show qData properties
      • chartAnimations string

        Path to chartAnimations in AppGenericProperties Default:/chartAnimations

      • disableCellNavMenu string

        Path to disableCellNavMenu in AppGenericProperties Default:/disableCellNavMenu

      • rtl string

        Path to rtl in AppGenericProperties Default:/rtl

      • sheetLogoPosition string

        Path to sheetLogoPosition in AppGenericProperties Default:/sheetLogoPosition

      • sheetLogoThumbnail string

        Path to sheetLogoThumbnail in AppGenericProperties Default:/sheetLogoThumbnail

      • sheetTitleBgColor string

        Path to sheetTitleBgColor in AppGenericProperties Default:/sheetTitleBgColor

      • sheetTitleColor string

        Path to sheetTitleColor in AppGenericProperties Default:/sheetTitleColor

      • sheetTitleGradientColor string

        Path to sheetTitleGradientColor in AppGenericProperties Default:/sheetTitleGradientColor

      • theme string

        Path to theme in AppGenericProperties Default:/theme

    • qType string

      Object type. Default:appprops

  • qExtendsId string
    Required

    Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.

  • qInfo object
    Required
    Show qInfo properties
    • qId string
      Required

      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

      List object type. Default:AppPropsList

  • qMetaDef object
    Required

    Used to collect meta data.

    Properties Semantic type with an empty structure.

  • qStateName string

    Name of the alternate state. Default is current selections $ . Default:$

bookmark object

bookmark

Properties

  • creationDate string
    Required

    Creation date of the bookmark.

  • qDistinctValues boolean

    If true all selected values will be stored distinct, i.e. searchstrings will not be kept. Default:false

  • qIncludeVariables boolean

    If true all variables will be stored in the bookmark. Default:false

  • qInfo object
    Required
    Show qInfo properties
    • qId string
      Required

      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

      Object type. Default:bookmark

  • qMetaDef object
    Required

    The metadata object used by all app objects

    Show qMetaDef properties
    • description string
      Required

      Short description for the app object

    • tags Array< string >
      Required

      Tags for the app object

    • title string
      Required

      Title for the app object

  • selectionFields string
    Required

    Fields that have selections made to them.

  • sheetId string
    Required

    Sheet ID of the sheet that the bookmark applies to.

bookmarkList object

Properties for defining list of Bookmarks.

Properties

  • qBookmarkListDef object
    Required

    Defines the list of bookmarks.

    Show qBookmarkListDef properties
    • qData object
      Required

      Contains dynamic JSON data specified by the client.

      Show qData properties
      • creationDate string

        Path to creationDate in BookmarkProperties Default:/creationDate

      • description string

        Path to description in BookmarkProperties Default:/qMetaDef/description

      • selectionFields string

        Path to selectionFields in BookmarkProperties Default:/selectionFields

      • sheetId string

        Path to sheetId in BookmarkProperties Default:/sheetId

      • title string

        Path to title in BookmarkProperties Default:/qMetaDef/title

    • qIncludePatches boolean
      Required

      Include the bookmark patches. Patches can be very large and may make the list result unmanageable.

    • qType string

      Object type. Default:bookmark

  • qExtendsId string
    Required

    Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.

  • qInfo object
    Required
    Show qInfo properties
    • qId string
      Required

      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

      List object type. Default:BookmarkList

  • qMetaDef object
    Required

    Used to collect meta data.

    Properties Semantic type with an empty structure.

  • qStateName string

    Name of the alternate state. Default is current selections $ . Default:$

bookmarkList

const bookmarkListProps = {
  "qInfo": {
    "qType": "BookmarkList",
    "qId": ""
  },
  "qBookmarkListDef": {
    "qData": {
      "title": "/qMetaDef/title",
      "description": "/qMetaDef/description",
      "sheetId": "/sheetId",
      "selectionFields": "/selectionFields",
      "creationDate": "/creationDate"
    },
    "qType": "bookmark",
    "qIncludePatches": true
  }
};
const bookmarkList = await doc.createSessionObject(bookmarkListProps).then(list => list.getLayout());

currentSelections object

currentSelections

Properties

  • qExtendsId string
    Required

    Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.

  • qInfo object
    Required
    Show qInfo properties
    • qId string

      Object id. Default:CurrentSelections

    • qType string

      Object type. Default:CurrentSelections

  • qMetaDef object
    Required

    Used to collect meta data.

    Properties Semantic type with an empty structure.

  • qSelectionObjectDef object
    Required
    Show qSelectionObjectDef properties
    • qStateName string

      Name of the alternate state. Default is current selections $ . Default:$

  • qStateName string

    Name of the alternate state. Default is current selections $ . Default:$

  • qType string

    CurrentSelections Object Default:CurrentSelection

currentSelections

const currentSelectionsProps = {
  "qInfo": {
    "qType": "CurrentSelections",
    "qId": "CurrentSelections"
  },
  "qSelectionObjectDef": {
    "qStateName": "$"
  }
};
const currentSelections = await doc.createSessionObject(currentSelectionsProps).then(list => list.getLayout());

dimension object

dimension

Properties

  • qDim object
    Required
    Show qDim properties
    • coloring object
      Required

      Settings coloring by master dimension.

      Show coloring properties
      • baseColor object
        Required

        Color information structure. Holds actual color and index in palette.

        Show baseColor properties
        • color string
          Required

          Color as hex string

        • index integer

          Index in palette Default:6

    • descriptionExpression object
      Required

      Properties Abbreviated syntax: "qStringExpression":"=<expression>" Extended object syntax: "qStringExpression":{"qExpr":"=<expression>"} Where: < expression > is a string

      The "=" sign in the string expression is not mandatory. Even if the "=" sign is not given, the expression is evaluated. A string expression is not evaluated, if the expression is surrounded by simple quotes. The result of the evaluation of the expression can be of any type, as it is returned as a JSON (quoted) string.

      Show descriptionExpression properties
      • qExpr string
        Required
    • qFieldDefs Array< string >
      Required

      Array of dimension names.

    • qFieldLabels Array< string >
      Required

      Array of dimension labels.

    • qGrouping string
      Required

      One of: N, H, C.

    • qLabelExpression string
      Required

      Name of the dimension as an expression. Only when qGrouping is N.

    • title string
      Required

      Name of the dimension. Used unless label expression is set.

  • qInfo object
    Required
    Show qInfo properties
    • qId string
      Required

      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

      Object type. Default:dimension

  • qMetaDef object
    Required

    The metadata object used by all app objects

    Show qMetaDef properties
    • description string
      Required

      Short description for the app object

    • tags Array< string >
      Required

      Tags for the app object

    • title string
      Required

      Title for the app object

dimensionList object

Properties for defining list of Dimensions.

Properties

  • qDimensionListDef object
    Required

    Defines the lists of dimensions.

    Show qDimensionListDef properties
    • qData object
      Required

      Contains dynamic JSON data specified by the client.

      Show qData properties
      • grouping string

        Path to grouping in DimensionProperties Default:/qDim/grouping

      • info string

        Path to qDimInfos in DimensionProperties Default:/qDimInfos

      • labelExpression string

        Path to labelExpression in DimensionProperties Default:/qDim/labelExpression

      • tags string

        Path to tags in DimensionProperties Default:/qMetaDef/tags

      • title string

        Path to title in DimensionProperties Default:/qMetaDef/title

    • qType string

      Object type Default:dimension

  • qExtendsId string
    Required

    Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.

  • qInfo object
    Required
    Show qInfo properties
    • qId string
      Required

      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

      List object type. Default:DimensionList

  • qMetaDef object
    Required

    Used to collect meta data.

    Properties Semantic type with an empty structure.

  • qStateName string

    Name of the alternate state. Default is current selections $ . Default:$

dimensionList

const dimensionListProps = {
  "qInfo": {
    "qType": "DimensionList",
    "qId": ""
  },
  "qDimensionListDef": {
    "qData": {
      "title": "/qMetaDef/title",
      "tags": "/qMetaDef/tags",
      "grouping": "/qDim/grouping",
      "info": "/qDimInfos",
      "labelExpression": "/qDim/labelExpression"
    },
    "qType": "dimension"
  }
};
const dimensionList = await doc.createSessionObject(dimensionListProps).then(list => list.getLayout());

fieldList object

fieldList

Properties

  • qExtendsId string
    Required

    Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.

  • qFieldListDef object
    Required
    Show qFieldListDef properties
    • qShowDefinitionOnly boolean

      Shows the fields defined on the fly if set to true. Default is false. Default:false

    • qShowDerivedFields boolean

      Shows the fields and derived fields if set to true. Default is true. Default:true

    • qShowHidden boolean

      Shows the hidden fields if set to true. Default is false. Default:false

    • qShowImplicit boolean

      Shows the Direct Discovery measure fields if set to true. Default is false. Default:false

    • qShowSemantic boolean

      Show the semantic fields if set to true. Default is true. Default:true

    • qShowSrcTables boolean

      Shows the tables and fields present in the data model viewer if set to true. Default is true. Default:true

    • qShowSystem boolean

      Shows the system tables if set to true. Default is false. Default:false

  • qInfo object
    Required
    Show qInfo properties
    • qId string

      Object id. Default:FieldList

    • qType string

      Object type. Default:FieldList

  • qMetaDef object
    Required

    Used to collect meta data.

    Properties Semantic type with an empty structure.

  • qStateName string

    Name of the alternate state. Default is current selections $ . Default:$

  • qType string

    FieldList Object Default:FieldList

fieldList

const fieldListProps = {
  "qInfo": {
    "qType": "FieldList",
    "qId": "FieldList"
  },
  "qFieldListDef": {
    "qShowDefinitionOnly": "false",
    "qShowDerivedFields": "true",
    "qShowHidden": "false",
    "qShowImplicit": "false",
    "qShowSemantic": "true",
    "qShowSrcTables": "true",
    "qShowSystem": "false"
  }
};
const fieldList = await doc.createSessionObject(fieldListProps).then(list => list.getLayout());

masterobject object

Base visualizations class with common settings.

Properties

  • masterVersion number

    Version number. Will default to latest Qlik Sense version if not manually set. Default:0.95

  • qExtendsId string
    Required

    Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.

  • qInfo object
    Required
    Show qInfo properties
    • qId string
      Required

      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

      Object type. Default:masterobject

  • qLayoutExclude object
    Required
  • qMetaDef object
    Required

    The metadata object used by all app objects

    Show qMetaDef properties
    • description string
      Required

      Short description for the app object

    • tags Array< string >
      Required

      Tags for the app object

    • title string
      Required

      Title for the app object

  • qStateName string

    Name of the alternate state. Default is current selections $ . Default:$

  • showDetails boolean

    Show visualization details toggle Default:false

  • showTitles boolean

    Visualization subtitle Default:true

  • visualization string
    Required

    Visualization type. Must always be set.

masterobjectList object

Properties for defining list of MasterObjects.

Properties

  • qAppObjectListDef object
    Required

    Defines the list of objects in an app. An app object is a generic object created at app level.

    Show qAppObjectListDef properties
    • qData object
      Required

      Contains dynamic JSON data specified by the client.

      Show qData properties
      • labelExpression string

        Path to labelExpression in MasterObjectProperties Default:/labelExpression

      • name string

        Path to title in MasterObjectProperties Default:/qMetaDef/title

      • tags string

        Path to tags in MasterObjectProperties Default:/qMetaDef/tags

      • visualization string

        Path to visualization in MasterObjectProperties Default:/visualization

    • qType string

      Object type Default:masterobject

  • qExtendsId string
    Required

    Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.

  • qInfo object
    Required
    Show qInfo properties
    • qId string
      Required

      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

      List object type. Default:MasterObjectList

  • qMetaDef object
    Required

    Used to collect meta data.

    Properties Semantic type with an empty structure.

  • qStateName string

    Name of the alternate state. Default is current selections $ . Default:$

masterobjectList

const masterobjectListProps = {
  "qInfo": {
    "qType": "MasterObjectList",
    "qId": ""
  },
  "qAppObjectListDef": {
    "qData": {
      "name": "/qMetaDef/title",
      "labelExpression": "/labelExpression",
      "visualization": "/visualization",
      "tags": "/qMetaDef/tags"
    },
    "qType": "masterobject"
  }
};
const masterobjectList = await doc.createSessionObject(masterobjectListProps).then(list => list.getLayout());

measure object

measure

Properties

  • qInfo object
    Required
    Show qInfo properties
    • qId string
      Required

      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

      Object type. Default:measure

  • qMeasure object
    Required
    Show qMeasure properties
    • coloring object
      Required

      Settings coloring by master measure.

      Show coloring properties
      • baseColor object
        Required

        Color information structure. Holds actual color and index in palette.

        Show baseColor properties
        • color string
          Required

          Color as hex string

        • index integer

          Index in palette Default:6

      • gradient object
        Required

        Color map used in by dimension color modes.

        Show gradient properties
        • breakTypes Array< boolean >
          Required

          Specifies how to blend in color intersections. Should be of length one less than the number of colors.

        • colors Array< object >
          Required

          Colors to map against measure values

        • limitType string

          percent|absolute Default:percent

        • limits Array< integer >
          Required

          Specifies where to place the color breakpoints. Should be of length one less than the number of colors.

    • descriptionExpression object
      Required

      Properties Abbreviated syntax: "qStringExpression":"=<expression>" Extended object syntax: "qStringExpression":{"qExpr":"=<expression>"} Where: < expression > is a string

      The "=" sign in the string expression is not mandatory. Even if the "=" sign is not given, the expression is evaluated. A string expression is not evaluated, if the expression is surrounded by simple quotes. The result of the evaluation of the expression can be of any type, as it is returned as a JSON (quoted) string.

      Show descriptionExpression properties
      • qExpr string
        Required
    • isCustomFormatted boolean

      Denotes whether the measure has custom formatting applied Default:false

    • numFormatFromTemplate boolean

      Denotes whether the number formatting comes from a template Default:false

    • qActiveExpression integer
      Required

      Index to the active expression in a measure.

    • qDef string
      Required

      Definition of the measure.

    • qExpressions Array< string >
      Required

      Array of expressions.

    • qGrouping string
      Required

      One of: N, H, C.

    • qLabel string
      Required

      Name of the Measure

    • qLabelExpression string
      Required

      Optional expression used for dynamic label.

    • qNumFormat object
      Required

      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 qNumFormat properties
      • qDec string
        Required

        Defines the decimal separator. Example: .

      • qFmt string
        Required

        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.

      • qThou string
        Required

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

      • qType string
        Required

        One of: U, A, I, R, F, M, D, T, TS, IV.

      • qUseThou integer

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

      • qnDec integer

        Number of decimals. Default is 10. Default:10

  • qMetaDef object
    Required

    The metadata object used by all app objects

    Show qMetaDef properties
    • description string
      Required

      Short description for the app object

    • tags Array< string >
      Required

      Tags for the app object

    • title string
      Required

      Title for the app object

measureList object

Properties for defining list of Measures.

Properties

  • qExtendsId string
    Required

    Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.

  • qInfo object
    Required
    Show qInfo properties
    • qId string
      Required

      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

      List object type. Default:MeasureList

  • qMeasureListDef object
    Required

    Defines the list of measures.

    Show qMeasureListDef properties
    • qData object
      Required

      Contains dynamic JSON data specified by the client.

      Show qData properties
      • labelExpression string

        Path to labelExpression in MeasureProperties Default:/qMeasure/qLabelExpression

      • tags string

        Path to tags in MeasureProperties Default:/qMetaDef/tags

      • title string

        Path to title in MeasureProperties Default:/qMetaDef/title

    • qType string

      Object type Default:measure

  • qMetaDef object
    Required

    Used to collect meta data.

    Properties Semantic type with an empty structure.

  • qStateName string

    Name of the alternate state. Default is current selections $ . Default:$

measureList

const measureListProps = {
  "qInfo": {
    "qType": "MeasureList",
    "qId": ""
  },
  "qMeasureListDef": {
    "qData": {
      "title": "/qMetaDef/title",
      "tags": "/qMetaDef/tags",
      "labelExpression": "/qMeasure/qLabelExpression"
    },
    "qType": "measure"
  }
};
const measureList = await doc.createSessionObject(measureListProps).then(list => list.getLayout());

sheet object

sheet

Properties

  • cells Array< object >
    Required

    Sheet cells.

  • columns integer

    Number of grid columns the sheet consists of. Using anything else than the default setting may cause the Qlik Sense client to malfunction. Default:24

  • gridResolution string

    Sets the number of grid cells: small|medium|large Default:small

  • height integer
    Required

    Height in percentage. Used in tandem with layoutOptions.sheetMode RESPONSIVE and extended sheets. Can be larger than 100

  • layoutOptions object
    Required
    Show layoutOptions properties
    • extendable boolean

      Flag to show extend sheet button in the grid Default:false

    • mobileLayout string

      Sets the mobile display of the sheet in sense client: LIST|GRID Default:LIST

    • sheetMode string
      Required

      Sets scaling used by the sheet: RESPONSIVE|CUSTOM

  • pxHeight integer
    Required

    Height in pixels. Used in tandem with layoutOptions.sheetMode

  • pxWidth integer
    Required

    Width in pixels. Used in tandem with layoutOptions.sheetMode CUSTOM

  • qChildListDef object
    Required
    Show qChildListDef properties
    • qData object
      Required
      Show qData properties
      • title string

        Default:/title

  • qExtendsId string
    Required

    Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.

  • qInfo object
    Required
    Show qInfo properties
    • qId string
      Required

      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

      Object type. Default:sheet

  • qMetaDef object
    Required

    The metadata object used by all app objects

    Show qMetaDef properties
    • description string
      Required

      Short description for the app object

    • tags Array< string >
      Required

      Tags for the app object

    • title string
      Required

      Title for the app object

  • qStateName string

    Name of the alternate state. Default is current selections $ . Default:$

  • rank number

    Sheet rank. The sheet with the lowest rank will be displayed first, so the rank is inverted. Default:1

  • rows integer

    Number of grid rows the sheet consists of. Using anything else than the default setting may cause the Qlik Sense client to malfunction. Default:12

  • thumbnail object
    Required
    Show thumbnail properties
    • qStaticContentUrlDef object
      Required

      In addition, this structure can contain dynamic properties.

      Show qStaticContentUrlDef properties
      • qUrl string
        Required

        Relative path of the thumbnail.

sheetList object

sheetList

Properties

  • qAppObjectListDef object
    Required

    Defines the list of objects in an app. An app object is a generic object created at app level.

    Show qAppObjectListDef properties
    • qData object
      Required

      Contains dynamic JSON data specified by the client.

      Show qData properties
      • cells string

        Path to cells in SheetProperties Default:/cells

      • columns string

        Path to columns in SheetProperties Default:/columns

      • description string

        Path to description in SheetProperties Default:/qMetaDef/description

      • descriptionExpression string

        Path to descriptionExpression in SheetProperties Default:/qMetaDef/descriptionExpression

      • labelExpression string

        Path to labelExpression in SheetProperties Default:/labelExpression

      • rank string

        Path to rank in SheetProperties Default:/rank

      • rows string

        Path to rows in SheetProperties Default:/rows

      • showCondition string

        Path to showCondition in SheetProperties Default:/showCondition

      • thumbnail string

        Path to thumbnail in SheetProperties Default:/qMetaDef/thumbnail

      • title string

        Path to title in SheetProperties Default:/qMetaDef/title

    • qType string

      Object type. Default:sheet

  • qExtendsId string
    Required

    Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.

  • qInfo object
    Required
    Show qInfo properties
    • qId string
      Required

      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

      List object type. Default:SheetList

  • qMetaDef object
    Required

    Used to collect meta data.

    Properties Semantic type with an empty structure.

  • qStateName string

    Name of the alternate state. Default is current selections $ . Default:$

sheetList

const sheetListProps = {
  "qInfo": {
    "qType": "SheetList",
    "qId": ""
  },
  "qAppObjectListDef": {
    "qData": {
      "title": "/qMetaDef/title",
      "labelExpression": "/labelExpression",
      "showCondition": "/showCondition",
      "description": "/qMetaDef/description",
      "descriptionExpression": "/qMetaDef/descriptionExpression",
      "thumbnail": "/qMetaDef/thumbnail",
      "cells": "/cells",
      "rank": "/rank",
      "columns": "/columns",
      "rows": "/rows"
    },
    "qType": "sheet"
  }
};
const sheetList = await doc.createSessionObject(sheetListProps).then(list => list.getLayout());

variable object

variable

Properties

  • qComment string
    Required

    Comment related to the variable. This parameter is optional.

  • qDefinition string
    Required

    Definition of the variable.

  • qIncludeInBookmark boolean

    Set this property to true to update the variable when applying a bookmark. The variable value will be persisted in the bookmark. The value of a variable can affect the state of the selections. Script variables cannot be persisted in the bookmark. The default value is false. Default:false

  • qInfo object
    Required
    Show qInfo properties
    • qId string
      Required

      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

      Object type. Default:variable

  • qMetaDef object
    Required

    Used to collect meta data.

    Properties Semantic type with an empty structure.

  • qName string
    Required

    Name of the variable. The name must be unique. This parameter is mandatory.

  • qNumberPresentation object
    Required

    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
    • qDec string
      Required

      Defines the decimal separator. Example: .

    • qFmt string
      Required

      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.

    • qThou string
      Required

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

    • qType string
      Required

      One of: U, A, I, R, F, M, D, T, TS, IV.

    • qUseThou integer

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

    • qnDec integer

      Number of decimals. Default is 10. Default:10

  • tags Array< string >
    Required

    Tags added to the variable. Optional.

variableList object

Properties for defining list of Variables.

Properties

  • qExtendsId string
    Required

    Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.

  • qInfo object
    Required
    Show qInfo properties
    • qId string
      Required

      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

      List object type. Default:VariableList

  • qMetaDef object
    Required

    Used to collect meta data.

    Properties Semantic type with an empty structure.

  • qStateName string

    Name of the alternate state. Default is current selections $ . Default:$

  • qVariableListDef object
    Required

    Defines the list of variables in an app.

    Show qVariableListDef properties
    • qData object
      Required

      Contains dynamic JSON data specified by the client.

      Show qData properties
      • tags string

        Path to tags in VariableProperties Default:/tags

    • qShowConfig boolean

      Shows the system variables if set to true. Default:true

    • qShowReserved boolean

      Shows the reserved variables if set to true. Default:true

    • qShowSession boolean
      Required

      Shows the session variables if set to true.

    • qType string

      Object type. Default:variable

variableList

const variableListProps = {
  "qInfo": {
    "qType": "VariableList",
    "qId": ""
  },
  "qVariableListDef": {
    "qData": {
      "tags": "/tags"
    },
    "qType": "variable",
    "qShowReserved": "true",
    "qShowConfig": "true",
    "qShowSession": true
  }
};
const variableList = await doc.createSessionObject(variableListProps).then(list => list.getLayout());