Skip to content

Doc

QIX methods for version 12.207.0.

AbortModal

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

Parameters:

Name Type Mandatory Description
qAccept boolean Yes Set this parameter to true to accept the selections before exiting the selection mode.

No return values.

AddAlternateState

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:

Name Type Mandatory Description
qStateName string Yes Name of the alternate state.

No return values.

AddFieldFromExpression

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 Type Mandatory Description
qName string Yes Name of the field.
qExpr string Yes 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.

Returns:

Name Type Description
qSuccess boolean True or False.

ApplyBookmark

Applies a bookmark.
The operation is successful if qSuccess is set to true.

Parameters:

Name Type Mandatory Description
qId string Yes Identifier of the bookmark.

Returns:

Name Type Description
qSuccess boolean True or False.

Back

Loads the last logical operation (if any).

No parameters.

No return values.

BackCount

Returns the number of entries on the back stack.

No parameters.

Returns:

Name Type Description
qReturn integer <Number of entries in the back stack>

CheckExpression

Checks if a given expression is valid.
The expression is correct if the parameters qErrorMsg , qBadFieldNames and qDangerousFieldNames are empty.

Parameters:

Name Type Mandatory Description
qExpr string Yes Expression to check.
qLabels array No List of labels.

Returns:

Name Type Description
qErrorMsg string Message displayed when there is a syntax error.
qBadFieldNames array<NxRange> A list of bad field names.
qDangerousFieldNames array<NxRange> A list of dangerous field names.

CheckNumberOrExpression

Checks if:
A given expression is valid.
A number is correct according to the locale.

Parameters:

Name Type Mandatory Description
qExpr string Yes Expression to check.

Returns:

Name Type Description
qErrorMsg string Message displayed when there is a syntax error.
qBadFieldNames array<NxRange> A list of bad field names.

CheckScriptSyntax

Checks the syntax of a script.

No parameters.

Returns:

Name Type Description
qErrors array<ScriptSyntaxError> []

ClearAll

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

Parameters:

Name Type Mandatory Description
qLockedAlso boolean No When true, clears the selection for locked fields.
qStateName string No Alternate state name. When set, applies to alternate state instead of current

No return values.

ClearUndoBuffer

Clears entirely the undo and redo buffer.

No parameters.

No return values.

CloneBookmark

Clones a bookmark.
The identifier is set by the engine.

Parameters:

Name Type Mandatory Description
qId string Yes Identifier of the object to clone.

Returns:

Name Type Description
qCloneId string Identifier of the clone.

CloneDimension

Clones a dimension.

The identifier is set by the engine.

Parameters:

Name Type Mandatory Description
qId string Yes Identifier of the object to clone.

Returns:

Name Type Description
qCloneId string <identifier of the clone>

CloneMeasure

Clones a measure.

The identifier is set by the engine.

Parameters:

Name Type Mandatory Description
qId string Yes Identifier of the object to clone.

Returns:

Name Type Description
qCloneId string <identifier of the clone>

CloneObject

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:

Name Type Mandatory Description
qId string Yes Identifier of the object to clone. The identifier must be a root object.

Returns:

Name Type Description
qCloneId string <identifier of the clone>

CommitDraft

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

Parameters:

Name Type Mandatory Description
qId string Yes Identifier of the draft to commit.

No return values.

CreateBookmark

Creates a bookmark.

Parameters:

Name Type Mandatory Description
qProp GenericBookmarkProperties Yes Properties for the object.

Returns:

Name Type Description
qInfo NxInfo Information about the bookmark.
qReturn ObjectInterface Generic bookmark

CreateConnection

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

Parameters:

Name Type Mandatory Description
qConnection Connection Yes Information about the connection.

Returns:

Name Type Description
qConnectionId string <identifier of the connection>

CreateDimension

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:

Name Type Mandatory Description
qProp GenericDimensionProperties Yes Information about the properties.

Returns:

Name Type Description
qInfo NxInfo {"qId":"<identifier of the dimension>","qType":"Dimension"}
qReturn ObjectInterface { "qType": "GenericDimension", "qHandle": <handle of the dimension> }

CreateDraft

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:

Name Type Mandatory Description
qId string Yes Identifier of the object to create a draft from.

Returns:

Name Type Description
qDraftId string <identifier of the draft>

CreateMeasure

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:

Name Type Mandatory Description
qProp GenericMeasureProperties Yes Information about the properties.

Returns:

Name Type Description
qInfo NxInfo {"qId":"<identifier of the measure>","qType":"Measure"}
qReturn ObjectInterface { "qType": "GenericMeasure", "qHandle": <handle of the measure> }

CreateObject

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:

Name Type Mandatory Description
qProp GenericObjectProperties Yes Information about the object.

Returns:

Name Type Description
qInfo NxInfo {"qId":"<identifier of the new object>","qType":"<type of the new object>"}
qReturn ObjectInterface { "qType": "GenericObject", "qHandle": <handle of the new object> }

CreateSessionObject

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:

Name Type Mandatory Description
qProp GenericObjectProperties Yes Information about the object.

Returns:

Name Type Description
qReturn ObjectInterface {"qType":"GenericObject","qHandle":"<handle>"}

CreateSessionVariable

Creates a transient variable.
To set some properties to the variable, use the SetProperties method.

Parameters:

Name Type Mandatory Description
qProp GenericVariableProperties Yes Name of the variable. Variable names are case sensitive.

Returns:

Name Type Description
qReturn ObjectInterface { "qType": "GenericVariable", "qHandle": <Handle of the variable> }

CreateVariable

Deprecated

Use Doc::CreateVariableEx method instead

Creates a variable.

Parameters:

Name Type Mandatory Description
qName string Yes Name of the variable. Variable names are case sensitive.

Returns:

Name Type Description
qReturn boolean <true/false>
The operation is successful if qReturn is set to true.

CreateVariableEx

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.

Parameters:

Name Type Mandatory Description
qProp GenericVariableProperties Yes Name of the variable. Variable names are case sensitive and must be unique.

Returns:

Name Type Description
qInfo NxInfo Identifier and type of the object.
qReturn ObjectInterface No description.

DeleteConnection

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:

Name Type Mandatory Description
qConnectionId string Yes Identifier of the connection to remove.

No return values.

DestroyBookmark

Removes a bookmark.
The operation is successful if qSuccess is set to true.

Parameters:

Name Type Mandatory Description
qId string Yes Identifier of the bookmark.

Returns:

Name Type Description
qSuccess boolean True or False.

DestroyDimension

Removes a dimension.

The operation is successful if qSuccess is set to true.

Parameters:

Name Type Mandatory Description
qId string Yes Identifier of the dimension to remove.

Returns:

Name Type Description
qSuccess boolean <true or false>

DestroyDraft

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:

Name Type Mandatory Description
qId string Yes Identifier of the draft object to remove.
qSourceId string Yes Identifier of the source object (the object from which a draft was created).

Returns:

Name Type Description
qSuccess boolean <true or false>

DestroyMeasure

Removes a generic measure.

The operation is successful if qSuccess is set to true.

Parameters:

Name Type Mandatory Description
qId string Yes Identifier of the measure to remove.

Returns:

Name Type Description
qSuccess boolean <true or false>

DestroyObject

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:

Name Type Mandatory Description
qId string Yes Identifier of the object to remove.

Returns:

Name Type Description
qSuccess boolean <true or false>

DestroySessionObject

Removes a transient object.

The operation is successful if qSuccess is set to true.

Parameters:

Name Type Mandatory Description
qId string Yes Identifier of the transient object to remove.

Returns:

Name Type Description
qSuccess boolean <true, false>

DestroySessionVariable

Removes a transient variable.

The operation is successful if qSuccess is set to true.

Parameters:

Name Type Mandatory Description
qId string Yes Identifier of the variable.

Returns:

Name Type Description
qSuccess boolean <true or false>

DestroyVariableById

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 Type Mandatory Description
qId string Yes Identifier of the variable.

Returns:

Name Type Description
qSuccess boolean <true or false>

DestroyVariableByName

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 Type Mandatory Description
qName string Yes Name of the variable.

Returns:

Name Type Description
qSuccess boolean <true or false>

DoReload

Reloads the script that is set in an app.

Parameters:

Name Type Mandatory Description
qMode integer No 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.
qPartial boolean No Set to true for partial reload.
The default value is false.
qDebug boolean No 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.

Returns:

Name Type Description
qReturn boolean <true or false>
The operation is successful if qReturn is set to true.
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.

DoReloadEx

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.

Parameters:

Name Type Mandatory Description
qParams DoReloadExParams No No description.

Returns:

Name Type Description
qResult DoReloadExResult No description.

DoSave

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

Parameters:

Name Type Mandatory Description
qFileName string No Name of the file to save.

No return values.

Evaluate

Evaluates an expression and returns the result as a string.

Parameters:

Name Type Mandatory Description
qExpression string Yes Expression to evaluate.

Returns:

Name Type Description
qReturn string The result of the evaluation.

EvaluateEx

Evaluates an expression and returns the result as a dual.

Parameters:

Name Type Mandatory Description
qExpression string Yes Expression to evaluate.

Returns:

Name Type Description
qValue FieldValue The result of the evaluation as a dual.

FindMatchingFields

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:

Name Type Mandatory Description
qFieldName string Yes Name of the field.
This method looks for fields that belong to the same archipelago as this specified field.
qTags array Yes List of tags.
This method looks for fields that match at least one of the tags in this list.

Returns:

Name Type Description
qFieldNames array<NxMatchingFieldInfo> List of matching fields.

Forward

Loads the next logical operation (if any).

No parameters.

No return values.

ForwardCount

Returns the number of entries on the Forward stack.

No parameters.

Returns:

Name Type Description
qReturn integer <Number of entries in the forward stack>

GetAllInfos

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

No parameters.

Returns:

Name Type Description
qInfos array<NxInfo> Information about all generic objects in the app.

GetAppLayout

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

No parameters.

Returns:

Name Type Description
qLayout NxAppLayout A data set.

GetAppProperties

Gets the properties of an app.

No parameters.

Returns:

Name Type Description
qProp NxAppProperties Information about the properties of the app.

GetAssociationScores

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:

Name Type Mandatory Description
qTable1 string Yes Name of the first table.
qTable2 string Yes Name of the second table.

Returns:

Name Type Description
qScore array<AssociationScore> Array of computed scores.

GetBookmark

Returns the handle of a bookmark.

Parameters:

Name Type Mandatory Description
qId string Yes Identifier of the bookmark.

Returns:

Name Type Description
qReturn ObjectInterface Generic bookmark.

GetBookmarks

No details.

Parameters:

Name Type Mandatory Description
qOptions NxGetBookmarkOptions Yes No description.

Returns:

Name Type Description
qList array<NxContainerEntry> No description.

GetConnection

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:

Name Type Mandatory Description
qConnectionId string Yes Identifier of the connection.

Returns:

Name Type Description
qConnection Connection Information about the connection.

GetConnections

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.

No parameters.

Returns:

Name Type Description
qConnections array<Connection> List of connections.

GetContentLibraries

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.

No parameters.

Returns:

Name Type Description
qList ContentLibraryList List the content libraries.

GetDatabaseInfo

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

Parameters:

Name Type Mandatory Description
qConnectionId string Yes Name of the connection.

Returns:

Name Type Description
qInfo DatabaseInfo Information about the connection.

GetDatabaseOwners

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

Parameters:

Name Type Mandatory Description
qConnectionId string Yes Identifier of the connection.
qDatabase string No Name of the database.

Returns:

Name Type Description
qOwners array<DatabaseOwner> List of owner names.

GetDatabaseTableFields

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

Parameters:

Name Type Mandatory Description
qConnectionId string Yes Identifier of the connection.
qDatabase string No Name of the database.
If qDatabase is not set then qOwner must be set.
qOwner string No Owner of the database.
If qOwner is not set then qDatabase must be set.
qTable string Yes Name of the table.

Returns:

Name Type Description
qFields array<DataField> List of the fields.

GetDatabaseTablePreview

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

Parameters:

Name Type Mandatory Description
qConnectionId string Yes Identifier of the connection.
qDatabase string No Name of the database.
If qDatabase is not set then qOwner must be set.
qOwner string No Owner of the database.
If qOwner is not set then qDatabase must be set.
qTable string Yes Name of the table.
qConditions FilterInfo No No description.

Returns:

Name Type Description
qPreview array<DataRecord> List the values in the table.
qRowCount integer No description.

GetDatabaseTables

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

Parameters:

Name Type Mandatory Description
qConnectionId string Yes Identifier of the connection.
qDatabase string No Name of the database.
If qDatabase is not set then qOwner must be set.
qOwner string No Owner of the database.
If qOwner is not set then qDatabase must be set.

Returns:

Name Type Description
qTables array<DataTable> List of the tables.

GetDatabases

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

Parameters:

Name Type Mandatory Description
qConnectionId string Yes Identifier of the connection.

Returns:

Name Type Description
qDatabases array<Database> List of databases.

GetDimension

Returns the handle of a dimension.

Parameters:

Name Type Mandatory Description
qId string Yes Identifier of the dimension.

Returns:

Name Type Description
qReturn ObjectInterface { "qType": "GenericDimension", "qHandle": <handle of the dimension> }The handle of the dimension is returned.

GetEmptyScript

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:

Name Type Mandatory Description
qLocalizedMainSection string No Name of the script section.
The default value is Main .

Returns:

Name Type Description
qReturn string Script contents with SET statements containing localized information

GetFavoriteVariables

Retrieves the variables that are tagged as favorite.

No parameters.

Returns:

Name Type Description
qNames array<string> Favorite variables to retrieve.

GetField

Returns a handle to a field.

Parameters:

Name Type Mandatory Description
qFieldName string Yes Name of the field.
qStateName string No Name of the alternate state.
Default state is current selections.

Returns:

Name Type Description
qReturn ObjectInterface Handle to the field

GetFieldDescription

Returns the description of a field.

Parameters:

Name Type Mandatory Description
qFieldName string Yes Name of the field.

Returns:

Name Type Description
qReturn FieldDescription Description of the field.

GetFieldOnTheFlyByName

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

Parameters:

Name Type Mandatory Description
qReadableName string Yes Readable name of the field-on-the-fly.

Returns:

Name Type Description
qName string Fields-on-the-fly expression in form of a name.

GetFileTableFields

Lists the fields of a table for a folder connection.

Parameters:

Name Type Mandatory Description
qConnectionId string Yes Identifier of the connection.
qRelativePath string No Path of the connection file.
qDataFormat FileDataFormat Yes Type of the file.
qTable string Yes Name of the table.
This parameter must be set for XLS , XLSX , HTML   and XML files.

Returns:

Name Type Description
qFields array<DataField> List of the tables.
qFormatSpec string List of format specification items, within brackets.
Examples of specification items:
file type
embedded labels, no labels
* table is <table name>

GetFileTablePreview

Lists the values in a table for a folder connection.

Parameters:

Name Type Mandatory Description
qConnectionId string Yes Identifier of the connection.
qRelativePath string No Path of the connection file.
qDataFormat FileDataFormat Yes Type of the file.
qTable string Yes Name of the table.
This parameter must be set for XLS , XLSX , HTML   and XML files.

Returns:

Name Type Description
qPreview array<DataRecord> List of the tables.
qFormatSpec string List of format specification items, within brackets.
Examples of specification items:
file type
embedded labels, no labels
* table is <table name>

GetFileTables

Lists the tables for a folder connection.

Parameters:

Name Type Mandatory Description
qConnectionId string Yes Identifier of the connection.
qRelativePath string No Path of the connection file.
qDataFormat FileDataFormat Yes Type of the file.

Returns:

Name Type Description
qTables array<DataTable> List of the tables.

GetFileTablesEx

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

Parameters:

Name Type Mandatory Description
qConnectionId string Yes Identifier of the connection.
qRelativePath string No Path of the connection file.
qDataFormat FileDataFormat Yes Type of the file.

Returns:

Name Type Description
qTables array<DataTableEx> List of the tables.

GetFolderItemsForConnection

Lists the items for a folder connection.

Parameters:

Name Type Mandatory Description
qConnectionId string Yes Identifier of the connection.
qRelativePath string No Relative path of the connection.

Returns:

Name Type Description
qFolderItems array<FolderItem> List of the folder items.

GetIncludeFileContent

Gets the content of a file.

Parameters:

Name Type Mandatory Description
qPath string Yes ["lib://CONNECTION_NAME\\<the name of the file you want to use>.txt"]
OR
["lib://Connection_Name\\<Folder under your connection>\\<the name of the file you want to use>.txt"]
[ ] should be used when the first variable contains a lib reference.

Returns:

Name Type Description
qContent string Content of the file.

GetLibraryContent

Returns the content of a library.

Parameters:

Name Type Mandatory Description
qName string Yes Name of the content library.
It corresponds to the property qContentLibraryListItem/qName returned by the GetContentLibraries method.

Returns:

Name Type Description
qList StaticContentList List the content files in the content library.

GetLineage

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.

No parameters.

Returns:

Name Type Description
qLineage array<LineageInfo> Information about the lineage of the data in the app.

GetLocaleInfo

Returns locale information.

No parameters.

Returns:

Name Type Description
qReturn LocaleInfo Information about the locale.

GetLooselyCoupledVector

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.

No parameters.

Returns:

Name Type Description
qv array<string> The list of table states

GetMatchingFields

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:

Name Type Mandatory Description
qTags array Yes 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 .
qMatchingFieldMode string No Matching field mode.
The default value is MATCHINGFIELDMODE_MATCH_ALL.

One of:
MATCHINGFIELDMODE_MATCH_ALL
MATCHINGFIELDMODE_MATCH_ONE

Returns:

Name Type Description
qFieldNames array<NxMatchingFieldInfo> List of matching fields.

GetMeasure

Returns the handle of a measure.

Parameters:

Name Type Mandatory Description
qId string Yes Identifier of the measure.

Returns:

Name Type Description
qReturn ObjectInterface { "qType": "GenericMeasure", "qHandle": <handle of the measure> }The handle of the measure is returned.

GetMediaList

Deprecated

Use GetLibraryContent method instead

Lists the media files.

No parameters.

Returns:

Name Type Description
qList MediaList Information about the media files.
qReturn boolean Is set to true if the operation is successful.

GetObject

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

Parameters:

Name Type Mandatory Description
qId string Yes Identifier of the object to retrieve.

Returns:

Name Type Description
qReturn ObjectInterface { "qType": "GenericObject", "qHandle": <handle> }

GetObjects

No details.

Parameters:

Name Type Mandatory Description
qOptions NxGetObjectOptions Yes No description.

Returns:

Name Type Description
qList array<NxContainerEntry> No description.

GetScript

Gets values in script.

No parameters.

Returns:

Name Type Description
qScript string <script values>

GetScriptBreakpoints

Lists the breakpoints in the script of an app.

No parameters.

Returns:

Name Type Description
qBreakpoints array<EditorBreakpoint> Information about the breakpoints.

GetScriptEx

Gets script and script meta-data.

No parameters.

Returns:

Name Type Description
qScript AppScript The script and meta data of the script.

GetSetAnalysis

Returns a set analysis expression from active selection or from a saved bookmark.

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:

Name Type Mandatory Description
qStateName string No Optional. The name of the state to get set analysis expression for. If left empty, the default state will be retrieved.
qBookmarkId string No Optional. The Id of the bookmark to get the set analysis expression for. If left empty, the current selection will be retrieved.

Returns:

Name Type Description
qSetExpression string No description.

GetTableData

Retrieves the data of a specific table.

Parameters:

Name Type Mandatory Description
qOffset integer Yes Position from the top, starting from 0.
If the offset is set to 0, the rows starting from the position/index 0 are shown.
qRows integer Yes Number of rows to show.
qSyntheticMode boolean Yes If this parameter is set to true, the internal data/table representation is shown. Synthetic fields are present (if any).
qTableName string Yes Name of the table.

Returns:

Name Type Description
qData array<TableRow> Array of data.

GetTablesAndKeys

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:

Name Type Mandatory Description
qWindowSize Size Yes Size of the window that is used to display the results.
qNullSize Size Yes No description.
qCellHeight integer Yes Height of a cell in a table in pixels.
qSyntheticMode boolean Yes 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.
qIncludeSysVars boolean Yes If set to true, the system variables are included.

Returns:

Name Type Description
qtr array<TableRecord> List of tables.
qk array<SourceKeyRecord> List of keys.

GetTextMacros

Fetches updated variables after a statement execution.

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

No parameters.

Returns:

Name Type Description
qMacros array<TextMacro> List of variables.

GetVariable

Deprecated

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

Returns a handle to a variable.

Parameters:

Name Type Mandatory Description
qName string Yes Name of the variable.

Returns:

Name Type Description
qReturn ObjectInterface Handle to the variable.

GetVariableById

Gets the handle of a variable.

Parameters:

Name Type Mandatory Description
qId string Yes Identifier of the variable.

Returns:

Name Type Description
qReturn ObjectInterface { "qType": "GenericVariable", "qHandle": <Handle of the variable> }

GetVariableByName

Gets the handle of a variable.

Parameters:

Name Type Mandatory Description
qName string Yes Name of the variable.

Returns:

Name Type Description
qReturn ObjectInterface { "qType": "GenericVariable", "qHandle": <Handle of the variable> }

GetViewDlgSaveInfo

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.

No parameters.

Returns:

Name Type Description
qReturn TableViewDlgSaveInfo Information about the position of the tables.

GuessFileType

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

Parameters:

Name Type Mandatory Description
qConnectionId string Yes Identifier of the connection file.
qRelativePath string No Path of the connection file.

Returns:

Name Type Description
qDataFormat FileDataFormat Information about the format of the data.

LockAll

Locks all selections in fields for current state.

Parameters:

Name Type Mandatory Description
qStateName string No Alternate state name. When set, applies to alternate state instead of current.

No return values.

ModifyConnection

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

Parameters:

Name Type Mandatory Description
qConnectionId string Yes Identifier of the connection.
qConnection Connection Yes Information about the connection.
Properties that can be updated.
qOverrideCredentials boolean No Set this parameter to true to override the user name and password.

No return values.

Publish

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:

Name Type Mandatory Description
qStreamId string Yes Identifier of the stream.
qName string No Name of the published app.
If this parameter is not set, the engine automatically gives a new name to the published app.

No return values.

Redo

Redoes the previous operation.

The operation is successful if qSuccess is set to true.

No parameters.

Returns:

Name Type Description
qSuccess boolean <true or false>

RemoveAlternateState

Removes an alternate state in the app.

Parameters:

Name Type Mandatory Description
qStateName string Yes Name of the alternate state.

No return values.

RemoveVariable

Deprecated

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

Removes a variable.

Parameters:

Name Type Mandatory Description
qName string Yes Name of the variable. Variable names are case sensitive.

Returns:

Name Type Description
qReturn boolean <true/false>
The operation is successful if qReturn is set to true.

Resume

Resumes the app as the user left it.

No parameters.

No return values.

SaveObjects

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.

No parameters.

No return values.

Scramble

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:

Name Type Mandatory Description
qFieldName string Yes Name of the field to scramble.

No return values.

SearchAssociations

Deprecated

Use SearchResults method instead

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

Parameters:

Name Type Mandatory Description
qOptions SearchCombinationOptions Yes Information about the search fields and the search context.
qTerms array Yes List of terms to search for.
qPage SearchPage Yes Array of pages to retrieve.

Returns:

Name Type Description
qResults SearchAssociationResult List of the association results.

SearchObjects

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:

Name Type Mandatory Description
qOptions SearchObjectOptions Yes Information about attributes.
qTerms array Yes Terms to search for.
qPage SearchPage Yes Array of pages to retrieve.

Returns:

Name Type Description
qResult SearchResult List of search results.

SearchResults

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:

Name Type Mandatory Description
qOptions SearchCombinationOptions Yes Information about the search combinations.
qTerms array Yes Terms to search for.
qPage SearchPage Yes Array of pages to retrieve.

Returns:

Name Type Description
qResult SearchResult List of search results.

SearchSuggest

Returns search terms suggestions.

Parameters:

Name Type Mandatory Description
qOptions SearchCombinationOptions Yes Information about the search combinations.
qTerms array Yes Terms to search for.

Returns:

Name Type Description
qResult SearchSuggestionResult List of search suggestions.

SelectAssociations

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

Parameters:

Name Type Mandatory Description
qOptions SearchCombinationOptions Yes Information about the search fields and the search context.
qTerms array Yes List of terms to search for.
qMatchIx integer Yes Index (value of qId ) of the search result to select.
qSoftLock boolean No This parameter is deprecated and should not be set.

No return values.

SendGenericCommandToCustomConnector

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:

Name Type Mandatory Description
qProvider string Yes Connector file name.
Command to be executed by the connector.
qCommand string Yes One of:
JsonRequest
GetCustomCaption
IsConnected
DisableQlikViewSelectButton
* HaveStarField
qMethod string Yes Method name to be used within the command.
The available methods depend on the chosen connector.
qParameters array Yes Parameters of the command.
No parameters are required.
qAppendConnection string Yes Name of the connection.

Returns:

Name Type Description
qResult string Result of the command.

SetAppProperties

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:

Name Type Mandatory Description
qProp NxAppProperties Yes Information about the properties of an app.

No return values.

SetFavoriteVariables

Set some variables as favorite.

Parameters:

Name Type Mandatory Description
qNames array Yes Variables to set as favorite.

No return values.

SetFetchLimit

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

Parameters:

Name Type Mandatory Description
qLimit integer Yes Fetch limit.
Number of rows to load.

No return values.

SetLooselyCoupledVector

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:

Name Type Mandatory Description
qv array Yes The list of table states to set. A state will not be changed if already set to 2.

Returns:

Name Type Description
qReturn boolean <true/false>
The engine returns true if the vector has been updated.

SetScript

Sets values in script.

Parameters:

Name Type Mandatory Description
qScript string Yes Script content.

No return values.

SetScriptBreakpoints

Set some breakpoints in the script of an app.

Parameters:

Name Type Mandatory Description
qBreakpoints EditorBreakpoint Yes Information about the breakpoints.

No return values.

SetViewDlgSaveInfo

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:

Name Type Mandatory Description
qInfo TableViewDlgSaveInfo Yes Information about the table.

No return values.

Undo

Undoes the previous operation.

The operation is successful if qSuccess is set to true.

No parameters.

Returns:

Name Type Description
qSuccess boolean <true or false>

UnlockAll

Unlocks all selections in fields for current state.

Parameters:

Name Type Mandatory Description
qStateName string No Alternate state name. When set, applies to alternate state instead of current.

No return values.