Type Alias NativeDocFunctions<FieldRpcObject, GenericBookmarkRpcObject, GenericDimensionRpcObject, GenericMeasureRpcObject, GenericObjectRpcObject, GenericVariableRpcObject, DefaultGenericObjectProperties>

type NativeDocFunctions<
    FieldRpcObject,
    GenericBookmarkRpcObject,
    GenericDimensionRpcObject,
    GenericMeasureRpcObject,
    GenericObjectRpcObject,
    GenericVariableRpcObject,
    DefaultGenericObjectProperties,
> = {
    abortModal: (accept: boolean) => Promise<void>;
    addAlternateState: (stateName: string) => Promise<void>;
    addFieldFromExpression: (name: string, expr: string) => Promise<boolean>;
    addSessionAlternateState: (
        stateName: string,
        sourceStateName?: string,
    ) => Promise<void>;
    applyAndVerifyBookmark: (
        id: string,
    ) => Promise<BookmarkApplyAndVerifyResult>;
    applyBookmark: (id: string) => Promise<boolean>;
    applyGroupStates: (
        groupStates: GroupState[],
    ) => Promise<ApplyGroupStatesResult>;
    applyTemporaryBookmark: (id: string) => Promise<boolean>;
    back: () => Promise<void>;
    backCount: () => Promise<number>;
    changeSessionAppOwner: (newOwnerId: string) => Promise<boolean>;
    changeSessionAppSpace: (spaceId: string) => Promise<boolean>;
    checkExpression: (expr: string, labels?: string[]) => Promise<unknown>;
    checkNumberOrExpression: (expr: string) => Promise<unknown>;
    checkScriptSyntax: () => Promise<ScriptSyntaxError[]>;
    clearAll: (lockedAlso?: boolean, stateName?: string) => Promise<void>;
    clearAllSoftPatches: () => Promise<void>;
    clearUndoBuffer: () => Promise<void>;
    cloneBookmark: (id: string) => Promise<string>;
    cloneDimension: (id: string) => Promise<string>;
    cloneMeasure: (id: string) => Promise<string>;
    cloneObject: (id: string) => Promise<string>;
    commitDraft: (id: string) => Promise<void>;
    commitScript: (commitMessage?: string) => Promise<void>;
    createBookmark: (
        prop: GenericBookmarkProperties,
    ) => Promise<GenericBookmarkRpcObject>;
    createBookmarkEx: (
        prop: GenericBookmarkProperties,
        objectIdsToPatch?: string[],
    ) => Promise<GenericBookmarkRpcObject>;
    createConnection: (connection: Connection) => Promise<string>;
    createDimension: (
        prop: GenericDimensionProperties,
    ) => Promise<GenericDimensionRpcObject>;
    createDraft: (id: string) => Promise<string>;
    createMeasure: (
        prop: GenericMeasureProperties,
    ) => Promise<GenericMeasureRpcObject>;
    createObject: <
        CustomProperties = DefaultGenericObjectProperties,
        CustomGenericObject = GenericObjectRpcObject,
    >(
        prop: CustomProperties,
    ) => Promise<CustomGenericObject>;
    createSessionObject: <
        CustomProperties = DefaultGenericObjectProperties,
        CustomGenericObject = GenericObjectRpcObject,
    >(
        prop: CustomProperties,
    ) => Promise<CustomGenericObject>;
    createSessionVariable: (
        prop: GenericVariableProperties,
    ) => Promise<GenericVariableRpcObject>;
    createTemporaryBookmark: (
        options: NxTempBookmarkOptions,
        objectIdsToPatch?: string[],
    ) => Promise<unknown>;
    createVariable: (name: string) => Promise<boolean>;
    createVariableEx: (
        prop: GenericVariableProperties,
    ) => Promise<GenericVariableRpcObject>;
    deleteConnection: (connectionId: string) => Promise<void>;
    destroyBookmark: (id: string) => Promise<boolean>;
    destroyDimension: (id: string) => Promise<boolean>;
    destroyDraft: (id: string, sourceId: string) => Promise<boolean>;
    destroyMeasure: (id: string) => Promise<boolean>;
    destroyObject: (id: string) => Promise<boolean>;
    destroySessionObject: (id: string) => Promise<boolean>;
    destroySessionVariable: (id: string) => Promise<boolean>;
    destroySessionVariableById: (id: string) => Promise<boolean>;
    destroySessionVariableByName: (name: string) => Promise<boolean>;
    destroyVariableById: (id: string) => Promise<boolean>;
    destroyVariableByName: (name: string) => Promise<boolean>;
    doReload: (
        mode?: number,
        partial?: boolean,
        debug?: boolean,
    ) => Promise<boolean>;
    doReloadEx: (params?: DoReloadExParams) => Promise<DoReloadExResult>;
    doSave: (fileName?: string) => Promise<void>;
    evaluate: (expression: string) => Promise<string>;
    evaluateEx: (expression: string) => Promise<FieldValue>;
    expandExpression: (expression: string) => Promise<string>;
    exportReducedData: (options?: NxDownloadOptions) => Promise<NxDownloadInfo>;
    findMatchingFields: (
        fieldName: string,
        tags: string[],
    ) => Promise<NxMatchingFieldInfo[]>;
    forward: () => Promise<void>;
    forwardCount: () => Promise<number>;
    getAllInfos: () => Promise<NxInfo[]>;
    getAppLayout: () => Promise<NxAppLayout>;
    getAppProperties: () => Promise<NxAppProperties>;
    getAssociationScores: (
        table1: string,
        table2: string,
    ) => Promise<AssociationScore[]>;
    getBookmark: (id: string) => Promise<GenericBookmarkRpcObject>;
    getBookmarks: <QData>(
        options: NxGetBookmarkOptions,
    ) => Promise<NxContainerEntry<QData>[]>;
    getConnection: (connectionId: string) => Promise<Connection>;
    getConnections: () => Promise<Connection[]>;
    getContentLibraries: () => Promise<ContentLibraryList>;
    getDatabaseInfo: (connectionId: string) => Promise<DatabaseInfo>;
    getDatabaseOwners: (
        connectionId: string,
        database?: string,
    ) => Promise<DatabaseOwner[]>;
    getDatabases: (connectionId: string) => Promise<Database[]>;
    getDatabaseTableFields: (
        connectionId: string,
        database: string | undefined,
        owner: string | undefined,
        table: string,
    ) => Promise<DataField[]>;
    getDatabaseTablePreview: (
        connectionId: string,
        database: string | undefined,
        owner: string | undefined,
        table: string,
        conditions?: FilterInfo,
    ) => Promise<unknown>;
    getDatabaseTables: (
        connectionId: string,
        database?: string,
        owner?: string,
    ) => Promise<DataTable[]>;
    getDimension: (id: string) => Promise<GenericDimensionRpcObject>;
    getEmptyScript: (localizedMainSection?: string) => Promise<string>;
    getExpressionBNF: () => Promise<unknown>;
    getExpressionBNFHash: () => Promise<string>;
    getFavoriteVariables: () => Promise<string[]>;
    getField: (
        fieldName: string,
        stateName?: string,
    ) => Promise<FieldRpcObject>;
    getFieldAndColumnSamples: (
        fieldsOrColumnsWithWildcards: FieldOrColumn[],
        maxNumberOfValues: number,
        randSeed?: number,
    ) => Promise<SampleResult[]>;
    getFieldDescription: (fieldName: string) => Promise<FieldDescription>;
    getFieldOnTheFlyByName: (readableName: string) => Promise<string>;
    getFieldsFromExpression: (expr: string) => Promise<string[]>;
    getFieldsResourceIds: (
        fieldNames: string[],
    ) => Promise<NxFieldResourceId[]>;
    getFileTableFields: (
        connectionId: string,
        relativePath: string | undefined,
        dataFormat: FileDataFormat,
        table: string,
    ) => Promise<unknown>;
    getFileTablePreview: (
        connectionId: string,
        relativePath: string | undefined,
        dataFormat: FileDataFormat,
        table: string,
    ) => Promise<unknown>;
    getFileTables: (
        connectionId: string,
        relativePath: string | undefined,
        dataFormat: FileDataFormat,
    ) => Promise<DataTable[]>;
    getFileTablesEx: (
        connectionId: string,
        relativePath: string | undefined,
        dataFormat: FileDataFormat,
    ) => Promise<DataTableEx[]>;
    getFolderItemsForConnection: (
        connectionId: string,
        relativePath?: string,
    ) => Promise<FolderItem[]>;
    getGroupStates: () => Promise<GroupState[]>;
    getIncludeFileContent: (path: string) => Promise<string>;
    getLibraryContent: (name: string) => Promise<StaticContentList>;
    getLineage: () => Promise<LineageInfo[]>;
    getLocaleInfo: () => Promise<LocaleInfo>;
    getLooselyCoupledVector: () => Promise<number[]>;
    getMatchingFields: (
        tags: string[],
        matchingFieldMode?: string,
    ) => Promise<NxMatchingFieldInfo[]>;
    getMeasure: (id: string) => Promise<GenericMeasureRpcObject>;
    getMeasureWithLabel: (label: string) => Promise<GenericMeasureRpcObject>;
    getMediaList: () => Promise<QMediaList>;
    getObject: <CustomGenericObject = GenericObjectRpcObject>(
        id: string,
    ) => Promise<CustomGenericObject>;
    getObjects: <QData>(
        options: NxGetObjectOptions,
    ) => Promise<NxContainerEntry<QData>[]>;
    getOrCreateObject: <
        CustomProperties = DefaultGenericObjectProperties,
        CustomGenericObject = GenericObjectRpcObject,
    >(
        prop: CustomProperties,
    ) => Promise<CustomGenericObject>;
    getScript: () => Promise<string>;
    getScriptBreakpoints: () => Promise<EditorBreakpoint[]>;
    getScriptEx: () => Promise<AppScript>;
    getScriptMeta: () => Promise<AppScriptMeta>;
    getSetAnalysis: (
        stateName?: string,
        bookmarkId?: string,
    ) => Promise<string>;
    getTableData: (
        offset: number,
        rows: number,
        syntheticMode: boolean,
        tableName: string,
    ) => Promise<TableRow[]>;
    getTableProfileData: (tableName: string) => Promise<TableProfilingData>;
    getTablesAndKeys: (
        windowSize: Size,
        nullSize: Size,
        cellHeight: number,
        syntheticMode: boolean,
        includeSysVars: boolean,
        includeProfiling?: boolean,
    ) => Promise<unknown>;
    getTextMacros: () => Promise<TextMacro[]>;
    getVariable: (name: string) => Promise<GenericVariableRpcObject>;
    getVariableById: (id: string) => Promise<GenericVariableRpcObject>;
    getVariableByName: (name: string) => Promise<GenericVariableRpcObject>;
    getVariables: <QData>(
        listDef: VariableListDef,
    ) => Promise<NxVariableListItem<QData>[]>;
    getViewDlgSaveInfo: () => Promise<TableViewDlgSaveInfo>;
    guessFileType: (
        connectionId: string,
        relativePath?: string,
    ) => Promise<FileDataFormat>;
    lockAll: (stateName?: string) => Promise<void>;
    modifyConnection: (
        connectionId: string,
        connection: Connection,
        overrideCredentials?: boolean,
    ) => Promise<void>;
    publish: (streamId: string, name?: string) => Promise<void>;
    redo: () => Promise<boolean>;
    removeAlternateState: (stateName: string) => Promise<void>;
    removeSessionAlternateState: (stateName: string) => Promise<boolean>;
    removeVariable: (name: string) => Promise<boolean>;
    replaceBookmark: (
        id: string,
        ignorePatches?: boolean,
        objectIdsToPatch?: string[],
    ) => Promise<unknown>;
    restoreTempSelectionState: (id: string) => Promise<boolean>;
    resume: () => Promise<void>;
    saveAs: (newAppName: string) => Promise<string>;
    saveObjects: () => Promise<void>;
    scramble: (fieldName: string) => Promise<void>;
    searchAssociations: (
        options: SearchCombinationOptions,
        terms: string[],
        page: SearchPage,
    ) => Promise<SearchAssociationResult>;
    searchObjects: (
        options: SearchObjectOptions,
        terms: string[],
        page: SearchPage,
    ) => Promise<SearchResult>;
    searchResults: (
        options: SearchCombinationOptions,
        terms: string[],
        page: SearchPage,
    ) => Promise<SearchResult>;
    searchSuggest: (
        options: SearchCombinationOptions,
        terms: string[],
    ) => Promise<SearchSuggestionResult>;
    searchValues: (
        options: SearchValueOptions,
        terms: string[],
        page: SearchValuePage,
    ) => Promise<SearchValueResult>;
    selectAssociations: (
        options: SearchCombinationOptions,
        terms: string[],
        matchIx: number,
        softLock?: boolean,
    ) => Promise<void>;
    sendGenericCommandToCustomConnector: (
        provider: string,
        command: string,
        method: string,
        parameters: string[],
        appendConnection: string,
    ) => Promise<string>;
    setAppProperties: (prop: NxAppProperties) => Promise<void>;
    setFavoriteVariables: (names: string[]) => Promise<void>;
    setFetchLimit: (limit: number) => Promise<void>;
    setLooselyCoupledVector: (v: number[]) => Promise<boolean>;
    setProhibitBinaryLoad: (prohibit: boolean) => Promise<void>;
    setScript: (script: string) => Promise<void>;
    setScriptBreakpoints: (breakpoints: EditorBreakpoint[]) => Promise<void>;
    setViewDlgSaveInfo: (info: TableViewDlgSaveInfo) => Promise<void>;
    storeTempSelectionState: (tTLOfTempState?: number) => Promise<unknown>;
    transformApp: (
        dstParameters: TransformAppParameters,
    ) => Promise<TransformAppResult>;
    undo: () => Promise<boolean>;
    unlockAll: (stateName?: string) => Promise<void>;
}

Type Parameters

  • FieldRpcObject
  • GenericBookmarkRpcObject
  • GenericDimensionRpcObject
  • GenericMeasureRpcObject
  • GenericObjectRpcObject
  • GenericVariableRpcObject
  • DefaultGenericObjectProperties
Index

Properties

abortModal addAlternateState addFieldFromExpression addSessionAlternateState applyAndVerifyBookmark applyBookmark applyGroupStates applyTemporaryBookmark back backCount changeSessionAppOwner changeSessionAppSpace checkExpression checkNumberOrExpression checkScriptSyntax clearAll clearAllSoftPatches clearUndoBuffer cloneBookmark cloneDimension cloneMeasure cloneObject commitDraft commitScript createBookmark createBookmarkEx createConnection createDimension createDraft createMeasure createObject createSessionObject createSessionVariable createTemporaryBookmark createVariable createVariableEx deleteConnection destroyBookmark destroyDimension destroyDraft destroyMeasure destroyObject destroySessionObject destroySessionVariable destroySessionVariableById destroySessionVariableByName destroyVariableById destroyVariableByName doReload doReloadEx doSave evaluate evaluateEx expandExpression exportReducedData findMatchingFields forward forwardCount getAllInfos getAppLayout getAppProperties getAssociationScores getBookmark getBookmarks getConnection getConnections getContentLibraries getDatabaseInfo getDatabaseOwners getDatabases getDatabaseTableFields getDatabaseTablePreview getDatabaseTables getDimension getEmptyScript getExpressionBNF getExpressionBNFHash getFavoriteVariables getField getFieldAndColumnSamples getFieldDescription getFieldOnTheFlyByName getFieldsFromExpression getFieldsResourceIds getFileTableFields getFileTablePreview getFileTables getFileTablesEx getFolderItemsForConnection getGroupStates getIncludeFileContent getLibraryContent getLineage getLocaleInfo getLooselyCoupledVector getMatchingFields getMeasure getMeasureWithLabel getMediaList getObject getObjects getOrCreateObject getScript getScriptBreakpoints getScriptEx getScriptMeta getSetAnalysis getTableData getTableProfileData getTablesAndKeys getTextMacros getVariable getVariableById getVariableByName getVariables getViewDlgSaveInfo guessFileType lockAll modifyConnection publish redo removeAlternateState removeSessionAlternateState removeVariable replaceBookmark restoreTempSelectionState resume saveAs saveObjects scramble searchAssociations searchObjects searchResults searchSuggest searchValues selectAssociations sendGenericCommandToCustomConnector setAppProperties setFavoriteVariables setFetchLimit setLooselyCoupledVector setProhibitBinaryLoad setScript setScriptBreakpoints setViewDlgSaveInfo storeTempSelectionState transformApp undo unlockAll

Properties

abortModal: (accept: boolean) => Promise<void>

Aborts any selection mode in an app. For more information about selection mode, see BeginSelections method.

Parameters:

  • accept - Set this parameter to true to accept the selections before exiting the selection mode.

Stability: locked

addAlternateState: (stateName: string) => Promise<void>

Adds an alternate state in the app. You can create multiple states within a Qlik Sense app and apply these states to specific objects within the app. Objects in a given state are not affected by user selections in the other states.

Parameters:

  • stateName - Name of the alternate state.

Stability: locked

addFieldFromExpression: (name: string, expr: string) => Promise<boolean>

Adds a field on the fly.

The expression of a field on the fly is persisted but not its values.
The operation is successful if **qSuccess** is set to true.

Parameters:

  • name - Name of the field.
  • expr - Expression value. It is not possible to use all aggregation functions. For example, you cannot add a field on the fly with an expression that uses the Sum or Count aggregation functions.

Stability: locked

addSessionAlternateState: (
    stateName: string,
    sourceStateName?: string,
) => Promise<void>

Adds an session alternate state in the app. You can create multiple states within a Qlik Sense app and apply these states to specific objects within the app. Objects in a given state are not affected by user selections in the other states. A session alternate state is not persisted and is not included in the StateNames array in the AppLayout. You can use the optional second parameter to choose any other state to get the initial selection on the new state from

Parameters:

  • stateName - Name of the alternate state.
  • sourceStateName - Name of existing state to copy the initial selections from

Stability: locked

applyAndVerifyBookmark: (id: string) => Promise<BookmarkApplyAndVerifyResult>

Applies a bookmark and verifies result dataset against originally selected values.

The operation is successful if **qApplySuccess** is set to true. **qWarnings** lists state and field with unmatching values

Parameters:

  • id - Identifier of the bookmark.

Stability: experimental

applyBookmark: (id: string) => Promise<boolean>

Applies a bookmark.

The operation is successful if **qSuccess** is set to true.

Parameters:

  • id - Identifier of the bookmark.

Stability: locked

applyGroupStates: (groupStates: GroupState[]) => Promise<ApplyGroupStatesResult>
applyTemporaryBookmark: (id: string) => Promise<boolean>

Apply temporary bookmark identified by Id.

ApplyTemporaryBookmark method is only supported in SaaS Editions of Qlik Sense.

Parameters:

  • id - Identifier of the temporary selection state

Stability: locked

back: () => Promise<void>

Loads the last logical operation (if any).

Stability: locked

backCount: () => Promise<number>

Returns the number of entries on the back stack.

Stability: locked

changeSessionAppOwner: (newOwnerId: string) => Promise<boolean>

Change the owner of a session app.

Can be used by a privileged user when creating a session app to be consumed by another user. Only useful in environments where it is possible to reconnect to a session app, currently only in cloud deployments.

Parameters:

  • newOwnerId - Identifier of the new app owner.

Stability: experimental

changeSessionAppSpace: (spaceId: string) => Promise<boolean>

Add a session app to a space.

Can be used by a privileged user when creating a session app to be consumed by other users. Only useful in environments where it is possible to reconnect to a session app, currently only in cloud deployments.

Parameters:

  • spaceId - Identifier of the new space.

Stability: experimental

checkExpression: (expr: string, labels?: string[]) => Promise<unknown>

Checks if a given expression is valid.

The expression is correct if the parameters _qErrorMsg_ , _qBadFieldNames_ and _qDangerousFieldNames_ are empty.

Parameters:

  • expr - Expression to check.
  • labels - List of labels.

Stability: locked

checkNumberOrExpression: (expr: string) => Promise<unknown>

Checks if:

  • A given expression is valid.
  • A number is correct according to the locale.

Parameters:

  • expr - Expression to check.

Stability: locked

checkScriptSyntax: () => Promise<ScriptSyntaxError[]>

Checks the syntax of a script.

"result": { "qErrors": [ { "qErrLen": 3, "qTabIx": 0, "qLineInTab": 0, "qColInLine": 0, "qTextPos": 0 }, { "qErrLen": 5, "qTabIx": 0, "qLineInTab": 0, "qColInLine": 1, "qTextPos": 4, "qSecondaryFailure": true } ] }

The first area is the primary error area, the second area is the secondary error area. The second area is optional and is shown only if qSecondaryFailure is set to true. The second area ends when the next statement in the script begins.
The list of syntax errors in the script. If there are no errors, the engine returns: If there are errors, the engine returns the following properties in the response:
Name Description Type
qErrLen Length of the word where the error is located. Integer
qTabIx Number of the faulty section. Integer
qLineInTab Line number in the section where the error is located. Integer
qColInLine Position of the erroneous text from the beginning of the line. Integer
qTextPos Position of the erroneous text from the beginning of the script. Integer
qSecondaryFailure The default value is false. Boolean

Stability: locked

clearAll: (lockedAlso?: boolean, stateName?: string) => Promise<void>

Clear selections in fields for current state. Locked fields are not cleared by default.

Parameters:

  • lockedAlso - When true, clears the selection for locked fields.
  • stateName - Alternate state name. When set, applies to alternate state instead of current

Stability: locked

clearAllSoftPatches: () => Promise<void>

Clear the soft properties of all generic objects in the app

Stability: experimental

clearUndoBuffer: () => Promise<void>

Clears entirely the undo and redo buffer.

Stability: locked

cloneBookmark: (id: string) => Promise<string>

Clones a bookmark.

The identifier is set by the engine.

Parameters:

  • id - Identifier of the object to clone.

Stability: locked

cloneDimension: (id: string) => Promise<string>

Clones a dimension.

The identifier is set by the engine.

Parameters:

  • id - Identifier of the object to clone.

Stability: locked

cloneMeasure: (id: string) => Promise<string>

Clones a measure.

The identifier is set by the engine.

Parameters:

  • id - Identifier of the object to clone.

Stability: locked

cloneObject: (id: string) => Promise<string>

Clones root level objects, such as sheets and stories. The CloneObject method works for both app objects and child objects. When you clone an object that contains children, the children are cloned as well. If you for example want to clone a visualization, you must provide the qID of the root object, in this case the sheet since CloneObject clones root level objects.

It is not possible to clone a session object.
The identifier is set by the engine.

Parameters:

  • id - Identifier of the object to clone. The identifier must be a root object.

Stability: locked

commitDraft: (id: string) => Promise<void>

Commits the draft of an object that was previously created by invoking the CreateDraft method. Committing a draft replaces the corresponding published object.

Parameters:

  • id - Identifier of the draft to commit.

@deprecated: This will be removed in a future version

Stability: locked

commitScript: (commitMessage?: string) => Promise<void>

Commits the current script version so that any future changes will be part of a new version.

Parameters:

  • commitMessage - Name of the version.
Only applicable to QCS.

Stability: experimental

createBookmark: (
    prop: GenericBookmarkProperties,
) => Promise<GenericBookmarkRpcObject>

Creates a bookmark.

Parameters:

  • prop - Properties for the object.

Stability: locked

createBookmarkEx: (
    prop: GenericBookmarkProperties,
    objectIdsToPatch?: string[],
) => Promise<GenericBookmarkRpcObject>

Creates a bookmark with softpatches.

Parameters:

  • prop - Properties for the object.
  • objectIdsToPatch - Add softpatches for this objects if available. If empty all softpatches are added to the bookmark.

Stability: experimental

createConnection: (connection: Connection) => Promise<string>

Creates a connection. A connection indicates from which data source the data should be taken.

Parameters:

  • connection - Information about the connection.

Stability: locked

createDimension: (
    prop: GenericDimensionProperties,
) => Promise<GenericDimensionRpcObject>

Creates a master dimension. A master dimension is stored in the library of an app and can be used in many objects. Several generic objects can contain the same dimension.

Parameters:

  • prop - Information about the properties.

Stability: locked

createDraft: (id: string) => Promise<string>

Creates a draft of an object. This method can be used to create a draft of a sheet or a story that is published. This is a way to continue working on a sheet or a story that is published. Replace the published object by the content of the draft by invoking the CommitDraft method.

The identifier is set by the engine.

Parameters:

  • id - Identifier of the object to create a draft from.

@deprecated: This will be removed in a future version

Stability: locked

createMeasure: (
    prop: GenericMeasureProperties,
) => Promise<GenericMeasureRpcObject>

Creates a master measure. A master measure is stored in the library of an app and can be used in many objects. Several generic objects can contain the same measure.

Parameters:

  • prop - Information about the properties.

Stability: locked

createObject: <
    CustomProperties = DefaultGenericObjectProperties,
    CustomGenericObject = GenericObjectRpcObject,
>(
    prop: CustomProperties,
) => Promise<CustomGenericObject>

Creates a generic object at app level. For more information on generic objects, see Generic object. It is possible to create a generic object that is linked to another object. A linked object is an object that points to a linking object. The linking object is defined in the properties of the linked object (in qExtendsId ). The linked object has the same properties as the linking object.

The linking object cannot be a transient object.

Parameters:

  • prop - Information about the object.

Stability: locked

createSessionObject: <
    CustomProperties = DefaultGenericObjectProperties,
    CustomGenericObject = GenericObjectRpcObject,
>(
    prop: CustomProperties,
) => Promise<CustomGenericObject>

Creates a transient object. For example, you can use a transient object to create an app overview or a story overview. It is possible to create a transient object that is linked to another object. A linked object is an object that points to a linking object. The linking object is defined in the properties of the linked object (in qExtendsId ). The linked object has the same properties as the linking object.

The linking object cannot be a transient object.

Parameters:

  • prop - Information about the object.

Stability: locked

createSessionVariable: (
    prop: GenericVariableProperties,
) => Promise<GenericVariableRpcObject>

Creates a transient variable.

To set some properties to the variable, use the _SetProperties method_.

A variable in Qlik Sense is a named entity, containing a data value. This value can be static or be the result of a calculation. A variable acquires its value at the same time that the variable is created or after when updating the properties of the variable. Variables can be used in bookmarks and can contain numeric or alphanumeric data. Any change made to the variable is applied everywhere the variable is used. When a variable is used in an expression, it is substituted by its value or the variable's definition.

The variable x contains the text string Sum(Sales) . In a chart, you define the expression $(x)/12 . The effect is exactly the same as having the chart expression Sum(Sales)/12 . However, if you change the value of the variable x to Sum(Budget) , the data in the chart are immediately recalculated with the expression interpreted as Sum(Budget)/12 .

Parameters:

  • prop - Name of the variable. Variable names are case sensitive.

Stability: locked

createTemporaryBookmark: (
    options: NxTempBookmarkOptions,
    objectIdsToPatch?: string[],
) => Promise<unknown>

Create temporary bookmark

CreateTemporaryBookmark method is only supported in SaaS Editions of Qlik Sense.

Parameters:

  • options - Options for the temporary bookmark
  • objectIdsToPatch - Add softpatches for these objects to the bookmark if available. If IncludePatches is true, softpatches are included for all objects. Any session objects included are also added to the bookmark. IncludePatches has no effect on the patching of session objects.

Stability: locked

createVariable: (name: string) => Promise<boolean>

Creates a variable.

Parameters:

  • name - Name of the variable. Variable names are case sensitive.

@deprecated: Use Doc::CreateVariableEx method instead

Stability: locked

createVariableEx: (
    prop: GenericVariableProperties,
) => Promise<GenericVariableRpcObject>

Creates a variable. To create a variable via a script, you need to use the SetScript method. For more information, see Create a variable.

To set some properties to the variable, use the _SetProperties method_.
In a published app, only transient variables can be created. See _CreateSessionVariable method_.

A variable in Qlik Sense is a named entity, containing a data value. This value can be static or be the result of a calculation. A variable acquires its value at the same time that the variable is created or after when updating the properties of the variable. Variables can be used in bookmarks and can contain numeric or alphanumeric data. Any change made to the variable is applied everywhere the variable is used. When a variable is used in an expression, it is substituted by its value or the variable's definition.

The variable x contains the text string Sum(Sales) . In a chart, you define the expression $(x)/12 . The effect is exactly the same as having the chart expression Sum(Sales)/12 . However, if you change the value of the variable x to Sum(Budget) , the data in the chart are immediately recalculated with the expression interpreted as Sum(Budget)/12 .

Parameters:

  • prop - Name of the variable. Variable names are case sensitive and must be unique.

Stability: locked

deleteConnection: (connectionId: string) => Promise<void>

Deletes a connection.

In Qlik Sense Enterprise, there is an additional file connection named _AttachedFiles_ . The AttachedFiles connection can only be removed by the administrator of the system.

Parameters:

  • connectionId - Identifier of the connection to remove.

Stability: locked

destroyBookmark: (id: string) => Promise<boolean>

Removes a bookmark.

The operation is successful if **qSuccess** is set to true.

Parameters:

  • id - Identifier of the bookmark.

Stability: locked

destroyDimension: (id: string) => Promise<boolean>

Removes a dimension.

The operation is successful if **qSuccess** is set to true.

Parameters:

  • id - Identifier of the dimension to remove.

Stability: locked

destroyDraft: (id: string, sourceId: string) => Promise<boolean>

Removes the draft of an object. The children of the draft object (if any) are removed as well. This method can be used to cancel the work on the draft of an object. For example, if you had created a draft of a sheet that is published, you might not want anymore to replace the published sheet.

The operation is successful if **qSuccess** is set to true.

Parameters:

  • id - Identifier of the draft object to remove.
  • sourceId - Identifier of the source object (the object from which a draft was created).

@deprecated: This will be removed in a future version

Stability: locked

destroyMeasure: (id: string) => Promise<boolean>

Removes a generic measure.

The operation is successful if **qSuccess** is set to true.

Parameters:

  • id - Identifier of the measure to remove.

Stability: locked

destroyObject: (id: string) => Promise<boolean>

Removes an app object. The children of the object (if any) are removed as well.

The operation is successful if **qSuccess** is set to true.

Parameters:

  • id - Identifier of the object to remove.

Stability: locked

destroySessionObject: (id: string) => Promise<boolean>

Removes a transient object.

The operation is successful if **qSuccess** is set to true.

Parameters:

  • id - Identifier of the transient object to remove.

Stability: locked

destroySessionVariable: (id: string) => Promise<boolean>

Removes a transient variable.

The operation is successful if **qSuccess** is set to true.

Parameters:

  • id - Identifier of the variable.

Stability: locked

destroySessionVariableById: (id: string) => Promise<boolean>

Removes a transient variable.

**qSuccess** is set to true if the operation is successful.

Parameters:

  • id - Identifier of the variable.

Stability: locked

destroySessionVariableByName: (name: string) => Promise<boolean>

Removes a transient variable.

**qSuccess** is set to true if the operation is successful.

Parameters:

  • name - Name of the variable.

Stability: locked

destroyVariableById: (id: string) => Promise<boolean>

Removes a variable. Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. For more information, see Remove a variable.

The operation is successful if **qSuccess** is set to true.

Parameters:

  • id - Identifier of the variable.

Stability: locked

destroyVariableByName: (name: string) => Promise<boolean>

Removes a variable. Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. For more information, see Remove a variable.

The operation is successful if **qSuccess** is set to true.

Parameters:

  • name - Name of the variable.

Stability: locked

doReload: (
    mode?: number,
    partial?: boolean,
    debug?: boolean,
) => Promise<boolean>

Reloads the script that is set in an app.

When this method is called, audit activity logs are produced to track the user activity. In the case of errors, both audit activity logs and system services logs are produced. The log files are named as follows:

Audit activity log System service log
<MachineName>_AuditActivity_Engine.txt in Qlik Sense Enterprise
<MachineName>_AuditActivity_Engine.log in Qlik Sense Desktop
<MachineName>_Service_Engine.txt in Qlik Sense Enterprise
<MachineName>_Service_Engine.log in Qlik Sense Desktop

The location of the log files depends on whether you have installed Qlik Sense Enterprise or Qlik Sense Desktop.

Qlik Sense Enterprise Qlik Sense Desktop
%ProgramData%/Qlik/Sense/Log/Engine %UserProfile%/Documents/Qlik/Sense/Log

Parameters:

  • mode - Error handling mode One of:
  • 0: for default mode.
  • 1: for ABEND; the reload of the script ends if an error occurs.
  • 2: for ignore; the reload of the script continues even if an error is detected in the script.
  • partial - Set to true for partial reload. The default value is false.
  • debug - Set to true if debug breakpoints are to be honored. The execution of the script will be in debug mode. The default value is false.

Stability: locked

doReloadEx: (params?: DoReloadExParams) => Promise<DoReloadExResult>

Reloads the script that is set in an app and returns the path to the script log file.

A log file is created per reload.

When this method is called, audit activity logs are produced to track the user activity. In the case of errors, both audit activity logs and system services logs are produced. The log files are named as follows:

Audit activity log System service log
< MachineName> AuditActivity Engine.txt in Qlik Sense Enterprise
< MachineName> AuditActivity Engine.log in Qlik Sense Desktop
< MachineName> Service Engine.txt in Qlik Sense Enterprise
< MachineName> Service Engine.log in Qlik Sense Desktop

The location of the log files depends on whether you have installed Qlik Sense Enterprise or Qlik Sense Desktop.

Qlik Sense Enterprise Qlik Sense Desktop
%ProgramData%/Qlik/Sense/Log/Engine %UserProfile%/Documents/Qlik/Sense/Log
Name Description Type
qMode Error handling mode
One of:
  • 0: for default mode.
  • 1: for ABEND; the reload of the script ends if an error occurs.
  • 2: for ignore; the reload of the script continues even if an error is detected in the script.
Integer
qPartial Set to true for partial reload.
The default value is false.
Boolean
qDebug Set to true if debug breakpoints are to be honored. The execution of the script will be in debug mode.
The default value is false.
Boolean
Name Description Type
qSuccess The operation is successful if qSuccess is set to True. Boolean
qScriptLogFile Path to the script log file. String

If the data load has successfully finished, no matter how the indexing behaves, true is returned. This happens even if there is a timeout, a memory limit is reached or any other error occurs during the indexing.

Stability: locked

doSave: (fileName?: string) => Promise<void>

Saves an app. All objects and data in the data model are saved.

Parameters:

  • fileName - Name of the file to save.

Stability: locked

evaluate: (expression: string) => Promise<string>

Evaluates an expression and returns the result as a string.

The client sends:

{
"handle": 1,
"method": "Evaluate",
"params": {
"qExpression": "Sum(Holes)"
},
"id": 6,
"jsonrpc": "2.0"
}

The engine returns:

{
"jsonrpc": "2.0",
"id": 6,
"result": {
"qReturn": "361716"
}
}

Parameters:

  • expression - Expression to evaluate.

Stability: locked

evaluateEx: (expression: string) => Promise<FieldValue>

Evaluates an expression and returns the result as a dual.

The client sends:

{
"handle": 1,
"method": "EvaluateEx",
"params": {
"qExpression": "Sum(Holes)"
},
"id": 7,
"jsonrpc": "2.0"
}

The engine returns:

{
"jsonrpc": "2.0",
"id": 7,
"result": {
"qReturn": "361716"
}
}

Parameters:

  • expression - Expression to evaluate.

Stability: locked

expandExpression: (expression: string) => Promise<string>

Expands the expression.

Parameters:

  • expression - The expression string to expand.

Stability: locked

exportReducedData: (options?: NxDownloadOptions) => Promise<NxDownloadInfo>

Applies a bookmark to reduce (slice) the data on. Returns a url and file size to the reduced application. Section Access is always applied.

This API is only available on Sense Enterprise on Windows

Parameters:

  • options - BookmarkId used to reduced the app on and an expire time.

Stability: locked

findMatchingFields: (
    fieldName: string,
    tags: string[],
) => Promise<NxMatchingFieldInfo[]>

Retrieves any fields that belong to the same archipelago as the specified field and that match at least one of the specified tags.

Tags set by Qlik Sense are prefixed by the _$_ sign.

Parameters:

  • fieldName - Name of the field. This method looks for fields that belong to the same archipelago as this specified field.
  • tags - List of tags. This method looks for fields that match at least one of the tags in this list.

Stability: locked

forward: () => Promise<void>

Loads the next logical operation (if any).

Stability: locked

forwardCount: () => Promise<number>

Returns the number of entries on the Forward stack.

Stability: locked

getAllInfos: () => Promise<NxInfo[]>

Returns the identifier and the type of any generic object in the app.

Stability: locked

getAppLayout: () => Promise<NxAppLayout>

Evaluates an app. Returns dynamic properties (if any) in addition to the engine (fixed) properties. A data set is returned.

Stability: locked

getAppProperties: () => Promise<NxAppProperties>

Gets the properties of an app.

Stability: locked

getAssociationScores: (
    table1: string,
    table2: string,
) => Promise<AssociationScore[]>

Computes a set of association scores for each pair of fields between two given tables that have been loaded in an app. When a table contains some synthetic keys, all fields in the synthetic key tables are analyzed against fields in other tables. To denote that a field is a synthetic key, the field name is prefixed by [Synthetic Key]: .

Parameters:

  • table1 - Name of the first table.
  • table2 - Name of the second table.

Stability: locked

getBookmark: (id: string) => Promise<GenericBookmarkRpcObject>

Returns the handle of a bookmark.

Parameters:

  • id - Identifier of the bookmark.

Stability: locked

getBookmarks: <QData>(
    options: NxGetBookmarkOptions,
) => Promise<NxContainerEntry<QData>[]>

Returns all bookmarks compatible with options.

Parameters:

  • options - Bookmark type filter and requested properties.

Stability: locked

getConnection: (connectionId: string) => Promise<Connection>

Retrieves a connection and returns:

  • The creation time of the connection.
  • The identifier of the connection.
  • The type of the connection.
  • The name of the connection.
  • The connection string.

Parameters:

  • connectionId - Identifier of the connection.

Stability: locked

getConnections: () => Promise<Connection[]>

Lists the connections in an app.

In Qlik Sense Enterprise, there is an additional file connection named _AttachedFiles_ . This connection is stored in the Qlik Sense repository.

Stability: locked

getContentLibraries: () => Promise<ContentLibraryList>

Lists the content libraries. To differentiate a global content library from an app specific content library, you can check the property qAppSpecific . If this property is set to true, it means that the content library is app specific.

There is always one specific content library per app.

Returns the global content libraries and the app specific content library. When using Qlik Sense, you can have more than one global content library. The global content libraries are common to all apps in the Qlik Sense repository. By default, there is one global content library named Default .

Returns the global content library and the app specific content library from the disk.

Stability: locked

getDatabaseInfo: (connectionId: string) => Promise<DatabaseInfo>

Gives information about an ODBC, OLEDB or CUSTOM connection. See Outputs for more details.

Parameters:

  • connectionId - Name of the connection.

Stability: locked

getDatabaseOwners: (
    connectionId: string,
    database?: string,
) => Promise<DatabaseOwner[]>

Lists the owners of a database for a ODBC, OLEDB or CUSTOM connection.

Parameters:

  • connectionId - Identifier of the connection.
  • database - Name of the database.

Stability: locked

getDatabases: (connectionId: string) => Promise<Database[]>

Lists the databases inside a ODBC, OLEDB or CUSTOM data source.

Parameters:

  • connectionId - Identifier of the connection.

Stability: locked

getDatabaseTableFields: (
    connectionId: string,
    database: string | undefined,
    owner: string | undefined,
    table: string,
) => Promise<DataField[]>

Lists the fields inside a table of a database for a ODBC, OLEDB or CUSTOM connection.

Parameters:

  • connectionId - Identifier of the connection.
  • database - Name of the database. If qDatabase is not set then qOwner must be set.
  • owner - Owner of the database. If qOwner is not set then qDatabase must be set.
  • table - Name of the table.

Stability: locked

getDatabaseTablePreview: (
    connectionId: string,
    database: string | undefined,
    owner: string | undefined,
    table: string,
    conditions?: FilterInfo,
) => Promise<unknown>

Retrieves the values of the specified table of a database for a ODBC, OLEDB or CUSTOM connection.

Parameters:

  • connectionId - Identifier of the connection.
  • database - Name of the database. If qDatabase is not set then qOwner must be set.
  • owner - Owner of the database. If qOwner is not set then qDatabase must be set.
  • table - Name of the table.
  • conditions -

Stability: locked

getDatabaseTables: (
    connectionId: string,
    database?: string,
    owner?: string,
) => Promise<DataTable[]>

Lists the tables inside a database for a ODBC, OLEDB or CUSTOM connection.

Parameters:

  • connectionId - Identifier of the connection.
  • database - Name of the database. If qDatabase is not set then qOwner must be set.
  • owner - Owner of the database. If qOwner is not set then qDatabase must be set.

Stability: locked

getDimension: (id: string) => Promise<GenericDimensionRpcObject>

Returns the handle of a dimension.

Parameters:

  • id - Identifier of the dimension.

Stability: locked

getEmptyScript: (localizedMainSection?: string) => Promise<string>

Creates a script that contains one section. This section contains SET statements that give localized information from the regional settings of the computer.

The computer regional settings are retrieved when the engine starts.

Parameters:

  • localizedMainSection - Name of the script section. The default value is Main .

Stability: locked

getExpressionBNF: () => Promise<unknown>

Gets the current Backus-Naur Form (BNF) grammar of the Qlik chart expressions supported within a given App.

Stability: experimental

getExpressionBNFHash: () => Promise<string>

Gets a string hash calculated from the current Backus-Naur Form (BNF) grammar of the Qlik chart expressions supported within a given App.

Stability: experimental

getFavoriteVariables: () => Promise<string[]>

Retrieves the variables that are tagged as favorite.

Stability: locked

getField: (fieldName: string, stateName?: string) => Promise<FieldRpcObject>

Returns a handle to a field.

Parameters:

  • fieldName - Name of the field.
  • stateName - Name of the alternate state. Default state is current selections.

Stability: locked

getFieldAndColumnSamples: (
    fieldsOrColumnsWithWildcards: FieldOrColumn[],
    maxNumberOfValues: number,
    randSeed?: number,
) => Promise<SampleResult[]>

Get sample values from either a column in a table or from a field. Supports wildcard matches in tables or field names:

  • '*' for zero or more characters.
  • '?' for one character.

Parameters:

  • fieldsOrColumnsWithWildcards - Pairs of table (optionally) and field names. Support wildcard matches.
  • maxNumberOfValues - Max number of sample values returned. Depending on the column or field size the number of returned samples can be less than MaxNumberOfValues. If MaxNumberOfValues is negative all sample values are returned.
  • randSeed - Optional. Sets the random number seed. Should only be set for test purposes.

Stability: locked

getFieldDescription: (fieldName: string) => Promise<FieldDescription>

Returns the description of a field.

Parameters:

  • fieldName - Name of the field.

Stability: locked

getFieldOnTheFlyByName: (readableName: string) => Promise<string>

Find the field-on-the-fly by passing its readable name.

Parameters:

  • readableName - Readable name of the field-on-the-fly.

Stability: locked

getFieldsFromExpression: (expr: string) => Promise<string[]>

Retrives any fields from an expression.

Parameters:

  • expr - Expression to get fields from.

Stability: locked

getFieldsResourceIds: (fieldNames: string[]) => Promise<NxFieldResourceId[]>

Returns a list of resource ids (QRI) for fields that belongs to the datamodel. Key fields (that belongs to multiple tables), returns one resource identifier per table.

GetFieldsResourceIds method is only supported in SaaS Editions of Qlik Sense.

Parameters:

  • fieldNames - List of fields names that resource ids should be returned from.

Stability: locked

getFileTableFields: (
    connectionId: string,
    relativePath: string | undefined,
    dataFormat: FileDataFormat,
    table: string,
) => Promise<unknown>

Lists the fields of a table for a folder connection.

Recognized file formats are:

  • CSV for Delimited
  • FIX for Fixed Record
  • DIF for Data Interchange Format
  • EXCEL_BIFF for Microsoft Excel (XLS)
  • EXCEL_OOXML for Microsoft Excel (XLSX)
  • HTML for HTML
  • QVD for QVD file
  • XML for XML
  • QVX for QVX file
  • JSON for JSON format
  • KML for KML file
  • PARQUET for PARQUET file

Parameters:

  • connectionId - Identifier of the connection.
  • relativePath - Path of the connection file.
  • dataFormat - Type of the file.
  • table - Name of the table. This parameter must be set for XLS , XLSX , _HTML _ and XML files.

Stability: locked

getFileTablePreview: (
    connectionId: string,
    relativePath: string | undefined,
    dataFormat: FileDataFormat,
    table: string,
) => Promise<unknown>

Lists the values in a table for a folder connection.

Recognized file formats are:

  • CSV for Delimited
  • FIX for Fixed Record
  • DIF for Data Interchange Format
  • EXCEL_BIFF for Microsoft Excel (XLS)
  • EXCEL_OOXML for Microsoft Excel (XLSX)
  • HTML for HTML
  • QVD for QVD file
  • XML for XML
  • QVX for QVX file
  • JSON for JSON format
  • KML for KML file
  • PARQUET for PARQUET file

Parameters:

  • connectionId - Identifier of the connection.
  • relativePath - Path of the connection file.
  • dataFormat - Type of the file.
  • table - Name of the table. This parameter must be set for XLS , XLSX , _HTML _ and XML files.

Stability: locked

getFileTables: (
    connectionId: string,
    relativePath: string | undefined,
    dataFormat: FileDataFormat,
) => Promise<DataTable[]>

Lists the tables for a folder connection.

Recognized file formats are:

  • CSV for Delimited
  • FIX for Fixed Record
  • DIF for Data Interchange Format
  • EXCEL_BIFF for Microsoft Excel (XLS)
  • EXCEL_OOXML for Microsoft Excel (XLSX)
  • HTML for HTML
  • QVD for QVD file
  • XML for XML
  • QVX for QVX file
  • JSON for JSON format
  • KML for KML file
  • PARQUET for PARQUET file

Parameters:

  • connectionId - Identifier of the connection.
  • relativePath - Path of the connection file.
  • dataFormat - Type of the file.

Stability: locked

getFileTablesEx: (
    connectionId: string,
    relativePath: string | undefined,
    dataFormat: FileDataFormat,
) => Promise<DataTableEx[]>

Lists the tables and fields of a JSON or XML file for a folder connection.

Parameters:

  • connectionId - Identifier of the connection.
  • relativePath - Path of the connection file.
  • dataFormat - Type of the file.

Stability: locked

getFolderItemsForConnection: (
    connectionId: string,
    relativePath?: string,
) => Promise<FolderItem[]>

Lists the items for a folder connection.

Parameters:

  • connectionId - Identifier of the connection.
  • relativePath - Relative path of the connection.

Stability: locked

getGroupStates: () => Promise<GroupState[]>
getIncludeFileContent: (path: string) => Promise<string>

Gets the content of a file.

Parameters:

  • path - ["lib://CONNECTION_NAME\&lt;the name of the file you want to use>.txt"] OR ["lib://Connection_Name\&lt;Folder under your connection>\&lt;the name of the file you want to use>.txt"] [ ] should be used when the first variable contains a lib reference.

Stability: locked

getLibraryContent: (name: string) => Promise<StaticContentList>

Returns the content of a library.

In Qlik Sense Desktop, the content files are retrieved from: %userprofile%\Documents\Qlik\Sense\Content\Default In Qlik Sense Enterprise, the content files are retrieved from the Qlik Sense repository.

The embedded files are returned.

Parameters:

  • name - Name of the content library. It corresponds to the property qContentLibraryListItem/qName returned by the GetContentLibraries method.

Stability: locked

getLineage: () => Promise<LineageInfo[]>

Gets the lineage information of the app. The lineage information includes the LOAD and STORE statements from the data load script associated with this app. An array of lineage information.

Stability: locked

getLocaleInfo: () => Promise<LocaleInfo>

Returns locale information.

Stability: locked

getLooselyCoupledVector: () => Promise<number[]>

Returns a list of table states.

The following states apply:

  • 0 The table is not loosely coupled.
  • 1 The table is loosely coupled.
  • 2 The table is loosely coupled and cannot be changed to another state using the Qlik Engine API.
The last three values in the vector are for internal use.
In case of circular references, the engine automatically sets the table state to loosely coupled to avoid creating loops.

Stability: locked

getMatchingFields: (
    tags: string[],
    matchingFieldMode?: string,
) => Promise<NxMatchingFieldInfo[]>

Retrieves any fields that match all of the specified tags or just one of them in the data model of an app.

Tags set by Qlik Sense are prefixed by the _$_ sign.

Parameters:

  • tags - List of tags. The GetMatchingFields method looks for fields that match one or all of the tags in this list, depending on the value of qMatchingFieldMode .
  • matchingFieldMode - Matching field mode. The default value is MATCHINGFIELDMODE_MATCH_ALL.

One of:

  • MATCHINGFIELDMODE_MATCH_ALL
  • MATCHINGFIELDMODE_MATCH_ONE

Stability: locked

getMeasure: (id: string) => Promise<GenericMeasureRpcObject>

Returns the handle of a measure.

Parameters:

  • id - Identifier of the measure.

Stability: locked

getMeasureWithLabel: (label: string) => Promise<GenericMeasureRpcObject>

Returns the handle of a measure with a label. If multiple measures has the same label the first is returned.

Parameters:

  • label - is the label of the measure to be returned.

Stability: locked

getMediaList: () => Promise<QMediaList>

Lists the media files.

@deprecated: Use GetLibraryContent method instead

Stability: locked

getObject: <CustomGenericObject = GenericObjectRpcObject>(
    id: string,
) => Promise<CustomGenericObject>

Returns the type of the app object and the corresponding handle.

Parameters:

  • id - Identifier of the object to retrieve.

Stability: locked

getObjects: <QData>(
    options: NxGetObjectOptions,
) => Promise<NxContainerEntry<QData>[]>

Returns all objects compatible with options.

Parameters:

  • options - Object type filter and requested properties.

Stability: locked

getOrCreateObject: <
    CustomProperties = DefaultGenericObjectProperties,
    CustomGenericObject = GenericObjectRpcObject,
>(
    prop: CustomProperties,
) => Promise<CustomGenericObject>

Get or create a generic object at app level with a specific Id and Type. Id and Type are specified in the GenericObjectProperties passed in. All other fields in this parameter serve as default properties. If the object does not exist with that Id, it is created and initialized from the default properties. If the object already exists, it is not changed. The properties passed in are not used. The call will fail if the Id is already used for another purpose, such as for an object of a different Type.

Parameters:

  • prop - GenericObjectProperties with at least Info : { "qId": "<identifier of the new generic object>", "qType": "<type of the new generic object>" }

Stability: experimental

getScript: () => Promise<string>

Gets values in script.

Stability: locked

getScriptBreakpoints: () => Promise<EditorBreakpoint[]>

Lists the breakpoints in the script of an app.

Stability: locked

getScriptEx: () => Promise<AppScript>

Gets script and script meta-data.

Stability: locked

getScriptMeta: () => Promise<AppScriptMeta>

Gets script meta-data.

Stability: experimental

getSetAnalysis: (stateName?: string, bookmarkId?: string) => Promise<string>

Returns a set analysis expression from active selections or from a saved bookmark. Fields on the fly and Calculated dimensions will not be included in the generated expressions, instead a message indicating 'missing fields' will provided within the expression.

BookmarkId empty BookmarkId set
StateName empty (or $) Default selections state is returned. Default state ($) in bookmark with id is returned.
StateName set State selections is returned. State in bookmark with id is returned.

Parameters:

  • stateName - Optional. The name of the state to get set analysis expression for. If left empty, the default state will be retrieved.
  • bookmarkId - Optional. The Id of the bookmark to get the set analysis expression for. If left empty, the current selection will be retrieved.

Stability: locked

getTableData: (
    offset: number,
    rows: number,
    syntheticMode: boolean,
    tableName: string,
) => Promise<TableRow[]>

Retrieves the data of a specific table.

Parameters:

  • offset - Position from the top, starting from 0. If the offset is set to 0, the rows starting from the position/index 0 are shown.
  • rows - Number of rows to show.
  • syntheticMode - If this parameter is set to true, the internal data/table representation is shown. Synthetic fields are present (if any).
  • tableName - Name of the table.

Stability: locked

getTableProfileData: (tableName: string) => Promise<TableProfilingData>

Returns profile data for a given table.

Parameters:

  • tableName - Name of the table

Stability: experimental

getTablesAndKeys: (
    windowSize: Size,
    nullSize: Size,
    cellHeight: number,
    syntheticMode: boolean,
    includeSysVars: boolean,
    includeProfiling?: boolean,
) => Promise<unknown>

Returns:

  • The list of tables in an app and the fields inside each table.
  • The list of derived fields.
  • The list of key fields.

Parameters:

  • windowSize - Size of the window that is used to display the results.
  • nullSize -
  • cellHeight - Height of a cell in a table in pixels.
  • syntheticMode - One of:
  • true for internal table viewer: Shows a more detailed view on how the Qlik engine defines the relations between fields and the quality of the keys.
  • false for source table viewer: Shows the natural relation between fields without reference to synthetic keys and resultant linking synthetic tables. Instead synthetic keys are represented by multiple connectors between tables.
  • includeSysVars - If set to true, the system variables are included.
  • includeProfiling - If set to true, profiling information is included.

Stability: locked

getTextMacros: () => Promise<TextMacro[]>

Fetches updated variables after a statement execution.

If qRefSeqNo and qSetSeqNo are set to 0, it means that the variables were not updated.

Stability: locked

getVariable: (name: string) => Promise<GenericVariableRpcObject>

Returns a handle to a variable.

Parameters:

  • name - Name of the variable.

@deprecated: Use Doc::GetVariableById method or Doc::GetVariableByName method instead

Stability: locked

getVariableById: (id: string) => Promise<GenericVariableRpcObject>

Gets the handle of a variable.

Parameters:

  • id - Identifier of the variable.

Stability: locked

getVariableByName: (name: string) => Promise<GenericVariableRpcObject>

Gets the handle of a variable.

Parameters:

  • name - Name of the variable.

Stability: locked

getVariables: <QData>(
    listDef: VariableListDef,
) => Promise<NxVariableListItem<QData>[]>
getViewDlgSaveInfo: () => Promise<TableViewDlgSaveInfo>

Returns information about the position of the tables in the data model viewer.

The position of the broom points and the position of the connection points cannot be retrieved in Qlik Sense.

Stability: locked

guessFileType: (
    connectionId: string,
    relativePath?: string,
) => Promise<FileDataFormat>

Guesses the data format for a given file. Recognized file formats are:

  • CSV for Delimited
  • FIX for Fixed Record
  • DIF for Data Interchange Format
  • EXCEL_BIFF for Microsoft Excel (XLS)
  • EXCEL_OOXML for Microsoft Excel (XLSX)
  • HTML for HTML
  • QVD for QVD file
  • XML for XML
  • QVX for QVX file
  • JSON for JSON format
  • KML for KML file
  • PARQUET for PARQUET file

Recognized file formats are:

  • CSV for Delimited
  • FIX for Fixed Record
  • DIF for Data Interchange Format
  • EXCEL_BIFF for Microsoft Excel (XLS)
  • EXCEL_OOXML for Microsoft Excel (XLSX)
  • HTML for HTML
  • QVD for QVD file
  • XML for XML
  • QVX for QVX file
  • JSON for JSON format
  • KML for KML file
  • PARQUET for PARQUET file

Parameters:

  • connectionId - Identifier of the connection file.
  • relativePath - Path of the connection file.

Stability: locked

lockAll: (stateName?: string) => Promise<void>

Locks all selections in fields for current state.

Parameters:

  • stateName - Alternate state name. When set, applies to alternate state instead of current.

Stability: locked

modifyConnection: (
    connectionId: string,
    connection: Connection,
    overrideCredentials?: boolean,
) => Promise<void>

Updates a connection.

The identifier of a connection cannot be updated. qType cannot be modified with the ModifyConnection method.

Parameters:

  • connectionId - Identifier of the connection.
  • connection - Information about the connection. Properties that can be updated.
  • overrideCredentials - Set this parameter to true to override the user name and password.

Stability: locked

publish: (streamId: string, name?: string) => Promise<void>

Publishes an app. All app objects are published. Generic objects, bookmarks, dimensions and measures inside the app are published.

An app can only be published once and cannot be published to more than one stream.

Parameters:

  • streamId - Identifier of the stream.
  • name - Name of the published app. If this parameter is not set, the engine automatically gives a new name to the published app.

Stability: locked

redo: () => Promise<boolean>

Redoes the previous operation.

The operation is successful if **qSuccess** is set to true.

Stability: locked

removeAlternateState: (stateName: string) => Promise<void>

Removes an alternate state in the app.

Parameters:

  • stateName - Name of the alternate state.

Stability: locked

removeSessionAlternateState: (stateName: string) => Promise<boolean>

Removes an session alternate state in the app.

The operation is successful if **qSuccess** is set to true.

Parameters:

  • stateName - Name of the alternate state.

Stability: locked

removeVariable: (name: string) => Promise<boolean>

Removes a variable.

Parameters:

  • name - Name of the variable. Variable names are case sensitive.

@deprecated: Use Doc::DestroyVariableById method or Doc::DestroyVariableByName method instead

Stability: locked

replaceBookmark: (
    id: string,
    ignorePatches?: boolean,
    objectIdsToPatch?: string[],
) => Promise<unknown>

Replace a bookmark. Optional inparams to change the original bookmarks properties, original are kept if left out.

Parameters:

  • id - Identifier of the bookmark.
  • ignorePatches - Set to true to exclude patches from the bookmark. Default is false.
  • objectIdsToPatch - Add softpatches for this objects if available. If empty all softpatches are added to the bookmark. Ignored if IgnorePatches is set to true.

Stability: locked

restoreTempSelectionState: (id: string) => Promise<boolean>

Restore a temporary selection state identified by Id.

RestoreTempSelectionState method is only supported in SaaS Editions of Qlik Sense.

Parameters:

  • id - Identifier of the temporary selection state

Stability: locked

resume: () => Promise<void>

Resumes the app as the user left it.

Stability: locked

saveAs: (newAppName: string) => Promise<string>

Save a copy of an app with a different name. Can be used to save a session app as an ordinary app.

Parameters:

  • newAppName - <Name of the saved app>

Stability: locked

saveObjects: () => Promise<void>

Saves all objects that were modified in the app.

Data from the data model are not saved.
This operation is possible only in Qlik Sense Enterprise.

Stability: locked

scramble: (fieldName: string) => Promise<void>

Scrambles a field so the data is not recognizable. Some properties are retained to help debugging. For example, special characters are not changed, and small numbers are scrambled to another small number.

Update access is required to use the function in Qlik Sense Enterprise.

Parameters:

  • fieldName - Name of the field to scramble.

Stability: locked

searchAssociations: (
    options: SearchCombinationOptions,
    terms: string[],
    page: SearchPage,
) => Promise<SearchAssociationResult>

Returns the search matches for one or more search terms. The search results depend on the search context. SearchCombinationOptions

Name Description Type
qSearchMatchCombinations Array of search combinations. Array of SearchMatchCombination

Parameters:

  • options - Information about the search fields and the search context.
  • terms - List of terms to search for.
  • page - Array of pages to retrieve.

@deprecated: Use SearchResults method instead

Stability: locked

searchObjects: (
    options: SearchObjectOptions,
    terms: string[],
    page: SearchPage,
) => Promise<SearchResult>

Returns the generic objects corresponding to one or more search terms. The search is performed within the title, subtitle, footnote and type. In addition, associated dimension values are also searched in. For example, if the country “Japan” is selected and the object contains the dimension City, the object will appear in the results for “Osaka” but not for “Johannesburg”. The generic objects with the following types will never appear in the results: slideitem , sheet , story , slide , masterobject , snapshot , LoadModel , appprops and searchhistory .

Parameters:

  • options - Information about attributes.
  • terms - Terms to search for.
  • page - Array of pages to retrieve.

Stability: locked

searchResults: (
    options: SearchCombinationOptions,
    terms: string[],
    page: SearchPage,
) => Promise<SearchResult>

Returns the search matches for one or more search terms. Search results are organized in search groups. The type of search group indicates where the search matches come from (from data for example). Each search group contains search results that correspond to a combination of search terms. For example, if the search terms are organic , pasta , and America , the possible combination of search groups are:

  • organic
  • pasta
  • America
  • organic, pasta, America
  • organic, pasta
  • organic, America
  • pasta, America

For every search group, there are one or more search group items. Each subgroup item contains results that correspond to an item type (for example a field). For every search group item, there are one or several search matches. The position of the match in each search result is given.

Parameters:

  • options - Information about the search combinations.
  • terms - Terms to search for.
  • page - Array of pages to retrieve.

Stability: locked

searchSuggest: (
    options: SearchCombinationOptions,
    terms: string[],
) => Promise<SearchSuggestionResult>

Returns search terms suggestions.

Parameters:

  • options - Information about the search combinations.
  • terms - Terms to search for.

Stability: locked

searchValues: (
    options: SearchValueOptions,
    terms: string[],
    page: SearchValuePage,
) => Promise<SearchValueResult>
selectAssociations: (
    options: SearchCombinationOptions,
    terms: string[],
    matchIx: number,
    softLock?: boolean,
) => Promise<void>

Selects all search hits for a specified group. The results depend on the search context. SearchCombinationOptions.

Parameters:

  • options - Information about the search fields and the search context.
  • terms - List of terms to search for.
  • matchIx - Index (value of qId ) of the search result to select.
  • softLock - This parameter is deprecated and should not be set.

Stability: locked

sendGenericCommandToCustomConnector: (
    provider: string,
    command: string,
    method: string,
    parameters: string[],
    appendConnection: string,
) => Promise<string>

Sends a generic command to a custom connector. For more information on the commands that can be sent to a custom connector, see the QVX SDK help.

Parameters:

  • provider - Connector file name. Command to be executed by the connector.
  • command - One of:
  • JsonRequest
  • GetCustomCaption
  • IsConnected
  • DisableQlikViewSelectButton
  • HaveStarField
  • method - Method name to be used within the command. The available methods depend on the chosen connector.
  • parameters - Parameters of the command. No parameters are required.
  • appendConnection - Name of the connection.

Stability: locked

setAppProperties: (prop: NxAppProperties) => Promise<void>

Sets properties to an app.

The qLastReloadTime, qMigrationHash and qSavedInProductVersion properties does not need to be set but if they are, they should match the current values in the app layout.

Parameters:

  • prop - Information about the properties of an app.

Stability: locked

setFavoriteVariables: (names: string[]) => Promise<void>

Set some variables as favorite.

Parameters:

  • names - Variables to set as favorite.

Stability: locked

setFetchLimit: (limit: number) => Promise<void>

Limits the number of rows of data to load from a data source. This method works when reloading in debug mode.

Parameters:

  • limit - Fetch limit. Number of rows to load.

Stability: locked

setLooselyCoupledVector: (v: number[]) => Promise<boolean>

Sets a list of table states, one for each table.

The following states apply:

  • 0 The table is not loosely coupled.
  • 1 The table is loosely coupled.
  • 2 The table is loosely coupled and cannot be changed to another state using the Qlik Engine API.
The last three values in the vector are for internal use.

Parameters:

  • v - The list of table states to set. A state will not be changed if already set to 2.

Stability: locked

setProhibitBinaryLoad: (prohibit: boolean) => Promise<void>

Prohibit binary load of this app. An app with prohibit binary load set cannot be loaded binary. For the setting to have effect a save is required.

Parameters:

  • prohibit - True or false.

Stability: locked

setScript: (script: string) => Promise<void>

Sets values in script.

Parameters:

  • script - Script content.

Stability: locked

setScriptBreakpoints: (breakpoints: EditorBreakpoint[]) => Promise<void>

Set some breakpoints in the script of an app.

Parameters:

  • breakpoints - Information about the breakpoints.

Stability: locked

setViewDlgSaveInfo: (info: TableViewDlgSaveInfo) => Promise<void>

Sets the positions of the tables in the data model viewer.

The position of the broom points and the position of the connection points cannot be set in Qlik Sense.

Parameters:

  • info - Information about the table.

Stability: locked

storeTempSelectionState: (tTLOfTempState?: number) => Promise<unknown>

Store current selection state temporarily.

The temporary selection state will be stored for 30min by default if TTL parameter is not present or positive.
StoreTempSelectionState method is only supported in SaaS Editions of Qlik Sense.

Parameters:

  • tTLOfTempState - Time to live in seconds for stored selection state

Stability: locked

transformApp: (
    dstParameters: TransformAppParameters,
) => Promise<TransformAppResult>

Transform current app into an instance of the targeted mode

Parameters:

  • dstParameters - Attributes that should be set in the new app.

Stability: locked

undo: () => Promise<boolean>

Undoes the previous operation.

The operation is successful if **qSuccess** is set to true.

Stability: locked

unlockAll: (stateName?: string) => Promise<void>

Unlocks all selections in fields for current state.

Parameters:

  • stateName - Alternate state name. When set, applies to alternate state instead of current.

Stability: locked