Capability APIs

The Capability APIs are a collection of JavaScript APIs that allows you to easily embed Qlik Sense content into a web page, and interact with data. With just a few lines of code, it is possible to create a visualization that leverages the Qlik Sense visualization library. Consider using the qlik-embed toolkit with the classic/chart or analytics/chart UI for a more modern embedding experience.

Download specification

js/qlik module

External interface to qlik, for mashups and including qlik in foreign web pages.

Properties

  • navigation QNavigation
    Required
    Show navigation properties
    • ANALYSIS string
      Required

      Used for analysis mode.

    • EDIT string
      Required

      Used for edit mode.

    • getCurrentSheetId() function
      Required

      Get current sheet ID.

      Returns
      • The result of the navigation

        Show properties
        • success boolean
          Required

          true if the navigation was successful.

        • sheetId string

          The new sheet ID.

        • error string

          The error code if an error occurred, for example, NOSUCHSHEET or NOCURRENTSHEET.

        • errorMsg string

          The error message, for example, 'No current sheet'.

    • getMode() function
      Required

      Get current mode.

      Returns
      • string
        Required

        mode The current mode.

    • gotoSheet() function
      Required

      Navigates to a given sheet in the current app. Note that the method will return before the actual navigation takes place.

      Parameters
      • sheetId string
        Required

        The ID of the sheet to navigate to.

      Returns
    • gotoStory() function
      Required

      Navigates to a given story in the current app. Note that the method will return before the actual navigation takes place.

      Parameters
      • storyId string
        Required

        The ID of the story to navigate to.

      Returns
      • The result of the navigation operation.

        Show properties
        • success boolean
          Required

          true if the navigation was successful.

        • storyId string

          The new story ID.

        • error string

          The error code if an error occurred, for example, NOSUCHSTORY.

        • errorMsg string

          The error message, for example, 'No such story'.

    • isModeAllowed() function
      Required

      Checks if a given mode is allowed.

      Parameters
      • mode string
        Required

        The mode to check availability of. Can be either {@link QNavigaton#EDIT} or {@link QNavigaton#ANALYSIS}.

      Returns
      • boolean
        Required

        If the mode is allowed or not.

    • nextSheet() function
      Required

      Navigates to the next sheet in the current app. It will do nothing if you do not have sheets in the current context. Note that the method will return before the actual navigation takes place.

      Returns
    • prevSheet() function
      Required

      Navigates to the previous sheet in the current app. It will do nothing if you do not have sheets in the current context. Note that the method will return before the actual navigation takes place.

      Returns
    • setMode() function
      Required

      Set current mode.

      Parameters
      • mode string
        Required

        The mode to change to. Can be either {@link QNavigation#EDIT} or {@link QNavigation#ANALYSIS}.

      Returns
      • The result of the mode change.

        Show properties
        • success boolean
          Required

          true if the operation was successful.

        • mode string

          The new mode. Can be either {@link QNavigation#EDIT} or {@link QNavigation#ANALYSIS}.

        • error string

          The error code if an error occurred, for example, MODENOTALLOWED.

        • errorMsg string

          The error message, for example, 'Mode not allowed'.

  • Required
    Show theme properties
    • apply() function
      Required

      Apply a theme to all visualizations on the web page.

      Parameters
      • id string
        Required

        ID of theme to apply.

      Returns
      • Promise < boolean >
        Required

        Promise of a boolean to indicate success or not.

    • get() function
      Required

      Get theme as a QTheme object.

      Parameters
      • id string
        Required

        Theme id

      Returns
      • Promise < QTheme >
        Required

        A promise of a QTheme object.

js/qlik

var config = {
	 host: "myhost.com",
	 prefix: "/",
	 port: window.location.port,
	 isSecure: true
};
requirejs(["js/qlik"], function(qlik) {
	 // open the app
  var app = qlik.openApp("c31e2aba-3b46-4b13-8b87-c5c2514dea1d", config);
	 // insert Qlik objects into the page.
	 app.getObject(document.getElementById("LB01"), "uPyZavD");
}

js/qlik callRepository(path, method?, body?) function

Deprecated

Call Qlik repository.

Parameters

  • path string
    Required

    Path to the Qlik Sense repository. Refer to Qlik Sense repository documentation for the available paths.

  • method string

    HTTP method.

  • body string

    Body of the post.

Returns

  • Promise < object >
    Required

    A promise of a Qlik repository reply.

callRepository

qlik.callRepository("/qrs/extension/schema").then(function(reply) {
		console.log(JSON.stringify(reply));
	  });

js/qlik currApp(reference?) function

Get a reference to the current app. Use in an extension to get a reference to the app displayed.

Parameters

  • reference object

    Reference to extension object. Since Qlik Sense 1.1

Returns

  • Required

    An App JavaScript object with app methods.

    Show properties
    • addAlternateState() function
      Required

      Add an alternate state.

      Introduced in Qlik Sense 1.1.

      Parameters
      • qStateName string
        Required

        Alternate state name.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • back() function
      Required

      Back to prev selection.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • bookmark QBookmark
      Required
      Show bookmark properties
      • apply() function
        Required

        Apply bookmark.

        Parameters
        • id string
          Required

          Bookmark ID.

        Returns
        • Promise
          Required

          A promise of a Qlik engine reply. Since Qlik Sense 1.2.

      • create() function
        Required

        Create bookmark based on current selection.

        Parameters
        • title string
          Required

          Bookmark title.

        • description string
          Required

          Bookmark description.

        • sheetId string

          Bookmark sheet ID. Since Qlik Sense 2.2.

        Returns
        • Promise
          Required

          A promise of a Qlik engine reply. Since Qlik Sense 1.2.

      • remove() function
        Required

        Remove bookmark.

        Parameters
        • id string
          Required

          Bookmark ID.

        Returns
        • Promise
          Required

          A promise of a Qlik engine reply. Since Qlik Sense 1.2.

    • clearAll() function
      Required

      Clear all selections.

      Parameters
      • lockedAlso boolean

        Also clear locked fields. Since Qlik Sense 2.1

      • state string

        Alternate state name. Since Qlik Sense 2.1

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • close() function
      Required

      Close an app.

      Will also close the web socket and clear out client side data.

      Introduced in Qlik Sense 1.1

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • createCube() function
      Required

      Defines a Qlik Hypercube and registers a callback to receive the data.

      Parameters
      • qHyperCubeDef object
        Required

        Cube definition.

      • callback function

        Callback method. Parameter will contain a qHyperCube.

      Returns
      • Promise
        Required

        A promise of an object model.

    • createGenericObject() function
      Required

      Creates a Qlik Generic object and registers a callback to receive the data. The generic object can contain qHyperCubeDef, qListObjectDef and/or qStringExpression and qValueExpression. It will be a session object and disppears when the session is closed. The callback method will be called whenever the selection state changes in a way that affects the generic object. The parameter will be the evaluated version of the definition.

      Parameters
      • param object
        Required

        Generic object definition.

      • callback function

        Callback method.

      Returns
      • Promise
        Required

        A promise of an object model.

    • createList() function
      Required

      Defines a Qlik list of field values and registers a callback to receive the data.

      Parameters
      • qListObjectDef object
        Required

        List definition.

      • callback function

        Callback method. Parameter will contain a qListObject.

      Returns
      • Promise
        Required

        A promise of an object model.

    • createTable() function
      Required

      Defines a Qlik Hypercube and creates a table object wrapping the hypercube.

      Introduced in Qlik Sense 2.1.

      Parameters
      • dimensions Array< string  |  NxDimension >
        Required

        Dimensions to use. Should be a field name or a NxDimension structure for each entry.

      • measures Array< string  |  NxMeasure >
        Required

        Measures to use. Should be an expression or a NxMeasure structure for each entry.

      • options object

        Options to set.

      Returns
      • Required

        A table object of type QTable, which is initially empty but eventually will contain data. The table object will be updated when selection state changes.

    • destroySessionObject() function
      Required

      Destroys a Qlik Session object created with createGenericObject or any of createCube, createList, or getList calls.

      The object will be removed from engine, no more updates will be sent to the client and all methods on the object will be invalid.

      Introduced in Qlik Sense 1.1.

      Parameters
      • id string
        Required

        Session object ID.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • doReload() function
      Required

      Reload the app.

      Introduced in Qlik Sense 1.1

      Parameters
      • qMode number

        Error handling mode: 0 = default mode, 1 = attempt recovery on all errors, 2 = fail on all errors.

      • qPartial boolean

        Set to true for partial reload.

      • qDebug boolean

        Set to true if debug breakpoints are honored. Execution of the script will be in debug mode.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • doSave() function
      Required

      Save the app.

      Introduced in Qlik Sense 1.1.

      Parameters
      • qFileName string

        File name of the file to save.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • field() function
      Required

      Get a field reference with methods to manipulate field.

      Parameters
      • fld string
        Required

        Name of the field.

      • statename string

        Alternate state name.

      Returns
      • Required

        A QField object with methods and properties that can be used to manipulate the field.

        Show properties
        • clear() function
          Required

          Clears a field selection.

          Returns
          • Promise
            Required

            A promise of an engine response.

        • clearOther() function
          Required

          Clears all field selections except this one.

          Parameters
          • softlock boolean

            If true, locked selections can be overridden.

          Returns
          • Promise
            Required

            A promise of an engine response.

        • getData() function
          Required

          Gets field data. The values are available as QFieldValue in array field.rows and is updated when the selection state changes. Notification OnData will be triggered after each update.

          Introduced in Qlik Sense 2.1

          Parameters
          • options object

            Object containing options for the getData call.

            Show options properties
            • rows number

              Number of rows to fetch. Default 200.

            • frequencyMode string

              Sets the qFrequencyMode. V=Absolute, P=Percent, R=Relative, N=No frequency. Default V.

          Returns
        • getMoreData() function
          Required

          Get more data for your field. Notification OnData will be triggered when complete.

          Introduced in Qlik Sense 2.1

          Returns
        • lock() function
          Required

          Locks a field selection.

          Returns
          • Promise
            Required

            A promise of an engine response.

        • Required

          OnData notification

          Show OnData properties
          • bind() function
            Required

            Observe a Notification by sending in an observer function.

            Parameters
            • observer function
              Required

              The observer function to handle the notification.

          • unbind() function
            Required

            Stop observing a notification.

            Parameters
            • observer function
              Required

              The observer function that now should ignore any future notifications.

        • qStateCounts object
          Required

          Object with number of values in different states. Only after getData() call.

          Introduced in Qlik Sense 2.1.

        • rowCount number
          Required

          Number of different values. Only after getData() call.

          Introduced in Qlik Sense 2.1.

        • rows Array< QFieldValue >
          Required

          Field values. You need to call getData() method to make this available. Since Qlik Sense 2.1.

        • select() function
          Required

          Select field values using indexes.

          Parameters
          • Array Array< any >
            Required

            of indexes to values to select.

          • toggle boolean

            If true, toggle selected state.

          • softlock boolean

            If true, locked selections can be overridden.

          Returns
          • Promise
            Required

            A promise of an engine response.

        • selectAll() function
          Required

          Select all values in field.

          Parameters
          • softlock boolean

            If true, locked selections can be overridden.

          Returns
          • Promise
            Required

            A promise of an engine response.

        • selectAlternative() function
          Required

          Select alternative values in field.

          Parameters
          • softlock boolean

            If true, locked selections can be overridden.

          Returns
          • Promise
            Required

            A promise of an engine response.

        • selectExcluded() function
          Required

          Select excluded values in field.

          Parameters
          • softlock boolean

            If true, locked selections can be overridden.

          Returns
          • Promise
            Required

            A promise of an engine response.

        • selectMatch() function
          Required

          Select matching field values.

          Parameters
          • match string
            Required

            Match string.

          • softlock boolean

            If true, locked selections can be overridden.

          Returns
          • Promise
            Required

            A promise of an engine response.

        • selectPossible() function
          Required

          Select possible values in field.

          Parameters
          • softlock boolean

            If true, locked selections can be overridden.

          Returns
          • Promise
            Required

            A promise of an engine response.

        • selectValues() function
          Required

          Select field values.

          Parameters
          • values Array< object >
            Required

            Array of qFieldValues to select. Since 1.1, a simplified syntax with strings OR numbers also works. Note that for a numeric field, you need to provide the numeric value.

          • toggle boolean

            If true, toggle selected state. If false replace the current selection.

          • softlock boolean

            If true, locked selections can be overridden.

          Returns
          • Promise
            Required

            A promise of an engine response.

        • toggleSelect() function
          Required

          Toggle field selection.

          Parameters
          • match string
            Required

            Match string.

          • softlock boolean

            If true, locked selections can be overridden.

          Returns
          • Promise
            Required

            A promise of an engine response.

        • unlock() function
          Required

          Unlocks a field selection.

          Returns
          • Promise
            Required

            A promise of an engine response.

    • forward() function
      Required

      Forward

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • getAppLayout() function
      Required

      Get layout for this app and register a callback to receive the data.

      Introduced in Qlik Sense 1.1.

      Parameters
      • callback function

        Callback method.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • getAppObjectList() function Deprecated
      Required

      Get a list of Qlik application objects and register a callback to receive the data.

      Parameters
      • type string

        Type of object. One of: sheet, MasterObject.

      • callback function

        Callback method.

    • getFullPropertyTree() function
      Required

      Get properties for a Qlik object including children properties.

      Parameters
      • id string
        Required

        Object ID.

      Returns
      • Promise
        Required

        A promise of an object model.

    • getList() function
      Required

      Get a list of internal Qlik objects and register a callback to receive the data.

      Parameters
      • type string
        Required

        Type of object. One of: FieldList, MeasureList, DimensionList, BookmarkList, SelectionObject, SnapshotList Since Qlik Sense 1.1, MediaList Since Qlik Sense 1.1, sheet Since Qlik Sense 1.1, MasterObject Since Qlik Sense 1.1, VariableList Since Qlik Sense 2.0, story Since Qlik Sense 2.1

      • callback function

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

      Returns
      • Promise
        Required

        A promise of an object model.

    • getObject() function
      Required

      Inserts a Qlik object into an HTML element. The object will fill the HTML object, so you can size and position the element to determine how large the Qlik object will be.

      If you only supply one parameter, you will just get the model without displaying the object.

      Parameters
      • elem HTMLElement  |  string

        HTML element. Since version 1.1, it is also possible to define a string of the HTML element ID.

      • id string
        Required

        Object ID or 'CurrentSelections' if used for Selections bar. Since version November 2017 it is also possible to use 'AppNavigationBar' to on-demand app navigation bar.

      • options object

        Additional options.

        Show options properties
        • noInteraction boolean

          Set to true if you want to disable interaction, including selections, in the visualization. Since Qlik Sense 1.1

        • noSelections boolean

          Set to true if you want to disable selections in the visualization. Since Qlik Sense 3.0

        • variant string

          used only when getting 'CurrentSelections', for rendering the "dark" variant. Possible values: "dark".

        • sheetId string

          Sheet id where App Navigation bar exists. (only applies if id='AppNavigationBar') Since Qlik Sense November 2017

        • openAppCallback function

          Used if you want to handle what happens when user clicks the 'open generated app' button. Otherwise by default generated app is opened in new tab. Callback returns appId and targetSheetId. (only applies if id='AppNavigationBar') Since Qlik Sense November 2017

      Returns
      • Promise
        Required

        A promise of an object model.

    • getObjectProperties() function
      Required

      Get properties for a Qlik object.

      Parameters
      • id string
        Required

        Object ID.

      Returns
      • Promise
        Required

        A promise of an object model.

    • getScript() function
      Required

      Gets the data load script of this app.

      Introduced in Qlik Sense 4.0

      Returns
      • Promise
        Required

        A promise of a qScript object with the load script values.

    • getSnapshot() function
      Required

      Inserts a Qlik snapshot into an HTML element. The snapshot will fill the HTML object, so you can size and position the element to determine how large the Qlik object will be.

      If you only supply one parameter you will just get the model without displaying the object.

      Parameters
      • element HTMLElement  |  string

        HTML element or string with HTML element id.

      • id string
        Required

        Snapshot ID.

      Returns
      • Promise
        Required

        A promise of an object model.

    • lockAll() function
      Required

      Lock all selections.

      Parameters
      • state string

        Alternate state name. Since Qlik Sense 2.1.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • off() function
      Required

      Remove listener(s) for the app events.

      Introduced in Qlik Sense February 2018.

      Parameters
      • eventName string

        Name of the event. Can be: error, warning, closed. If no eventName is provided, removes all listeners.

    • on() function
      Required

      Add listener(s) to the app events. Possible events are error, warning and closed. Multiple listeners can be added to an event.

      Introduced in Qlik Sense February 2018.

      Parameters
      • eventName string
        Required

        Name of the event. Can be: error, warning, closed.

      • callback function
        Required

        Callback method.

    • removeAlternateState() function
      Required

      Remove an alternate state.

      Introduced in Qlik Sense 1.1.

      Parameters
      • qStateName string
        Required

        Alternate state name

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • searchAssociations() function Deprecated
      Required

      Searches for one or more terms in the values of an app.

      Introduce in Qlik Sense 1.1.

      Parameters
      • qTerms Array< string >
        Required

        Terms to search for.

      • qPage object
        Required
        Show qPage properties
        • qOffset number
          Required

          Position from the top, starting from 0.

        • qCount number
          Required

          Number of search results to return.

        • qMaxNbrFieldMatches number
          Required

          Maximum number of matching values to return per search result.

      • qOptions object

        Search options.

        Show qOptions properties
        • qSearchFields Array< string >

          List of search fields.

        • qContext string

          Search context. Can be one of: Cleared, LockedFieldsOnly, CurrentSelections.

      • callback function

        Callback method.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • searchResults() function
      Required

      Searches for one or more terms in the values of an app.

      Introduced in Qlik Sense 2.2.

      Parameters
      • qTerms Array< string >
        Required

        Terms to search for.

      • qPage object
        Required
        Show qPage properties
        • qOffset number
          Required

          Position from the top, starting from 0.

        • qCount number
          Required

          Number of search results to return.

        • qGroupOptions Array< SearchGroupOptions >

          Options of the search groups. If this property is not set, all values are returned.

        • qGroupItemOptions Array< SearchGroupItemOptions >

          Options of the search group items. If this property is not set, all values are returned.

      • qOptions object

        Search options.

        Show qOptions properties
        • qSearchFields Array< string >

          List of search fields.

        • qContext string

          Search context. Can be one of: Cleared, LockedFieldsOnly, CurrentSelections.

      • callback function

        Callback method.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • searchSuggest() function
      Required

      Returns search suggestions.

      Introduced in Qlik Sense 1.1.

      Parameters
      • qTerms Array< string >
        Required

        Terms to search for.

      • qOptions object

        Search options.

        Show qOptions properties
        • qSearchFields Array< string >

          List of search fields.

      • callback function

        Callback method.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • selectAssociations() function
      Required

      Make a selection based on searchAssociaton results.

      Introduced in Qlik Sense 1.1.

      Parameters
      • qMatchIx number

        Index to search result.

      • qTerms Array< string >

        Values to select.

      • qOptions object

        Parameter sent to the Qlik engine containing information about the search fields and the search context.

        Show qOptions properties
        • qSearchFields Array< string >

          List of the search fields. If empty, the search is performed in all fields of the app.

        • qContext string

          Search context. Can be one of: Cleared, LockedFieldsOnly, CurrentSelections.

      • qSoftLock boolean

        Use the qOptions.qContext parameter instead.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • selectionState() function
      Required

      Creates a SelectionState object that encapsulates the selection state.

      Introduced in Qlik Sense 2.2.

      Parameters
      • state string

        Sets the state.

      Returns
      • A selection state object for the selection state of type QSelectionState.

        Show properties
        • stateName string
          Required

          State name, '$' for default state.

        • selections Array< QFieldSelections >
          Required

          Selections

        • backCount number
          Required

          Number of back steps available.

        • forwardCount number
          Required

          Number of forward steps available.

        • Required

          OnData notification.

        • clearAll() function
          Required

          Clear all selections in this state.

          Parameters
          • lockedAlso boolean

            Clear locked fields also.

          Returns
          • Promise
            Required

            A promise of a Qlik engine reply.

        • lockAll() function
          Required

          Lock all selections in this state.

          Returns
          • Promise
            Required

            A promise of a Qlik engine reply.

        • unlockAll() function
          Required

          Unlock all selections in this state.

          Returns
          • Promise
            Required

            A promise of a Qlik engine reply

    • setScript() function
      Required

      Sets the data load script of this app. Also validates the script syntax and returns the syntax errors if errors exist.

      Introduced in Qlik Sense 4.0.

      Parameters
      • script string
        Required

        The script content.

      Returns
      • Promise
        Required

        A promise of an empty object or a list of syntax errors depending on the validation result.

    • Required
      Show theme properties
      • get() function
        Required

        Get theme as a QTheme object.

        Parameters
        • id string

          Theme ID. If no ID is specified, the theme saved for the app is returned.

        Returns
        • Promise < QTheme >
          Required

          A promise of a QTheme object.

      • getApplied() function
        Required

        Get currently applied theme as a QTheme object.

        Returns
        • Promise < QTheme >
          Required

          A promise of a QTheme object.

      • save() function
        Required

        Save a theme ID of an app.

        Introduced in Qlik Sense February 2018.

        Parameters
        • id string
          Required

          Theme ID.

    • unlockAll() function
      Required

      Unlock all selections.

      Parameters
      • state string

        Alternate state name. Since Qlik Sense 2.1.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • variable QVariable
      Required
      Show variable properties
      • create() function
        Required

        Create variable.

        Returns
        • Promise
          Required

          Promise of a Variable model.

      • createSessionVariable() function
        Required

        Create session variable, which is a temporary variable that is not persisted and needs to be recreated for each new session.

        Introduced in Qlik Sense 2.1.

        Parameters
        • qProp object
          Required

          Variable properties.

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

              Variable ID.

          • qName string
            Required

            Variable name.

          • qComment string

            Comment regarding the variable.

          • qDefinition string

            Variable definition.

          • qNumberPresentation object

            Defines the format of the value.

          • qIncludeInBookmark boolean

            Include in bookmark flag.

        Returns
        • Promise
          Required

          Promise of a Variable model.

      • get() function
        Required

        Get a variable by ID.

        Introduced in Qlik Sense 2.1.

        Parameters
        • qId string
          Required

          Variable ID.

        Returns
        • Promise
          Required

          Promise of a Variable model.

      • getByName() function
        Required

        Get a variable by name.

        Introduced in Qlik Sense 2.1.

        Parameters
        • qName string
          Required

          Variable name.

        Returns
        • Promise
          Required

          A promise of a Variable model.

      • getContent() function
        Required

        Get variable content.

        Parameters
        • name string
          Required

          Variable name.

        • Required

          Callback to receive the content.

          Show callback properties
          • getContentCallback() function
            Required
            Parameters
            • data object
              Required

              Content of the variable.

              Show data properties
              • qContent object
                Required

                Value of the variable.

                Show qContent properties
                • qString string
                  Required

                  Textual value of the variable.

                • qIsNum number
                  Required

                  Numeric value of the variable, if the value can be converted into a number.

            • qapp object
              Required

              The qlik.app object wrapping the app.

        Returns
        • Promise
          Required

          A promise of a Qlik engine reply.

      • setContent() function Deprecated
        Required

        Set variable content.

        Parameters
        • name string
          Required

          Variable name.

        • content string
          Required

          Variable content.

        Returns
        • Promise
          Required

          A promise of a Qlik engine reply.

      • setNumValue() function
        Required

        Set variable numeric value.

        Introduced in Qlik Sense 2.1.

        Parameters
        • qName string
          Required

          Variable name.

        • qVal number
          Required

          Variable value.

        Returns
        • Promise
          Required

          A promise of a Qlik engine reply.

      • setStringValue() function
        Required

        Set variable string value.

        Introduced in Qlik Sense 2.1.

        Parameters
        • qName string
          Required

          Variable name.

        • qVal string
          Required

          Variable value.

        Returns
        • Promise
          Required

          A promise of a Qlik engine reply.

    • visualization QAppVisualization
      Required
      Show visualization properties
      • create() function
        Required

        Create a new visualization. The visualization will be based on a session object and not persisted in the app.

        Parameters
        • type string
          Required

          Visualization type. Built-in visualization like barchart, piechart, linechart, combochart or an extension.

        • cols Array< string  |  NxDimension  |  NxMeasure >

          Column definitions, dimensions and measures. Each entry can be a string, an NxDimension or NxMeasure structure. If the NxDimension or NxMeasure refers to a library dimension or measure, you also might need to add qType measure or dimension.

        • options object

          Options to set. Refer to documentation for the visualization used for additional options.

          Show options properties
          • title string  |  Expression

            Visualization title.

          • showTitles boolean

            Show title for visualization. Default true.

          • subtitle string  |  Expression

            Visualization subtitle.

          • footnote string  |  Expression

            Visualization footnote.

        Returns
      • get() function
        Required

        Get an existing visualization.

        Introduced in Qlik Sense 2.2.

        Parameters
        • id string
          Required

          ID for an existing visualization.

        Returns

currApp

var app = qlik.currApp(this);
   app.clearAll();

js/qlik getAppList(callback, config?) function

Get a list of Qlik apps and register a callback to receive the data. The reply will contain all apps the user has access to.

Parameters

  • callback function
    Required

    Callback method.

  • config object

    Additional configuration parameters.

    Show config properties
    • host string

      Qlik host

    • port string  |  number

      Port number as a string or a number.

    • prefix string

      Qlik virtual proxy, '/' if no proxy

    • isSecure boolean

      Use SSL

    • identity string

      Unique identity for the session. If omitted, the session will be shared.

getAppList

var config = {
		host: "myhost.com",
		prefix: "/",
		port: window.location.port,
		isSecure: true
	};
 qlik.getAppList(function(list){
		var str = "";
		list.forEach(function(value) {
			str +=  value.qDocName + "("+ value.qDocId +") ";
		});
		console.log(str);
	}, config);

js/qlik getExtensionList(callback?) function

Deprecated

Get the list of extensions installed in the system. The reply will contain all extensions such as visualizations, mashups, and so on.

Parameters

  • callback function

    Callback method.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

getExtensionList

qlik.getExtensionList(function(list){
		var str = "";
		list.forEach(function(value) {
			str +=  value.id + "(" + value.data.type + ") ";
		});
		console.log(str);
	});

js/qlik getGlobal(config?) function

Open a connection with a Web Socket to engine for global methods.

Parameters

  • config object

    Additional configuration parameters.

    Show config properties
    • host string

      Qlik host

    • port string  |  number

      Port number as a string or a number.

    • prefix string

      Qlik virtual proxy, '/' if no proxy

    • isSecure boolean

      Use SSL

    • identity string

      Unique identity for the session. If omitted, the session will be shared.

Returns

  • Required

    A global JavaScript object with global methods.

    Show properties
    • cancelReload() function
      Required

      Cancel reload.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • getAppList() function
      Required

      Get app list.

      Parameters
      • callback function
        Required

        callback method.

    • getAuthenticatedUser() function
      Required

      Retrieves information about the authenticated user. Note: This method is only applicable to Qlik Sense Enterprise on Windows. For Qlik Sense Enterprise SaaS, use {@link https://qlik.dev/apis/rest/users#%23%2Fentries%2Fusers%2Fme-get|User API}

      Parameters
      • callback function

        callback method.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • getProductVersion() function Deprecated
      Required

      Get Product Version.

      Introduced in Qlik Sense 1.2.

      Parameters
      • callback function

        callback method.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • getProgress() function
      Required

      Get Progress.

      Introduced in Qlik Sense 2.1.

      Parameters
      • qRequestId number
        Required

        RequestId from doReload call or 0. Complete information is returned if the identifier of the request is specified. If qRequestId = 0, less information is returned.

      • callback function

        callback method.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • getQTProduct() function
      Required

      Get QT Product.

      Parameters
      • callback function

        callback method.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • isPersonalMode() function
      Required

      Get isPersonalMode.

      Parameters
      • callback function

        callback method.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • off() function
      Required

      Remove listener(s) for the global events.

      Introduced in Qlik Sense February 2018.

      Parameters
      • eventName string

        Name of the event. Can be: error, warning, closed. Removes all listeners if no eventName is provided.

    • on() function
      Required

      Adds listeners to the global events. Possible events are error, warning, and closed. Multiple listeners can be added to an event.

      Introduced in Qlik Sense February 2018

      Parameters
      • eventName string
        Required

        Name of the event. Can be: error, warning, closed.

      • callback function
        Required

        Callback method.

getGlobal

var config = {
		host: "myhost.com",
		prefix: "/",
		port: window.location.port,
		isSecure: true
	  };
   var global = qlik.getGlobal(config);
   global.getAuthenticatedUser(function(reply){
		console.log("User:"+reply.qReturn);
	  });

js/qlik getThemeList() function

Get a list of themes from the system. The list will contain both default and custom themes.

Returns

  • Promise
    Required

    A promise of a list of themes including the ID and the metadata name.

getThemeList

qlik.getThemeList().then(function(list){
		var str = "";
		list.forEach(function(value) {
			str += value.name + '(' + value.id + ")\n";
		});
		console.log(str);
	});

js/qlik off(eventName?) function

Remove listener(s) for the qlik instance events.

Parameters

  • eventName string

    Name of the event. If no eventName is provided, removes all listeners.

off

qlik.on("error", err=>{
  console.error(err);
});
qlik.off("error");

js/qlik on(eventName, callback) function

Add listener(s) to the qlik instance events. Possible events are error, warning, and closed. Multiple listeners can be added to an event.

Parameters

  • eventName string
    Required

    Name of the event. Can be: error, warning, closed. Note: this event handler will be overridden by app event handlers or global event handlers if set.

  • callback function
    Required

    Callback method.

on

qlik.on("error", err=>{
  console.error(err);
});
qlik.on("warning", warn=>{
  console.warn(warn);
});

js/qlik openApp(appId, config?) function

Opens the app. You can open multiple apps. Most other methods are defined on the app. Introduced in Qlik Sense 1.0.

Parameters

  • appId string
    Required

    The app ID.

  • config object

    Additional configuration parameters.

    Show config properties
    • host string

      Qlik host

    • port string  |  number

      Port number as a string or a number.

    • prefix string

      Qlik virtual proxy, '/' if no proxy

    • isSecure boolean

      Use SSL

    • openWithoutData boolean

      Open app without loading data. Since Qlik Sense 1.1

    • identity string

      Unique identity for the session. If omitted, the session will be shared.

Returns

  • Required

    An App JavaScript object with app methods.

openApp

var app = qlik.openApp("2abac31e-3b46-4b78-8bxf-c5cea1d2514d");
     var config = {
		  host: "myhost.com",
		  prefix: "/",
		  port: window.location.port,
		  isSecure: true
	    };
     var app2 = qlik.openApp("c31e2aba-3b46-4b13-8b87-c5c2514dea1d", config);

js/qlik Promise(executor) function

Promise utility that can be used for asynchronous operations. Very useful for the paint method to indicate that the rendering is complete. Full documentation available on: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise.

Parameters

  • executor function
    Required

    The executing function with two parameters: resolve and reject.

Promise

var Promise = qlik.Promise;
qlik.registerExtension("dumpchart",
       {
     	paint:function($element,layout) {
       		return new Promise(function(resolve, reject) {
       	    	setTimeout(function() {
       	        	$element.html(JSON.stringify(layout));
       	        	resolve(); // Extension painted successfully
       	    	}, 1000);
       		});
       	}
   });

js/qlik registerExtension(id, impl, metadata?) function

Register an extension for use in this mashup. The extension will not be installed on Qlik Sense server, but only available in the session where it is created.

Parameters

  • id string
    Required

    Set the ID of the visualization extension.

  • impl object
    Required

    Set the extension implementation.

  • metadata object

    Extension metadata, same format as QEXT file.

registerExtension

qlik.registerExtension("dumpchart",

   {
       paint:function($element,layout){
           $element.html(JSON.stringify(layout));
       }
   });
requirejs([path +"/wordcloud/wordcloud.js"],function(wordcloud)
{
   qlik.registerExtension( "wordcloud", wordcloud );
});

js/qlik resize(ID?) function

Sends a resize event to all Qlik objects.

Parameters

  • ID string

    Object ID. Optional: if no ID, resize event will be sent to all objects.

resize

//create the tabs and make qlik objects resize
 //when a new tab is selected
 $("#tabs").tabs().bind("tabsselect", function(event, ui) {
		qlik.resize();
	});

js/qlik sessionApp(config?) function

Creates a session/cached QApp object.

Parameters

  • config object

    Additional configuration parameters.

    Show config properties
    • host string

      Qlik host

    • port string  |  number

      Port number as a string or a number.

    • prefix string

      Qlik virtual proxy, '/' if no proxy.

    • isSecure boolean

      Use SSL.

    • identity string

      Unique identity for the session. If omitted, the session will be shared.

Returns

  • Required

    An app JavaScript object with app methods.

sessionApp

Basic usage

var sessionApp = qlik.sessionApp();

Basic usage with config

var config = {
  host: "myhost.com",
  prefix: "/",
  port: window.location.port,
  isSecure: true
};
var sessionApp =  qlik.sessionApp(config);

js/qlik sessionAppFromApp(appId, config?) function

Creates a session/cached QApp object from an existing app.

Parameters

  • appId string
    Required

    App ID of the app to base the session app upon.

  • config object

    Additional configuration parameters.

    Show config properties
    • host string

      Qlik host

    • port string  |  number

      Port number as a string or a number.

    • prefix string

      Qlik virtual proxy, '/' if no proxy.

    • isSecure boolean

      Use SSL.

    • identity string

      Unique identity for the session. If omitted, the session will be shared.

Returns

  • Required

    An app JavaScript object with app methods.

sessionAppFromApp

Basic usage

var sessionApp = qlik.sessionAppFromApp("2abac31e-3b46-4b78-8bxf-c5cea1d2514d");

Basic usage with config

var config = {
  host: "myhost.com",
  prefix: "/",
  port: window.location.port,
  isSecure: true
};
var sessionApp = qlik.sessionAppFromApp("2abac31e-3b46-4b78-8bxf-c5cea1d2514d", config);

Multiple apps

var sessionApp = qlik.sessionAppFromApp("2abac31e-3b46-4b78-8bxf-c5cea1d2514d");
var sessionApp2 = qlik.sessionAppFromApp("c31e2aba-3b46-4b13-8b87-c5c2514dea1d");

js/qlik setDeviceType(deviceType) function

Sets device type, which modifies the UI accordingly. The device type is automatically detected if it is not manually set.

Parameters

  • deviceType string
    Required

    Type of device. One of: auto, touch, desktop.

setDeviceType

qlik.setDeviceType('desktop');

js/qlik setLanguage(lang) function

Set language.

Parameters

  • lang string
    Required

    Language code

setLanguage

qlik.setLanguage("es");

js/qlik setOnError(onError, onWarning?) function

Deprecated

Parameters

  • onError function
    Required

    Error handling function.

  • onWarning function

    Warning handling function. Since Qlik Sense 2.1.

setOnError

qlik.setOnError(function(error) {
  //contains code, message
	 console.log(error.message);
},
function(warning){
	 windows.console.log(warning);
});

js/qlik table(ext, path?) function

Create a QTable object that wraps data in your extension and provides an object-oriented interface.

Parameters

  • ext object
    Required

    Extension or angular scope for the extension.

  • path string

    Path to the hypercube.

Returns

  • Required

    table - A QTable object that holds data and options for the table.

    Show properties
    • rows Array< QRow >
      Required

      Data rows.

    • headers Array< QHeader >
      Required

      Header information.

    • totals Array< QMeasureCell >
      Required

      Total information for measures.

    • rowCount number
      Required

      Total number of rows for the qHyperCube, including rows not fetched from server.

    • colCount number
      Required

      Total number of columns for the qHyperCube.

    • exportData() function
      Required

      Export data of the underlying hyperCube in OOXML or CSV format.

      Note: The entire hyperCube will be exported, not just the current data-page. On Cloud this functionality will go through the Reports API, which limits the available options

      Parameters
      • options object
        Show options properties
        • format string

          Data format. Can be one of: OOXML (open XML, default), CSV_C (comma separated CSV), CSV_T (tab separated CSV)

        • filename string

          This parameter is optional and only used in desktop. Sets the name of the exported file when downloaded. Example: filename(guid).xlsx.

        • state string

          Can be: A: all values, P: possible values (default)

        • download boolean

          Automatically start download of file (with window.open), defaults to false.

      • callback function

        Callback function returning the link to the exported file.

    • getColByName() function
      Required

      Get column number for a given field name.

      Parameters
      • fld string
        Required

        Field name.

      Returns
      • number
        Required

        Column number, starting with zero. Undefined if no column with that name.

    • getMoreData() function
      Required

      Get more data for your qHyperCube.

table

$scope.table = qlik.table(this);

<tr ng-repeat="row in table.rows">
   <td ng-repeat="cell in row.cells"> {{cell.qText}} </td>
</tr>

new Notification() class

Notification bind(observer) function

Observe a Notification by sending in an observer function.

Parameters

  • observer function
    Required

    The observer function to handle the notification.

Notification unbind(observer) function

Stop observing a notification.

Parameters

  • observer function
    Required

    The observer function that now should ignore any future notifications.

ObjectMetricSize object

Describes the size, in millimeters (mm), of a 2D object.

Properties

  • height number
    Required

    Object height in millimeters (mm).

  • width number
    Required

    Object width in millimeters (mm).

ObjectPixelSize object

Describes the size, in pixels, of a 2D object.

Properties

  • height number
    Required

    Object height in pixels.

  • width number
    Required

    Object width in pixels.

new QApp() class

Properties

  • bookmark QBookmark
    Required
    Show bookmark properties
    • apply() function
      Required

      Apply bookmark.

      Parameters
      • id string
        Required

        Bookmark ID.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply. Since Qlik Sense 1.2.

    • create() function
      Required

      Create bookmark based on current selection.

      Parameters
      • title string
        Required

        Bookmark title.

      • description string
        Required

        Bookmark description.

      • sheetId string

        Bookmark sheet ID. Since Qlik Sense 2.2.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply. Since Qlik Sense 1.2.

    • remove() function
      Required

      Remove bookmark.

      Parameters
      • id string
        Required

        Bookmark ID.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply. Since Qlik Sense 1.2.

  • Required
    Show theme properties
    • get() function
      Required

      Get theme as a QTheme object.

      Parameters
      • id string

        Theme ID. If no ID is specified, the theme saved for the app is returned.

      Returns
      • Promise < QTheme >
        Required

        A promise of a QTheme object.

    • getApplied() function
      Required

      Get currently applied theme as a QTheme object.

      Returns
      • Promise < QTheme >
        Required

        A promise of a QTheme object.

    • save() function
      Required

      Save a theme ID of an app.

      Introduced in Qlik Sense February 2018.

      Parameters
      • id string
        Required

        Theme ID.

  • variable QVariable
    Required
    Show variable properties
    • create() function
      Required

      Create variable.

      Returns
      • Promise
        Required

        Promise of a Variable model.

    • createSessionVariable() function
      Required

      Create session variable, which is a temporary variable that is not persisted and needs to be recreated for each new session.

      Introduced in Qlik Sense 2.1.

      Parameters
      • qProp object
        Required

        Variable properties.

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

            Variable ID.

        • qName string
          Required

          Variable name.

        • qComment string

          Comment regarding the variable.

        • qDefinition string

          Variable definition.

        • qNumberPresentation object

          Defines the format of the value.

        • qIncludeInBookmark boolean

          Include in bookmark flag.

      Returns
      • Promise
        Required

        Promise of a Variable model.

    • get() function
      Required

      Get a variable by ID.

      Introduced in Qlik Sense 2.1.

      Parameters
      • qId string
        Required

        Variable ID.

      Returns
      • Promise
        Required

        Promise of a Variable model.

    • getByName() function
      Required

      Get a variable by name.

      Introduced in Qlik Sense 2.1.

      Parameters
      • qName string
        Required

        Variable name.

      Returns
      • Promise
        Required

        A promise of a Variable model.

    • getContent() function
      Required

      Get variable content.

      Parameters
      • name string
        Required

        Variable name.

      • Required

        Callback to receive the content.

        Show callback properties
        • getContentCallback() function
          Required
          Parameters
          • data object
            Required

            Content of the variable.

            Show data properties
            • qContent object
              Required

              Value of the variable.

              Show qContent properties
              • qString string
                Required

                Textual value of the variable.

              • qIsNum number
                Required

                Numeric value of the variable, if the value can be converted into a number.

          • qapp object
            Required

            The qlik.app object wrapping the app.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • setContent() function Deprecated
      Required

      Set variable content.

      Parameters
      • name string
        Required

        Variable name.

      • content string
        Required

        Variable content.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • setNumValue() function
      Required

      Set variable numeric value.

      Introduced in Qlik Sense 2.1.

      Parameters
      • qName string
        Required

        Variable name.

      • qVal number
        Required

        Variable value.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • setStringValue() function
      Required

      Set variable string value.

      Introduced in Qlik Sense 2.1.

      Parameters
      • qName string
        Required

        Variable name.

      • qVal string
        Required

        Variable value.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

  • visualization QAppVisualization
    Required
    Show visualization properties
    • create() function
      Required

      Create a new visualization. The visualization will be based on a session object and not persisted in the app.

      Parameters
      • type string
        Required

        Visualization type. Built-in visualization like barchart, piechart, linechart, combochart or an extension.

      • cols Array< string  |  NxDimension  |  NxMeasure >

        Column definitions, dimensions and measures. Each entry can be a string, an NxDimension or NxMeasure structure. If the NxDimension or NxMeasure refers to a library dimension or measure, you also might need to add qType measure or dimension.

      • options object

        Options to set. Refer to documentation for the visualization used for additional options.

        Show options properties
        • title string  |  Expression

          Visualization title.

        • showTitles boolean

          Show title for visualization. Default true.

        • subtitle string  |  Expression

          Visualization subtitle.

        • footnote string  |  Expression

          Visualization footnote.

      Returns
    • get() function
      Required

      Get an existing visualization.

      Introduced in Qlik Sense 2.2.

      Parameters
      • id string
        Required

        ID for an existing visualization.

      Returns

QApp addAlternateState(qStateName) function

Add an alternate state.

Introduced in Qlik Sense 1.1.

Parameters

  • qStateName string
    Required

    Alternate state name.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

addAlternateState

app.addAlternateState("X");

QApp back() function

Back to prev selection.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

back

var app = qlik.openApp('2abac31e-3b46-4b78-8bxf-c5cea1d2514d');
app.back();

QApp clearAll(lockedAlso?, state?) function

Clear all selections.

Parameters

  • lockedAlso boolean

    Also clear locked fields. Since Qlik Sense 2.1

  • state string

    Alternate state name. Since Qlik Sense 2.1

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

clearAll

var app = qlik.openApp('2abac31e-3b46-4b78-8bxf-c5cea1d2514d');
app.clearAll();

QApp close() function

Close an app.

Will also close the web socket and clear out client side data.

Introduced in Qlik Sense 1.1

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

close

var app = qlik.openApp('2abac31e-3b46-4b78-8bxf-c5cea1d2514d');
app.close();

QApp createCube(qHyperCubeDef, callback?) function

Defines a Qlik Hypercube and registers a callback to receive the data.

Parameters

  • qHyperCubeDef object
    Required

    Cube definition.

  • callback function

    Callback method. Parameter will contain a qHyperCube.

Returns

  • Promise
    Required

    A promise of an object model.

createCube

app.createCube({
  qDimensions : [{
    qDef : {
      qFieldDefs : ["FirstName"]
    }
  }, {
    qDef : {
      qFieldDefs : ["LastName"]
  }
}],
qMeasures : [{
  qDef : {
    qDef : "1"
  }
}],
qInitialDataFetch : [{
  qTop : 0,
  qLeft : 0,
  qHeight : 20,
  qWidth : 3
}]
}, function(reply) {
  var str = "";
  $.each(reply.qHyperCube.qDataPages[0].qMatrix, function(key, value) {
    str += '<li>' + value[0].qText + ':' + value[1].qText + '</li>';
  });
  $('#list').html(str);
});

QApp createGenericObject(param, callback?) function

Creates a Qlik Generic object and registers a callback to receive the data. The generic object can contain qHyperCubeDef, qListObjectDef and/or qStringExpression and qValueExpression. It will be a session object and disppears when the session is closed. The callback method will be called whenever the selection state changes in a way that affects the generic object. The parameter will be the evaluated version of the definition.

Parameters

  • param object
    Required

    Generic object definition.

  • callback function

    Callback method.

Returns

  • Promise
    Required

    A promise of an object model.

createGenericObject

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);
});

QApp createList(qListObjectDef, callback?) function

Defines a Qlik list of field values and registers a callback to receive the data.

Parameters

  • qListObjectDef object
    Required

    List definition.

  • callback function

    Callback method. Parameter will contain a qListObject.

Returns

  • Promise
    Required

    A promise of an object model.

createList

app.createList({
  "qDef": {
    "qFieldDefs": [
      "LastName"
    ]
   },
   "qInitialDataFetch": [{
     qTop : 0,
     qLeft : 0,
     qHeight : 20,
     qWidth : 1
   }]
   }, function(reply) {
     var str = "";
     $.each(reply.qListObject.qDataPages[0].qMatrix, function(key, value) {
       str += '<li>' + value[0].qText + '</li>';
     });
     $('#list').html(str);
   });

QApp createTable(dimensions, measures, options?) function

Defines a Qlik Hypercube and creates a table object wrapping the hypercube.

Introduced in Qlik Sense 2.1.

Parameters

  • dimensions Array< string  |  NxDimension >
    Required

    Dimensions to use. Should be a field name or a NxDimension structure for each entry.

  • measures Array< string  |  NxMeasure >
    Required

    Measures to use. Should be an expression or a NxMeasure structure for each entry.

  • options object

    Options to set.

Returns

  • Required

    A table object of type QTable, which is initially empty but eventually will contain data. The table object will be updated when selection state changes.

    Show properties
    • rows Array< QRow >
      Required

      Data rows.

    • headers Array< QHeader >
      Required

      Header information.

    • totals Array< QMeasureCell >
      Required

      Total information for measures.

    • rowCount number
      Required

      Total number of rows for the qHyperCube, including rows not fetched from server.

    • colCount number
      Required

      Total number of columns for the qHyperCube.

    • exportData() function
      Required

      Export data of the underlying hyperCube in OOXML or CSV format.

      Note: The entire hyperCube will be exported, not just the current data-page. On Cloud this functionality will go through the Reports API, which limits the available options

      Parameters
      • options object
        Show options properties
        • format string

          Data format. Can be one of: OOXML (open XML, default), CSV_C (comma separated CSV), CSV_T (tab separated CSV)

        • filename string

          This parameter is optional and only used in desktop. Sets the name of the exported file when downloaded. Example: filename(guid).xlsx.

        • state string

          Can be: A: all values, P: possible values (default)

        • download boolean

          Automatically start download of file (with window.open), defaults to false.

      • callback function

        Callback function returning the link to the exported file.

    • getColByName() function
      Required

      Get column number for a given field name.

      Parameters
      • fld string
        Required

        Field name.

      Returns
      • number
        Required

        Column number, starting with zero. Undefined if no column with that name.

    • getMoreData() function
      Required

      Get more data for your qHyperCube.

createTable

var users = app.createTable(["FirstName", "LastName"], ["Count(Case Id)"],{rows:200});

QApp destroySessionObject(id) function

Destroys a Qlik Session object created with createGenericObject or any of createCube, createList, or getList calls.

The object will be removed from engine, no more updates will be sent to the client and all methods on the object will be invalid.

Introduced in Qlik Sense 1.1.

Parameters

  • id string
    Required

    Session object ID.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

destroySessionObject

app.destroySessionObject( 'xcVtY');
app.destroySessionObject(reply.qInfo.qId);

QApp doReload(qMode?, qPartial?, qDebug?) function

Reload the app.

Introduced in Qlik Sense 1.1

Parameters

  • qMode number

    Error handling mode: 0 = default mode, 1 = attempt recovery on all errors, 2 = fail on all errors.

  • qPartial boolean

    Set to true for partial reload.

  • qDebug boolean

    Set to true if debug breakpoints are honored. Execution of the script will be in debug mode.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

doReload

app.doReload();

QApp doSave(qFileName?) function

Save the app.

Introduced in Qlik Sense 1.1.

Parameters

  • qFileName string

    File name of the file to save.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

doSave

app.doReload().then(function(){
   app.doSave();
});

QApp field(fld, statename?) function

Get a field reference with methods to manipulate field.

Parameters

  • fld string
    Required

    Name of the field.

  • statename string

    Alternate state name.

Returns

  • Required

    A QField object with methods and properties that can be used to manipulate the field.

    Show properties
    • clear() function
      Required

      Clears a field selection.

      Returns
      • Promise
        Required

        A promise of an engine response.

    • clearOther() function
      Required

      Clears all field selections except this one.

      Parameters
      • softlock boolean

        If true, locked selections can be overridden.

      Returns
      • Promise
        Required

        A promise of an engine response.

    • getData() function
      Required

      Gets field data. The values are available as QFieldValue in array field.rows and is updated when the selection state changes. Notification OnData will be triggered after each update.

      Introduced in Qlik Sense 2.1

      Parameters
      • options object

        Object containing options for the getData call.

        Show options properties
        • rows number

          Number of rows to fetch. Default 200.

        • frequencyMode string

          Sets the qFrequencyMode. V=Absolute, P=Percent, R=Relative, N=No frequency. Default V.

      Returns
    • getMoreData() function
      Required

      Get more data for your field. Notification OnData will be triggered when complete.

      Introduced in Qlik Sense 2.1

      Returns
    • lock() function
      Required

      Locks a field selection.

      Returns
      • Promise
        Required

        A promise of an engine response.

    • Required

      OnData notification

      Show OnData properties
      • bind() function
        Required

        Observe a Notification by sending in an observer function.

        Parameters
        • observer function
          Required

          The observer function to handle the notification.

      • unbind() function
        Required

        Stop observing a notification.

        Parameters
        • observer function
          Required

          The observer function that now should ignore any future notifications.

    • qStateCounts object
      Required

      Object with number of values in different states. Only after getData() call.

      Introduced in Qlik Sense 2.1.

    • rowCount number
      Required

      Number of different values. Only after getData() call.

      Introduced in Qlik Sense 2.1.

    • rows Array< QFieldValue >
      Required

      Field values. You need to call getData() method to make this available. Since Qlik Sense 2.1.

    • select() function
      Required

      Select field values using indexes.

      Parameters
      • Array Array< any >
        Required

        of indexes to values to select.

      • toggle boolean

        If true, toggle selected state.

      • softlock boolean

        If true, locked selections can be overridden.

      Returns
      • Promise
        Required

        A promise of an engine response.

    • selectAll() function
      Required

      Select all values in field.

      Parameters
      • softlock boolean

        If true, locked selections can be overridden.

      Returns
      • Promise
        Required

        A promise of an engine response.

    • selectAlternative() function
      Required

      Select alternative values in field.

      Parameters
      • softlock boolean

        If true, locked selections can be overridden.

      Returns
      • Promise
        Required

        A promise of an engine response.

    • selectExcluded() function
      Required

      Select excluded values in field.

      Parameters
      • softlock boolean

        If true, locked selections can be overridden.

      Returns
      • Promise
        Required

        A promise of an engine response.

    • selectMatch() function
      Required

      Select matching field values.

      Parameters
      • match string
        Required

        Match string.

      • softlock boolean

        If true, locked selections can be overridden.

      Returns
      • Promise
        Required

        A promise of an engine response.

    • selectPossible() function
      Required

      Select possible values in field.

      Parameters
      • softlock boolean

        If true, locked selections can be overridden.

      Returns
      • Promise
        Required

        A promise of an engine response.

    • selectValues() function
      Required

      Select field values.

      Parameters
      • values Array< object >
        Required

        Array of qFieldValues to select. Since 1.1, a simplified syntax with strings OR numbers also works. Note that for a numeric field, you need to provide the numeric value.

      • toggle boolean

        If true, toggle selected state. If false replace the current selection.

      • softlock boolean

        If true, locked selections can be overridden.

      Returns
      • Promise
        Required

        A promise of an engine response.

    • toggleSelect() function
      Required

      Toggle field selection.

      Parameters
      • match string
        Required

        Match string.

      • softlock boolean

        If true, locked selections can be overridden.

      Returns
      • Promise
        Required

        A promise of an engine response.

    • unlock() function
      Required

      Unlocks a field selection.

      Returns
      • Promise
        Required

        A promise of an engine response.

QApp forward() function

Forward

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

forward

var app = qlik.openApp('2abac31e-3b46-4b78-8bxf-c5cea1d2514d');
app.forward();

QApp getAppLayout(callback?) function

Get layout for this app and register a callback to receive the data.

Introduced in Qlik Sense 1.1.

Parameters

  • callback function

    Callback method.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

getAppLayout

app.getAppLayout(function(layout){
  console.log(layout.qTitle);
});

QApp getAppObjectList(type?, callback?) function

Deprecated

Get a list of Qlik application objects and register a callback to receive the data.

Parameters

  • type string

    Type of object. One of: sheet, MasterObject.

  • callback function

    Callback method.

getAppObjectList

app.getAppObjectList( 'sheet', function(reply){
  var str = "";
  $.each(reply.qAppObjectList.qItems, function(key, value) {
    str +=  value.qData.title + ' ';
    $.each(value.qData.cells, function(k,v){
      str +=  v.name + ' ';
    });
  });
  console.log(str);
});

QApp getFullPropertyTree(id) function

Get properties for a Qlik object including children properties.

Parameters

  • id string
    Required

    Object ID.

Returns

  • Promise
    Required

    A promise of an object model.

getFullPropertyTree

app.getFullPropertyTree(value.qInfo.qId).then(function(model){
  console.log(model.propertyTree.qChildren.length + ' children');
});

QApp getList(type, callback?) function

Get a list of internal Qlik objects and register a callback to receive the data.

Parameters

  • type string
    Required

    Type of object. One of: FieldList, MeasureList, DimensionList, BookmarkList, SelectionObject, SnapshotList Since Qlik Sense 1.1, MediaList Since Qlik Sense 1.1, sheet Since Qlik Sense 1.1, MasterObject Since Qlik Sense 1.1, VariableList Since Qlik Sense 2.0, story Since Qlik Sense 2.1

  • callback function

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

Returns

  • Promise
    Required

    A promise of an object model.

getList

app.getList("FieldList", function(reply){
  var str = "";
  $.each(reply.qFieldList.qItems, function(key, value) {
    str +=  value.qName + ' ';
  });
 console.log(str);
});

QApp getObject(elem?, id, options?) function

Inserts a Qlik object into an HTML element. The object will fill the HTML object, so you can size and position the element to determine how large the Qlik object will be.

If you only supply one parameter, you will just get the model without displaying the object.

Parameters

  • elem HTMLElement  |  string

    HTML element. Since version 1.1, it is also possible to define a string of the HTML element ID.

  • id string
    Required

    Object ID or 'CurrentSelections' if used for Selections bar. Since version November 2017 it is also possible to use 'AppNavigationBar' to on-demand app navigation bar.

  • options object

    Additional options.

    Show options properties
    • noInteraction boolean

      Set to true if you want to disable interaction, including selections, in the visualization. Since Qlik Sense 1.1

    • noSelections boolean

      Set to true if you want to disable selections in the visualization. Since Qlik Sense 3.0

    • variant string

      used only when getting 'CurrentSelections', for rendering the "dark" variant. Possible values: "dark".

    • sheetId string

      Sheet id where App Navigation bar exists. (only applies if id='AppNavigationBar') Since Qlik Sense November 2017

    • openAppCallback function

      Used if you want to handle what happens when user clicks the 'open generated app' button. Otherwise by default generated app is opened in new tab. Callback returns appId and targetSheetId. (only applies if id='AppNavigationBar') Since Qlik Sense November 2017

Returns

  • Promise
    Required

    A promise of an object model.

getObject

app.getObject(document.getElementById("LB01"), "uPyZavD");
app.getObject("LB01","uPyZavD");
app1.getObject('MyAppNavigationToolbarDIVid', 'AppNavigationBar', { sheetId: "RWcstb", openAppCallback: function ( appId, targetSheetId ) {
  console.log("Open generated app event handled.  App ID: " + appId + " target sheet to open by default: " + targetSheetId);
}});

QApp getObjectProperties(id) function

Get properties for a Qlik object.

Parameters

  • id string
    Required

    Object ID.

Returns

  • Promise
    Required

    A promise of an object model.

getObjectProperties

app.getObjectProperties("uPyZavD").then(function(model){
  this.title = model.properties.title;
});

QApp getScript() function

Gets the data load script of this app.

Introduced in Qlik Sense 4.0

Returns

  • Promise
    Required

    A promise of a qScript object with the load script values.

getScript

var app = qlik.openApp( "MY_APP_ID");
app.getScript().then( function(script){
  console.log(script);
});

QApp getSnapshot(element?, id) function

Inserts a Qlik snapshot into an HTML element. The snapshot will fill the HTML object, so you can size and position the element to determine how large the Qlik object will be.

If you only supply one parameter you will just get the model without displaying the object.

Parameters

  • element HTMLElement  |  string

    HTML element or string with HTML element id.

  • id string
    Required

    Snapshot ID.

Returns

  • Promise
    Required

    A promise of an object model.

getSnapshot

app.getSnapshot(document.getElementById("SNAPSHOT"), "uPyZavD");

QApp lockAll(state?) function

Lock all selections.

Parameters

  • state string

    Alternate state name. Since Qlik Sense 2.1.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

lockAll

var app = qlik.openApp('2abac31e-3b46-4b78-8bxf-c5cea1d2514d');
app.lockAll();

QApp off(eventName?) function

Remove listener(s) for the app events.

Introduced in Qlik Sense February 2018.

Parameters

  • eventName string

    Name of the event. Can be: error, warning, closed. If no eventName is provided, removes all listeners.

off

var app = qlik.openApp("MY_APP_ID");
app.on("error", function ( error ) {
  console.log("error listener called for app", error);
});
app.off("error");

QApp on(eventName, callback) function

Add listener(s) to the app events. Possible events are error, warning and closed. Multiple listeners can be added to an event.

Introduced in Qlik Sense February 2018.

Parameters

  • eventName string
    Required

    Name of the event. Can be: error, warning, closed.

  • callback function
    Required

    Callback method.

on

var app = qlik.openApp("MY_APP_ID");
app.on("error", function ( error ) {
  console.log("error listener called for app", error);
});
app.on("warning", function ( warning ) {
  console.log("warning listener called for app", warning);
});
app.on("closed", function ( closed ) {
  console.log("closed listener called for app", closed);
});

QApp removeAlternateState(qStateName) function

Remove an alternate state.

Introduced in Qlik Sense 1.1.

Parameters

  • qStateName string
    Required

    Alternate state name

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

removeAlternateState

app.removeAlternateState("X");

QApp searchAssociations(qTerms, qPage, qOptions?, callback?) function

Deprecated

Searches for one or more terms in the values of an app.

Introduce in Qlik Sense 1.1.

Parameters

  • qTerms Array< string >
    Required

    Terms to search for.

  • qPage object
    Required
    Show qPage properties
    • qOffset number
      Required

      Position from the top, starting from 0.

    • qCount number
      Required

      Number of search results to return.

    • qMaxNbrFieldMatches number
      Required

      Maximum number of matching values to return per search result.

  • qOptions object

    Search options.

    Show qOptions properties
    • qSearchFields Array< string >

      List of search fields.

    • qContext string

      Search context. Can be one of: Cleared, LockedFieldsOnly, CurrentSelections.

  • callback function

    Callback method.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

searchAssociations

app.searchAssociations(["se"],
  {qOffset:0,qCount:15,qMaxNbrFieldMatches:5},
  {qContext: 'CurrentSelections'},
  function(reply){
    var str = "";
    reply.qResults.qFieldDictionaries.forEach(function(dic){
      dic.qResult.forEach(function(result){
        str += result.qText;
      });
    });
    console.log(str);
});

QApp searchResults(qTerms, qPage, qOptions?, callback?) function

Searches for one or more terms in the values of an app.

Introduced in Qlik Sense 2.2.

Parameters

  • qTerms Array< string >
    Required

    Terms to search for.

  • qPage object
    Required
    Show qPage properties
    • qOffset number
      Required

      Position from the top, starting from 0.

    • qCount number
      Required

      Number of search results to return.

    • qGroupOptions Array< SearchGroupOptions >

      Options of the search groups. If this property is not set, all values are returned.

    • qGroupItemOptions Array< SearchGroupItemOptions >

      Options of the search group items. If this property is not set, all values are returned.

  • qOptions object

    Search options.

    Show qOptions properties
    • qSearchFields Array< string >

      List of search fields.

    • qContext string

      Search context. Can be one of: Cleared, LockedFieldsOnly, CurrentSelections.

  • callback function

    Callback method.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

searchResults

app.searchResults( ["ma"],
  { qOffset: 0, qCount: 15},
  {qContext: 'CurrentSelections'},
  function ( reply ) {
    if ( reply.qResult.qTotalNumberOfGroups === 0 ) {
      console.log('No matches');
    } else {
      var str = "";
      reply.qResult.qSearchGroupArray.forEach( function ( value ) {
        value.qItems.forEach( function ( item ) {
          str += item.qIdentifier +": ";
          item.qItemMatches.forEach( function ( match ) {
            str += match.qText + ' ';
          });
        });
      });
      console.log(str);
    }
});

QApp searchSuggest(qTerms, qOptions?, callback?) function

Returns search suggestions.

Introduced in Qlik Sense 1.1.

Parameters

  • qTerms Array< string >
    Required

    Terms to search for.

  • qOptions object

    Search options.

    Show qOptions properties
    • qSearchFields Array< string >

      List of search fields.

  • callback function

    Callback method.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

searchSuggest

app.searchSuggest(["se"], {}, function(reply) {
  var str = "";
  reply.qResult.qSuggestions.forEach(function(sugg){
    str += sugg.qValue + ' ';
  });
  console.log(str);
});

QApp selectAssociations(qMatchIx?, qTerms?, qOptions?, qSoftLock?) function

Make a selection based on searchAssociaton results.

Introduced in Qlik Sense 1.1.

Parameters

  • qMatchIx number

    Index to search result.

  • qTerms Array< string >

    Values to select.

  • qOptions object

    Parameter sent to the Qlik engine containing information about the search fields and the search context.

    Show qOptions properties
    • qSearchFields Array< string >

      List of the search fields. If empty, the search is performed in all fields of the app.

    • qContext string

      Search context. Can be one of: Cleared, LockedFieldsOnly, CurrentSelections.

  • qSoftLock boolean

    Use the qOptions.qContext parameter instead.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

selectAssociations

app.selectAssociations( 0, ["May","Mar"] );

QApp selectionState(state?) function

Creates a SelectionState object that encapsulates the selection state.

Introduced in Qlik Sense 2.2.

Parameters

  • state string

    Sets the state.

Returns

  • A selection state object for the selection state of type QSelectionState.

    Show properties
    • stateName string
      Required

      State name, '$' for default state.

    • selections Array< QFieldSelections >
      Required

      Selections

    • backCount number
      Required

      Number of back steps available.

    • forwardCount number
      Required

      Number of forward steps available.

    • Required

      OnData notification.

    • clearAll() function
      Required

      Clear all selections in this state.

      Parameters
      • lockedAlso boolean

        Clear locked fields also.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • lockAll() function
      Required

      Lock all selections in this state.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply.

    • unlockAll() function
      Required

      Unlock all selections in this state.

      Returns
      • Promise
        Required

        A promise of a Qlik engine reply

QApp setScript(script) function

Sets the data load script of this app. Also validates the script syntax and returns the syntax errors if errors exist.

Introduced in Qlik Sense 4.0.

Parameters

  • script string
    Required

    The script content.

Returns

  • Promise
    Required

    A promise of an empty object or a list of syntax errors depending on the validation result.

setScript

Load script inline

var script = "Load Chr(RecNo()+Ord('A')-1) as Alpha, RecNo() as Num autogenerate 26;"
var app = qlik.openApp( "MY_APP_ID");
app.setScript(script).then( function(result){
	console.log(result);
});

Load script from file

var script = 'LOAD Sales FROM [lib://data/sample.xlsx];';
var app = qlik.openApp( "MY_APP_ID");
app.setScript(script).then( function(result){
  console.log(result);
});

QApp unlockAll(state?) function

Unlock all selections.

Parameters

  • state string

    Alternate state name. Since Qlik Sense 2.1.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply.

unlockAll

var app = qlik.openApp('2abac31e-3b46-4b78-8bxf-c5cea1d2514d');
app.unlockAll();

new QAppTheme() class

QAppTheme get(id?) function

Get theme as a QTheme object.

Parameters

  • id string

    Theme ID. If no ID is specified, the theme saved for the app is returned.

Returns

  • Promise < QTheme >
    Required

    A promise of a QTheme object.

get

app.theme.get('my-theme-id').then(function(qtheme){
   console.log('Theme background color: ' + qtheme.properties.backgroundColor);
	});

QAppTheme getApplied() function

Get currently applied theme as a QTheme object.

Returns

  • Promise < QTheme >
    Required

    A promise of a QTheme object.

getApplied

app.theme.getApplied().then(function(qtheme){
   console.log('Current theme background color: ' + qtheme.properties.backgroundColor);
	});

QAppTheme save(id) function

Save a theme ID of an app.

Introduced in Qlik Sense February 2018.

Parameters

  • id string
    Required

    Theme ID.

save

app.theme.save('my-theme-id');

new QAppVisualization() class

QAppVisualization create(type, cols?, options?) function

Create a new visualization. The visualization will be based on a session object and not persisted in the app.

Parameters

  • type string
    Required

    Visualization type. Built-in visualization like barchart, piechart, linechart, combochart or an extension.

  • cols Array< string  |  NxDimension  |  NxMeasure >

    Column definitions, dimensions and measures. Each entry can be a string, an NxDimension or NxMeasure structure. If the NxDimension or NxMeasure refers to a library dimension or measure, you also might need to add qType measure or dimension.

  • options object

    Options to set. Refer to documentation for the visualization used for additional options.

    Show options properties
    • title string  |  Expression

      Visualization title.

    • showTitles boolean

      Show title for visualization. Default true.

    • subtitle string  |  Expression

      Visualization subtitle.

    • footnote string  |  Expression

      Visualization footnote.

Returns

create

create a barchart on the fly
var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d');
app.visualization.create('barchart',["Case Owner Group","=Avg([Case Duration Time])"],{title:"Great on-the-fly barchart"}).then(function(bar){
  bar.show('QV04');
});
create a table
app.visualization.create( 'table', ["Case Owner Group", "=Avg([Case Duration Time])", "Priority", "Quarter"] ).then( function ( table ) {
  table.show( 'QV04' );
});
create a toolbar using an extension
app.visualization.create('com-qliktech-toolbar',null,
  {"buttons":{"clear":true,"back":true,"forward":true}}).then(function(vis){
    vis.show("QV05");
});

QAppVisualization get(id) function

Get an existing visualization.

Introduced in Qlik Sense 2.2.

Parameters

  • id string
    Required

    ID for an existing visualization.

Returns

get

var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d');
   app.visualization.get('xGhjKl').then(function(vis){
     vis.show("QV01");
   });

new QBookmark() class

QBookmark apply(id) function

Apply bookmark.

Parameters

  • id string
    Required

    Bookmark ID.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply. Since Qlik Sense 1.2.

apply

var app = qlik.openApp("c31e2aba-3b46-4b13-8b87-c5c2514dea1d");
app.bookmark.apply("pPvpTN");

QBookmark create(title, description, sheetId?) function

Create bookmark based on current selection.

Parameters

  • title string
    Required

    Bookmark title.

  • description string
    Required

    Bookmark description.

  • sheetId string

    Bookmark sheet ID. Since Qlik Sense 2.2.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply. Since Qlik Sense 1.2.

create

var app = qlik.openApp("c31e2aba-3b46-4b13-8b87-c5c2514dea1d");
app.bookmark.create("Test","Test bookmark","fmcJkH");

QBookmark remove(id) function

Remove bookmark.

Parameters

  • id string
    Required

    Bookmark ID.

Returns

  • Promise
    Required

    A promise of a Qlik engine reply. Since Qlik Sense 1.2.

remove

var app = qlik.openApp("c31e2aba-3b46-4b13-8b87-c5c2514dea1d");
app.bookmark.remove("pPvpTN");

new QDimensionCell() class

Wrapper around a HyperCube dimension cell.

Properties

  • qText string
    Required

    Cell value formatted as set up in properties.

  • qElemNumber number
    Required

    Cell value index.

  • qState string
    Required

    Cell state.

  • qNum number

    Cell numeric value, if cell is numeric.

QDimensionCell select() function

Select the value contained in this cell.

select

<div class="selectable" ng-class="{'selected':cell.selected}" ng-click="cell.select($event)">{{cell.qText}}</div>

new QField() class

External interface to the fields in a Qlik Sense app and contains methods for field level commands.

Properties

  • Required

    OnData notification

    Show OnData properties
    • bind() function
      Required

      Observe a Notification by sending in an observer function.

      Parameters
      • observer function
        Required

        The observer function to handle the notification.

    • unbind() function
      Required

      Stop observing a notification.

      Parameters
      • observer function
        Required

        The observer function that now should ignore any future notifications.

  • qStateCounts object
    Required

    Object with number of values in different states. Only after getData() call.

    Introduced in Qlik Sense 2.1.

  • rowCount number
    Required

    Number of different values. Only after getData() call.

    Introduced in Qlik Sense 2.1.

  • rows Array< QFieldValue >
    Required

    Field values. You need to call getData() method to make this available. Since Qlik Sense 2.1.

QField clear() function

Clears a field selection.

Returns

  • Promise
    Required

    A promise of an engine response.

clear

var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d');
app.field('LastName').clear();

QField clearOther(softlock?) function

Clears all field selections except this one.

Parameters

  • softlock boolean

    If true, locked selections can be overridden.

Returns

  • Promise
    Required

    A promise of an engine response.

clearOther

var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d');
app.field('LastName').clearOther(true);

QField getData(options?) function

Gets field data. The values are available as QFieldValue in array field.rows and is updated when the selection state changes. Notification OnData will be triggered after each update.

Introduced in Qlik Sense 2.1

Parameters

  • options object

    Object containing options for the getData call.

    Show options properties
    • rows number

      Number of rows to fetch. Default 200.

    • frequencyMode string

      Sets the qFrequencyMode. V=Absolute, P=Percent, R=Relative, N=No frequency. Default V.

Returns

getData

var app = qlik.openApp("c31e2aba-3b46-4b13-8b87-c5c2514dea1d");
$scope.months = app.field("Month").getData();

<button ng-repeat="row in months.rows" class="btn" ng-click="row.select();"
  ng-class="{'btn-success':row.qState === 'S'}">{{row.qText}}</button>

QField getMoreData() function

Get more data for your field. Notification OnData will be triggered when complete.

Introduced in Qlik Sense 2.1

Returns

getMoreData

<button ng-if="fieldMonth.rowCount>fieldMonth.rows.length" ng-click="fieldMonth.getMoreData()">More</button>

QField lock() function

Locks a field selection.

Returns