Qlik Sense Engine (qix)
The JSON-RPC API over WebSocket API that enables you to interact with the Qlik Associative Engine for Qlik Sense applications.
Doc
Aborts any selection mode in an app. For more information about selection mode, see BeginSelections method.
Parameters
- qAcceptbooleanRequired
Set this parameter to true to accept the selections before exiting the selection mode.
Response
objectErrors
arrayAbortModal(qAccept)
const result = await doc.AbortModal([
true
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "AbortModal",
"params": {
"qAccept": true
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
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
- qStateNamestringRequired
Name of the alternate state.
Response
objectErrors
arrayAddAlternateState(qStateName)
const result = await doc.AddAlternateState([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "AddAlternateState",
"params": {
"qStateName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Adds a field on the fly.
Parameters
- qNamestringRequired
Name of the field.
- qExprstringRequired
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.
Response
- qSuccessboolean
Errors
arrayAddFieldFromExpression(qName, qExpr)
const result = await doc.AddFieldFromExpression([
"value",
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "AddFieldFromExpression",
"params": {
"qName": "value",
"qExpr": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
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
- qStateNamestringRequired
Name of the alternate state.
- qSourceStateNamestring
Name of existing state to copy the initial selections from
Response
objectErrors
arrayAddSessionAlternateState(qStateName, qSourceStateName?)
const result = await doc.AddSessionAlternateState([
"value",
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "AddSessionAlternateState",
"params": {
"qStateName": "value",
"qSourceStateName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Applies a bookmark and verifies result dataset against originally selected values.
Parameters
- qIdstringRequired
Identifier of the bookmark.
Response
- qResultobjectExperimental
qResult properties
- qApplySuccessboolean
Apply successfully or not *
- qWarningsarray of objectsExperimental
Field values verfication result *
qWarnings properties
- qStatestring
Alternate State *
- qFieldstring
Field Name *
- qVerifyResultstring
Can be one of: "NOT_VERIFIED""FIELD_VALUE_MATCH_ALL""FIELD_MISSING""FIELD_VALUE_MISSING""STATE_MISSING"
- qMissingValuesarray of strings
-
- qGroupStateResultobjectExperimental
Result of applying GroupState to multiple cyclic groups.
qGroupStateResult properties
- qApplySuccessboolean
When true, the operation was successful.
- qWarningsarray of objectsExperimental
Lists which states failed to be applied and why.
qWarnings properties
- qStateobjectExperimental
qState properties
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qActiveFieldDefstring
String defining the active field.
-
- qTypestring
Can be one of: "group_missing""group_not_applicable""fielddef_missing"
-
-
-
Errors
arrayApplyAndVerifyBookmark(qId)
const result = await doc.ApplyAndVerifyBookmark([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ApplyAndVerifyBookmark",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qResult": {
"qApplySuccess": true,
"qWarnings": [
{
"qState": "value",
"qField": "value",
"qVerifyResult": "NOT_VERIFIED",
"qMissingValues": [
"value"
]
}
],
"qGroupStateResult": {
"qApplySuccess": true,
"qWarnings": [
{
"qState": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qActiveFieldDef": "value"
},
"qType": "group_missing"
}
]
}
}
}
}
Applies a bookmark.
Parameters
- qIdstringRequired
Identifier of the bookmark.
Response
- qSuccessboolean
Errors
arrayApplyBookmark(qId)
const result = await doc.ApplyBookmark([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ApplyBookmark",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Parameters
- qGroupStatesarray of objectsRequiredExperimental
qGroupStates properties
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qActiveFieldDefstring
String defining the active field.
-
Response
- qResultobjectExperimental
Result of applying GroupState to multiple cyclic groups.
qResult properties
- qApplySuccessboolean
When true, the operation was successful.
- qWarningsarray of objectsExperimental
Lists which states failed to be applied and why.
qWarnings properties
- qStateobjectExperimental
qState properties
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qActiveFieldDefstring
String defining the active field.
-
- qTypestring
Can be one of: "group_missing""group_not_applicable""fielddef_missing"
-
-
Errors
arrayApplyGroupStates(qGroupStates)
const result = await doc.ApplyGroupStates([
[
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qActiveFieldDef": "value"
}
]
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ApplyGroupStates",
"params": {
"qGroupStates": [
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qActiveFieldDef": "value"
}
]
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qResult": {
"qApplySuccess": true,
"qWarnings": [
{
"qState": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qActiveFieldDef": "value"
},
"qType": "group_missing"
}
]
}
}
}
Apply temporary bookmark identified by Id.
Parameters
- qIdstringRequired
Identifier of the temporary selection state
Response
- qReturnboolean
Errors
arrayApplyTemporaryBookmark(qId)
const result = await doc.ApplyTemporaryBookmark([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ApplyTemporaryBookmark",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": true
}
}
Back()
const result = await doc.Back({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "Back"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
BackCount()
const result = await doc.BackCount({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "BackCount"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": 123
}
}
Change the owner of a session app.
Parameters
- qNewOwnerIdstringRequired
Identifier of the new app owner.
Response
- qSuccessboolean
Errors
arrayChangeSessionAppOwner(qNewOwnerId)
const result = await doc.ChangeSessionAppOwner([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ChangeSessionAppOwner",
"params": {
"qNewOwnerId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Add a session app to a space.
Parameters
- qSpaceIdstringRequired
Identifier of the new space.
Response
- qSuccessboolean
Errors
arrayChangeSessionAppSpace(qSpaceId)
const result = await doc.ChangeSessionAppSpace([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ChangeSessionAppSpace",
"params": {
"qSpaceId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Checks if a given expression is valid.
Parameters
- qExprstringRequired
Expression to check.
- qLabelsarray of strings
List of labels.
Response
- qErrorMsgstring
- qBadFieldNamesarray of objects
qBadFieldNames properties
- qFrominteger
Position in the expression of the first character of the field name.
- qCountinteger
Number of characters in the field name.
-
- qDangerousFieldNamesarray of objects
qDangerousFieldNames properties
- qFrominteger
Position in the expression of the first character of the field name.
- qCountinteger
Number of characters in the field name.
-
Errors
arrayCheckExpression(qExpr, qLabels?)
const result = await doc.CheckExpression([
"value",
[
"value"
]
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CheckExpression",
"params": {
"qExpr": "value",
"qLabels": [
"value"
]
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qErrorMsg": "value",
"qBadFieldNames": [
{
"qFrom": 123,
"qCount": 123
}
],
"qDangerousFieldNames": [
{
"qFrom": 123,
"qCount": 123
}
]
}
}
Checks if:
- A given expression is valid.
- A number is correct according to the locale.
Parameters
- qExprstringRequired
Expression to check.
Response
- qErrorMsgstring
- qBadFieldNamesarray of objects
qBadFieldNames properties
- qFrominteger
Position in the expression of the first character of the field name.
- qCountinteger
Number of characters in the field name.
-
Errors
arrayCheckNumberOrExpression(qExpr)
const result = await doc.CheckNumberOrExpression([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CheckNumberOrExpression",
"params": {
"qExpr": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qErrorMsg": "value",
"qBadFieldNames": [
{
"qFrom": 123,
"qCount": 123
}
]
}
}
Checks the syntax of a script.
Example
"result": { "qErrors": [ { "qErrLen": 3, "qTabIx": 0, "qLineInTab": 0, "qColInLine": 0, "qTextPos": 0 }, { "qErrLen": 5, "qTabIx": 0, "qLineInTab": 0, "qColInLine": 1, "qTextPos": 4, "qSecondaryFailure": true } ] }
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 |
Response
- qErrorsarray of objects
qErrors properties
- qErrLeninteger
Length of the word where the error is located.
- qTabIxinteger
Number of the faulty section.
- qLineInTabinteger
Line number in the section where the error is located.
- qColInLineinteger
Position of the erroneous text from the beginning of the line.
- qTextPosinteger
Position of the erroneous text from the beginning of the script.
- qSecondaryFailureboolean
The default value is false.
-
Errors
arrayCheckScriptSyntax()
const result = await doc.CheckScriptSyntax({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CheckScriptSyntax"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qErrors": [
{
"qErrLen": 123,
"qTabIx": 123,
"qLineInTab": 123,
"qColInLine": 123,
"qTextPos": 123,
"qSecondaryFailure": true
}
]
}
}
Clear selections in fields for current state. Locked fields are not cleared by default.
Parameters
- qLockedAlsoboolean
When true, clears the selection for locked fields.
- qStateNamestring
Alternate state name. When set, applies to alternate state instead of current
Response
objectErrors
arrayClearAll(qLockedAlso?, qStateName?)
const result = await doc.ClearAll([
true,
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ClearAll",
"params": {
"qLockedAlso": true,
"qStateName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Clear the soft properties of all generic objects in the app
Response
objectErrors
arrayClearAllSoftPatches()
const result = await doc.ClearAllSoftPatches({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ClearAllSoftPatches"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
ClearUndoBuffer()
const result = await doc.ClearUndoBuffer({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ClearUndoBuffer"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Clones a bookmark.
Parameters
- qIdstringRequired
Identifier of the object to clone.
Response
- qCloneIdstring
Errors
arrayCloneBookmark(qId)
const result = await doc.CloneBookmark([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CloneBookmark",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qCloneId": "value"
}
}
Clones a dimension.
Parameters
- qIdstringRequired
Identifier of the object to clone.
Response
- qCloneIdstring
Errors
arrayCloneDimension(qId)
const result = await doc.CloneDimension([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CloneDimension",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qCloneId": "value"
}
}
Clones a measure.
Parameters
- qIdstringRequired
Identifier of the object to clone.
Response
- qCloneIdstring
Errors
arrayCloneMeasure(qId)
const result = await doc.CloneMeasure([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CloneMeasure",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qCloneId": "value"
}
}
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.
Parameters
- qIdstringRequired
Identifier of the object to clone. The identifier must be a root object.
Response
- qCloneIdstring
Errors
arrayCloneObject(qId)
const result = await doc.CloneObject([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CloneObject",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qCloneId": "value"
}
}
Commits the draft of an object that was previously created by invoking the CreateDraft method. Committing a draft replaces the corresponding published object.
Parameters
- qIdstringRequired
Identifier of the draft to commit.
Response
objectErrors
arrayCommitDraft(qId)
const result = await doc.CommitDraft([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CommitDraft",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Commits the current script version so that any future changes will be part of a new version.
Parameters
- qCommitMessagestring
Name of the version.
Only applicable to QCS.
Response
objectErrors
arrayCommitScript(qCommitMessage?)
const result = await doc.CommitScript([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CommitScript",
"params": {
"qCommitMessage": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Creates a bookmark.
Parameters
- qPropobjectRequired
Properties for the object.
qProp properties
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qMetaDefobject
Used to collect meta data.
Properties
Semantic type with an empty structure.
- qIncludeVariablesbooleanExperimental
If true all variables will be stored in the bookmark.
- qDistinctValuesbooleanExperimental
If true all selected values will be stored distinct, i.e. searchstrings will not be kept.
-
Response
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayCreateBookmark(qProp)
const result = await doc.CreateBookmark([
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMetaDef": {},
"qIncludeVariables": true,
"qDistinctValues": true
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateBookmark",
"params": {
"qProp": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMetaDef": {},
"qIncludeVariables": true,
"qDistinctValues": true
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Creates a bookmark with softpatches.
Parameters
- qPropobjectRequired
Properties for the object.
qProp properties
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qMetaDefobject
Used to collect meta data.
Properties
Semantic type with an empty structure.
- qIncludeVariablesbooleanExperimental
If true all variables will be stored in the bookmark.
- qDistinctValuesbooleanExperimental
If true all selected values will be stored distinct, i.e. searchstrings will not be kept.
-
- qObjectIdsToPatcharray of strings
Add softpatches for this objects if available. If empty all softpatches are added to the bookmark.
Response
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayCreateBookmarkEx(qProp, qObjectIdsToPatch?)
const result = await doc.CreateBookmarkEx([
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMetaDef": {},
"qIncludeVariables": true,
"qDistinctValues": true
},
[
"value"
]
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateBookmarkEx",
"params": {
"qProp": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMetaDef": {},
"qIncludeVariables": true,
"qDistinctValues": true
},
"qObjectIdsToPatch": [
"value"
]
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Creates a connection. A connection indicates from which data source the data should be taken.
Parameters
- qConnectionobjectRequired
Information about the connection.
qConnection properties
- qIdstring
Identifier of the connection. Is generated by the engine and is unique.
- qNamestring
Name of the connection. This parameter is mandatory and must be set when creating or modifying a connection.
- qConnectionStringstring
One of:
- ODBC CONNECT TO [<provider name>]
- OLEDB CONNECT TO [<provider name>]
- CUSTOM CONNECT TO [<provider name>]
- "<local absolute or relative path, UNC path>"
- "<URL>"
Connection string. This parameter is mandatory and must be set when creating or modifying a connection.
- qTypestring
One of:
- ODBC
- OLEDB
- <Name of the custom connection file>
- folder
- internet
Type of the connection. This parameter is mandatory and must be set when creating or modifying a connection. For ODBC, OLEDB and custom connections, the engine checks that the connection type matches the connection string. The type is not case sensitive.
- qUserNamestring
Name of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the user name.
- qPasswordstring
Password of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the password.
- qModifiedDatestring
Is generated by the engine. Creation date of the connection or last modification date of the connection.
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qLogOnstring
Can be one of: "LOG_ON_SERVICE_USER""LOG_ON_CURRENT_USER"
-
Response
- qConnectionIdstring
Errors
arrayCreateConnection(qConnection)
const result = await doc.CreateConnection([
{
"qId": "value",
"qName": "value",
"qConnectionString": "value",
"qType": "value",
"qUserName": "value",
"qPassword": "value",
"qModifiedDate": "value",
"qMeta": {
"qName": "value"
},
"qLogOn": "LOG_ON_SERVICE_USER"
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateConnection",
"params": {
"qConnection": {
"qId": "value",
"qName": "value",
"qConnectionString": "value",
"qType": "value",
"qUserName": "value",
"qPassword": "value",
"qModifiedDate": "value",
"qMeta": {
"qName": "value"
},
"qLogOn": "LOG_ON_SERVICE_USER"
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qConnectionId": "value"
}
}
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
- qPropobjectRequired
Information about the properties.
qProp properties
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qDimobject
qDim properties
- qGroupingstring
Can be one of: "N""H""C"
- qFieldDefsarray of strings
Array of dimension names.
- qFieldLabelsarray of strings
Array of dimension labels.
- qLabelExpressionstring
- qAliasstring
Alias of the dimension.
-
- qMetaDefobject
Used to collect meta data.
Properties
Semantic type with an empty structure.
-
Response
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayCreateDimension(qProp)
const result = await doc.CreateDimension([
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qDim": {
"qGrouping": "N",
"qFieldDefs": [
"value"
],
"qFieldLabels": [
"value"
],
"qLabelExpression": "value",
"qAlias": "value"
},
"qMetaDef": {}
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateDimension",
"params": {
"qProp": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qDim": {
"qGrouping": "N",
"qFieldDefs": [
"value"
],
"qFieldLabels": [
"value"
],
"qLabelExpression": "value",
"qAlias": "value"
},
"qMetaDef": {}
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
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.
Parameters
- qIdstringRequired
Identifier of the object to create a draft from.
Response
- qDraftIdstring
Errors
arrayCreateDraft(qId)
const result = await doc.CreateDraft([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateDraft",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qDraftId": "value"
}
}
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
- qPropobjectRequired
Information about the properties.
qProp properties
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qMeasureobject
qMeasure properties
- qLabelstring
Label of the measure.
- qDefstring
Definition of the measure.
- qGroupingstring
Can be one of: "N""H""C"
- qExpressionsarray of strings
Array of expressions.
- qActiveExpressioninteger
Index to the active expression in a measure.
- qLabelExpressionstring
Optional expression used for dynamic label.
- qNumFormatobject
Sets the formatting of a field. The properties of qFieldAttributes and the formatting mechanism are described below.
Formatting mechanism
The formatting mechanism depends on the type set in qType, as shown below:
In case of inconsistencies between the type and the format pattern, the format pattern takes precedence over the type.Type is DATE, TIME, TIMESTAMP or INTERVAL
The following applies:
- If a format pattern is defined in qFmt , the formatting is as defined in qFmt .
- If qFmt is empty, the formatting is defined by the number interpretation variables included at the top of the script ( TimeFormat , DateFormat , TimeStampFormat ).
- The properties qDec , qThou , qnDec , qUseThou are not used.
Type is INTEGER
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the formatting mechanism uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
- If no format pattern is defined in qFmt , no formatting is applied. The properties qDec , qThou , qnDec , qUseThou and the number interpretation variables defined in the script are not used .
Type is REAL
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
- If no format pattern is defined in qFmt , and if the value is almost an integer value (for example, 14,000012), the value is formatted as an integer. The properties qDec , qThou , qnDec , qUseThou are not used.
- If no format pattern is defined in qFmt , and if qnDec is defined and not 0, the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
- If no format pattern is defined in qFmt , and if qnDec is 0, the number of decimals is 14 and the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
Type is FIX
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
- If no format pattern is defined in qFmt , the properties qDec and qnDec are used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
Type is MONEY
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of any script ( MoneyDecimalSep and MoneyThousandSep ).
- If no format pattern is defined in qFmt , the engine uses the number interpretation variables included at the top of the script ( MoneyDecimalSep and MoneyThousandSep ).
Type is ASCII
No formatting, qFmt is ignored.
qNumFormat properties
- qTypestring
Can be one of: "U""A""I""R""F""M""D""T""TS""IV"
- qnDecinteger
Number of decimals. Default is 10.
- qUseThouinteger
Defines whether or not a thousands separator must be used. Default is 0.
- qFmtstring
Defines the format pattern that applies to qText . Is used in connection to the type of the field (parameter qType ). For more information, see Formatting mechanism. Example: YYYY-MM-DD for a date.
- qDecstring
Defines the decimal separator. Example: .
- qThoustring
Defines the thousand separator (if any). Is used if qUseThou is set to 1. Example: ,
-
- qMetaDefobject
Used to collect meta data.
Properties
Semantic type with an empty structure.
-
Response
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayCreateMeasure(qProp)
const result = await doc.CreateMeasure([
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMeasure": {
"qLabel": "value",
"qDef": "value",
"qGrouping": "N",
"qExpressions": [
"value"
],
"qActiveExpression": 123,
"qLabelExpression": "value",
"qNumFormat": {
"qType": "U",
"qnDec": 10,
"qUseThou": 123,
"qFmt": "value",
"qDec": "value",
"qThou": "value"
}
},
"qMetaDef": {}
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateMeasure",
"params": {
"qProp": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMeasure": {
"qLabel": "value",
"qDef": "value",
"qGrouping": "N",
"qExpressions": [
"value"
],
"qActiveExpression": 123,
"qLabelExpression": "value",
"qNumFormat": {
"qType": "U",
"qnDec": 10,
"qUseThou": 123,
"qFmt": "value",
"qDec": "value",
"qThou": "value"
}
},
"qMetaDef": {}
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
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.
Parameters
- qPropobjectRequired
Information about the object.
qProp properties
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qExtendsIdstring
Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.
- qMetaDefobject
Used to collect meta data.
Properties
Semantic type with an empty structure.
- qStateNamestring
Name of the alternate state. Default is current selections $ .
-
Response
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayCreateObject(qProp)
const result = await doc.CreateObject([
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qExtendsId": "value",
"qMetaDef": {},
"qStateName": "value"
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateObject",
"params": {
"qProp": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qExtendsId": "value",
"qMetaDef": {},
"qStateName": "value"
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
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.
Parameters
- qPropobjectRequired
Information about the object.
qProp properties
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qExtendsIdstring
Should be set to create an object that is linked to another object. Enter the identifier of the linking object (i.e the object you want to link to). If you do not want to link your object, set this parameter to an empty string.
- qMetaDefobject
Used to collect meta data.
Properties
Semantic type with an empty structure.
- qStateNamestring
Name of the alternate state. Default is current selections $ .
-
Response
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayCreateSessionObject(qProp)
const result = await doc.CreateSessionObject([
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qExtendsId": "value",
"qMetaDef": {},
"qStateName": "value"
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateSessionObject",
"params": {
"qProp": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qExtendsId": "value",
"qMetaDef": {},
"qStateName": "value"
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Creates a transient variable.
Definition
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.
Example
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
- qPropobjectRequired
Name of the variable. Variable names are case sensitive.
qProp properties
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qMetaDefobject
Used to collect meta data.
Properties
Semantic type with an empty structure.
- qNamestring
Name of the variable. The name must be unique. This parameter is mandatory.
- qCommentstring
Comment related to the variable. This parameter is optional.
- qNumberPresentationobject
Sets the formatting of a field. The properties of qFieldAttributes and the formatting mechanism are described below.
Formatting mechanism
The formatting mechanism depends on the type set in qType, as shown below:
In case of inconsistencies between the type and the format pattern, the format pattern takes precedence over the type.Type is DATE, TIME, TIMESTAMP or INTERVAL
The following applies:
- If a format pattern is defined in qFmt , the formatting is as defined in qFmt .
- If qFmt is empty, the formatting is defined by the number interpretation variables included at the top of the script ( TimeFormat , DateFormat , TimeStampFormat ).
- The properties qDec , qThou , qnDec , qUseThou are not used.
Type is INTEGER
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the formatting mechanism uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
- If no format pattern is defined in qFmt , no formatting is applied. The properties qDec , qThou , qnDec , qUseThou and the number interpretation variables defined in the script are not used .
Type is REAL
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
- If no format pattern is defined in qFmt , and if the value is almost an integer value (for example, 14,000012), the value is formatted as an integer. The properties qDec , qThou , qnDec , qUseThou are not used.
- If no format pattern is defined in qFmt , and if qnDec is defined and not 0, the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
- If no format pattern is defined in qFmt , and if qnDec is 0, the number of decimals is 14 and the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
Type is FIX
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
- If no format pattern is defined in qFmt , the properties qDec and qnDec are used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
Type is MONEY
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of any script ( MoneyDecimalSep and MoneyThousandSep ).
- If no format pattern is defined in qFmt , the engine uses the number interpretation variables included at the top of the script ( MoneyDecimalSep and MoneyThousandSep ).
Type is ASCII
No formatting, qFmt is ignored.
qNumberPresentation properties
- qTypestring
Can be one of: "U""A""I""R""F""M""D""T""TS""IV"
- qnDecinteger
Number of decimals. Default is 10.
- qUseThouinteger
Defines whether or not a thousands separator must be used. Default is 0.
- qFmtstring
Defines the format pattern that applies to qText . Is used in connection to the type of the field (parameter qType ). For more information, see Formatting mechanism. Example: YYYY-MM-DD for a date.
- qDecstring
Defines the decimal separator. Example: .
- qThoustring
Defines the thousand separator (if any). Is used if qUseThou is set to 1. Example: ,
- qIncludeInBookmarkboolean
Set this property to true to update the variable when applying a bookmark. The variable value will be persisted in the bookmark. The value of a variable can affect the state of the selections. Script variables cannot be persisted in the bookmark. The default value is false.
- qDefinitionstring
Definition of the variable.
-
Response
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayCreateSessionVariable(qProp)
const result = await doc.CreateSessionVariable([
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMetaDef": {},
"qName": "value",
"qComment": "value",
"qNumberPresentation": {
"qType": "U",
"qnDec": 10,
"qUseThou": 123,
"qFmt": "value",
"qDec": "value",
"qThou": "value"
},
"qIncludeInBookmark": true,
"qDefinition": "value"
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateSessionVariable",
"params": {
"qProp": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMetaDef": {},
"qName": "value",
"qComment": "value",
"qNumberPresentation": {
"qType": "U",
"qnDec": 10,
"qUseThou": 123,
"qFmt": "value",
"qDec": "value",
"qThou": "value"
},
"qIncludeInBookmark": true,
"qDefinition": "value"
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Create temporary bookmark
Parameters
- qOptionsobjectRequired
Options for the temporary bookmark
qOptions properties
- qIncludeVariablesboolean
IncludeVariables If true all variables will be stored in the temporary bookmark
- qIncludeAllPatchesboolean
IncludeAllPatches If true all patches will be stored in the temporary bookmark, if false ObjectIdsToPatch will determine what patches to include
-
- qObjectIdsToPatcharray of strings
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.
Response
- qIdstring
- qReturnboolean
Errors
arrayCreateTemporaryBookmark(qOptions, qObjectIdsToPatch?)
const result = await doc.CreateTemporaryBookmark([
{
"qIncludeVariables": true,
"qIncludeAllPatches": true
},
[
"value"
]
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateTemporaryBookmark",
"params": {
"qOptions": {
"qIncludeVariables": true,
"qIncludeAllPatches": true
},
"qObjectIdsToPatch": [
"value"
]
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qId": "value",
"qReturn": true
}
}
Creates a variable.
Parameters
- qNamestringRequired
Name of the variable. Variable names are case sensitive.
Response
- qReturnboolean
Errors
arrayCreateVariable(qName)
const result = await doc.CreateVariable([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateVariable",
"params": {
"qName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": true
}
}
Creates a variable. To create a variable via a script, you need to use the SetScript method. For more information, see Create a variable.
Definition
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.
Example
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
- qPropobjectRequired
Name of the variable. Variable names are case sensitive and must be unique.
qProp properties
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qMetaDefobject
Used to collect meta data.
Properties
Semantic type with an empty structure.
- qNamestring
Name of the variable. The name must be unique. This parameter is mandatory.
- qCommentstring
Comment related to the variable. This parameter is optional.
- qNumberPresentationobject
Sets the formatting of a field. The properties of qFieldAttributes and the formatting mechanism are described below.
Formatting mechanism
The formatting mechanism depends on the type set in qType, as shown below:
In case of inconsistencies between the type and the format pattern, the format pattern takes precedence over the type.Type is DATE, TIME, TIMESTAMP or INTERVAL
The following applies:
- If a format pattern is defined in qFmt , the formatting is as defined in qFmt .
- If qFmt is empty, the formatting is defined by the number interpretation variables included at the top of the script ( TimeFormat , DateFormat , TimeStampFormat ).
- The properties qDec , qThou , qnDec , qUseThou are not used.
Type is INTEGER
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the formatting mechanism uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
- If no format pattern is defined in qFmt , no formatting is applied. The properties qDec , qThou , qnDec , qUseThou and the number interpretation variables defined in the script are not used .
Type is REAL
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
- If no format pattern is defined in qFmt , and if the value is almost an integer value (for example, 14,000012), the value is formatted as an integer. The properties qDec , qThou , qnDec , qUseThou are not used.
- If no format pattern is defined in qFmt , and if qnDec is defined and not 0, the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
- If no format pattern is defined in qFmt , and if qnDec is 0, the number of decimals is 14 and the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
Type is FIX
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
- If no format pattern is defined in qFmt , the properties qDec and qnDec are used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
Type is MONEY
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of any script ( MoneyDecimalSep and MoneyThousandSep ).
- If no format pattern is defined in qFmt , the engine uses the number interpretation variables included at the top of the script ( MoneyDecimalSep and MoneyThousandSep ).
Type is ASCII
No formatting, qFmt is ignored.
qNumberPresentation properties
- qTypestring
Can be one of: "U""A""I""R""F""M""D""T""TS""IV"
- qnDecinteger
Number of decimals. Default is 10.
- qUseThouinteger
Defines whether or not a thousands separator must be used. Default is 0.
- qFmtstring
Defines the format pattern that applies to qText . Is used in connection to the type of the field (parameter qType ). For more information, see Formatting mechanism. Example: YYYY-MM-DD for a date.
- qDecstring
Defines the decimal separator. Example: .
- qThoustring
Defines the thousand separator (if any). Is used if qUseThou is set to 1. Example: ,
- qIncludeInBookmarkboolean
Set this property to true to update the variable when applying a bookmark. The variable value will be persisted in the bookmark. The value of a variable can affect the state of the selections. Script variables cannot be persisted in the bookmark. The default value is false.
- qDefinitionstring
Definition of the variable.
-
Response
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayCreateVariableEx(qProp)
const result = await doc.CreateVariableEx([
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMetaDef": {},
"qName": "value",
"qComment": "value",
"qNumberPresentation": {
"qType": "U",
"qnDec": 10,
"qUseThou": 123,
"qFmt": "value",
"qDec": "value",
"qThou": "value"
},
"qIncludeInBookmark": true,
"qDefinition": "value"
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "CreateVariableEx",
"params": {
"qProp": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMetaDef": {},
"qName": "value",
"qComment": "value",
"qNumberPresentation": {
"qType": "U",
"qnDec": 10,
"qUseThou": 123,
"qFmt": "value",
"qDec": "value",
"qThou": "value"
},
"qIncludeInBookmark": true,
"qDefinition": "value"
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Deletes a connection.
Parameters
- qConnectionIdstringRequired
Identifier of the connection to remove.
Response
objectErrors
arrayDeleteConnection(qConnectionId)
const result = await doc.DeleteConnection([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DeleteConnection",
"params": {
"qConnectionId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Removes a bookmark.
Parameters
- qIdstringRequired
Identifier of the bookmark.
Response
- qSuccessboolean
Errors
arrayDestroyBookmark(qId)
const result = await doc.DestroyBookmark([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DestroyBookmark",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Removes a dimension.
Parameters
- qIdstringRequired
Identifier of the dimension to remove.
Response
- qSuccessboolean
Errors
arrayDestroyDimension(qId)
const result = await doc.DestroyDimension([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DestroyDimension",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
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.
Parameters
- qIdstringRequired
Identifier of the draft object to remove.
- qSourceIdstringRequired
Identifier of the source object (the object from which a draft was created).
Response
- qSuccessboolean
Errors
arrayDestroyDraft(qId, qSourceId)
const result = await doc.DestroyDraft([
"value",
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DestroyDraft",
"params": {
"qId": "value",
"qSourceId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Removes a generic measure.
Parameters
- qIdstringRequired
Identifier of the measure to remove.
Response
- qSuccessboolean
Errors
arrayDestroyMeasure(qId)
const result = await doc.DestroyMeasure([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DestroyMeasure",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Removes an app object. The children of the object (if any) are removed as well.
Parameters
- qIdstringRequired
Identifier of the object to remove.
Response
- qSuccessboolean
Errors
arrayDestroyObject(qId)
const result = await doc.DestroyObject([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DestroyObject",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Removes a transient object.
Parameters
- qIdstringRequired
Identifier of the transient object to remove.
Response
- qSuccessboolean
Errors
arrayDestroySessionObject(qId)
const result = await doc.DestroySessionObject([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DestroySessionObject",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Removes a transient variable.
Parameters
- qIdstringRequired
Identifier of the variable.
Response
- qSuccessboolean
Errors
arrayDestroySessionVariable(qId)
const result = await doc.DestroySessionVariable([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DestroySessionVariable",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Removes a transient variable.
Parameters
- qIdstringRequired
Identifier of the variable.
Response
- qSuccessboolean
Errors
arrayDestroySessionVariableById(qId)
const result = await doc.DestroySessionVariableById([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DestroySessionVariableById",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Removes a transient variable.
Parameters
- qNamestringRequired
Name of the variable.
Response
- qSuccessboolean
Errors
arrayDestroySessionVariableByName(qName)
const result = await doc.DestroySessionVariableByName([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DestroySessionVariableByName",
"params": {
"qName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Removes a variable. Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. For more information, see Remove a variable.
Parameters
- qIdstringRequired
Identifier of the variable.
Response
- qSuccessboolean
Errors
arrayDestroyVariableById(qId)
const result = await doc.DestroyVariableById([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DestroyVariableById",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Removes a variable. Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. For more information, see Remove a variable.
Parameters
- qNamestringRequired
Name of the variable.
Response
- qSuccessboolean
Errors
arrayDestroyVariableByName(qName)
const result = await doc.DestroyVariableByName([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DestroyVariableByName",
"params": {
"qName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Reloads the script that is set in an app.
Logs
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 |
Where to find the log files
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
- qModeinteger
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.
- qPartialboolean
Set to true for partial reload. The default value is false.
- qDebugboolean
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.
Response
- qReturnboolean
Errors
arrayDoReload(qMode?, qPartial?, qDebug?)
const result = await doc.DoReload([
123,
true,
true
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DoReload",
"params": {
"qMode": 123,
"qPartial": true,
"qDebug": true
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": true
}
}
Reloads the script that is set in an app and returns the path to the script log file.
Logs
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>AuditActivityEngine.txt in Qlik Sense Enterprise < MachineName>AuditActivityEngine.log in Qlik Sense Desktop |
< MachineName>ServiceEngine.txt in Qlik Sense Enterprise < MachineName>ServiceEngine.log in Qlik Sense Desktop |
Where to find the log files
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 |
DoReloadExParams
Name | Description | Type |
---|---|---|
qMode | Error handling mode One of:
|
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 |
DoReloadExResult
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.
Parameters
- qParamsobject
qParams properties
- qModeinteger
- : for default mode.
- : for ABEND; the reload of the script ends if an error occurs.
- : for ignore; the reload of the script continues even if an error is detected in the script.
- qPartialboolean
Set to true for partial reload. The default value is false.
- qDebugboolean
Set to true to debug reload. The default value is false.
- qReloadIdstring
Optional reload ID. ID will be automatically generated if not set.
- qSkipStoreboolean
Set to true to skip Store statements. The default value is false.
- qRowLimitinteger
If greater than or equal 0, defines max number of rows loaded from a data source.
-
Response
- qResultobject
The result and path to script log for a reload.
qResult properties
- qSuccessboolean
The reload is successful if True.
- qScriptLogFilestring
Path to the script log file.
- qEndedWithMemoryConstraintboolean
true if memory limits were exhausted during reload.
-
Errors
arrayDoReloadEx(qParams?)
const result = await doc.DoReloadEx([
{
"qMode": 123,
"qPartial": true,
"qDebug": true,
"qReloadId": "value",
"qSkipStore": true,
"qRowLimit": -1
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DoReloadEx",
"params": {
"qParams": {
"qMode": 123,
"qPartial": true,
"qDebug": true,
"qReloadId": "value",
"qSkipStore": true,
"qRowLimit": -1
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qResult": {
"qSuccess": true,
"qScriptLogFile": "value",
"qEndedWithMemoryConstraint": true
}
}
}
Saves an app. All objects and data in the data model are saved.
Parameters
- qFileNamestring
Name of the file to save.
Response
objectErrors
arrayDoSave(qFileName?)
const result = await doc.DoSave([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "DoSave",
"params": {
"qFileName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Evaluates an expression and returns the result as a string.
Example
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
- qExpressionstringRequired
Expression to evaluate.
Response
- qReturnstring
Errors
arrayEvaluate(qExpression)
const result = await doc.Evaluate([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "Evaluate",
"params": {
"qExpression": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": "value"
}
}
Evaluates an expression and returns the result as a dual.
Example
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
- qExpressionstringRequired
Expression to evaluate.
Response
- qValueobject
qValue properties
- qTextstring
Text related to the field value. This parameter is optional.
- qIsNumericboolean
Is set to true if the value is a numeric. This parameter is optional. Default is false.
- qNumbernumber
Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. This parameter is optional.
-
Errors
arrayEvaluateEx(qExpression)
const result = await doc.EvaluateEx([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "EvaluateEx",
"params": {
"qExpression": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qValue": {
"qText": "value",
"qIsNumeric": true,
"qNumber": 123
}
}
}
Expands the expression.
Parameters
- qExpressionstringRequired
The expression string to expand.
Response
- qExpandedExpressionstring
Errors
arrayExpandExpression(qExpression)
const result = await doc.ExpandExpression([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ExpandExpression",
"params": {
"qExpression": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qExpandedExpression": "value"
}
}
Applies a bookmark to reduce (slice) the data on. Returns a url and file size to the reduced application. Section Access is always applied.
Parameters
- qOptionsobject
BookmarkId used to reduced the app on and an expire time.
qOptions properties
- qBookmarkIdstring
Bookmark Id to apply before reducing the application.
- qExpiresinteger
Time in seconds for how long the download link is valid.
- qServeOnceboolean
-
Response
- qDownloadInfoobject
qDownloadInfo properties
- qUrlstring
URL to download the reduced app on.
- qFileSizeinteger
The filesize of the reduced app.
-
Errors
arrayExportReducedData(qOptions?)
const result = await doc.ExportReducedData([
{
"qBookmarkId": "value",
"qExpires": 3600,
"qServeOnce": true
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ExportReducedData",
"params": {
"qOptions": {
"qBookmarkId": "value",
"qExpires": 3600,
"qServeOnce": true
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qDownloadInfo": {
"qUrl": "value",
"qFileSize": -1
}
}
}
Retrieves any fields that belong to the same archipelago as the specified field and that match at least one of the specified tags.
Parameters
- qFieldNamestringRequired
Name of the field. This method looks for fields that belong to the same archipelago as this specified field.
- qTagsarray of stringsRequired
List of tags. This method looks for fields that match at least one of the tags in this list.
Response
- qFieldNamesarray of objects
qFieldNames properties
- qNamestring
Name of the field.
- qTagsarray of strings
List of tags.
-
Errors
arrayFindMatchingFields(qFieldName, qTags)
const result = await doc.FindMatchingFields([
"value",
[
"value"
]
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "FindMatchingFields",
"params": {
"qFieldName": "value",
"qTags": [
"value"
]
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qFieldNames": [
{
"qName": "value",
"qTags": [
"value"
]
}
]
}
}
Forward()
const result = await doc.Forward({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "Forward"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Returns the number of entries on the Forward stack.
Response
- qReturninteger
Errors
arrayForwardCount()
const result = await doc.ForwardCount({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ForwardCount"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": 123
}
}
Returns the identifier and the type of any generic object in the app.
Response
- qInfosarray of objects
qInfos properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
Errors
arrayGetAllInfos()
const result = await doc.GetAllInfos({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetAllInfos"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qInfos": [
{
"qId": "value",
"qType": "value"
}
]
}
}
Evaluates an app. Returns dynamic properties (if any) in addition to the engine (fixed) properties. A data set is returned.
Response
- qLayoutobject
Qlik Sense Desktop
In Qlik Sense Desktop, this structure can contain dynamic properties.
Qlik Sense Enterprise
In Qlik Sense Enterprise, only a few dynamic properties at the app level are persisted. The persisted dynamic properties are the following:
- modifiedDate
- published
- publishTime
- privileges
- description
- dynamicColor
qLayout properties
- qTitlestring
Title of the app.
- qFileNamestring
In Qlik Sense Enterprise, this property corresponds to the app identifier (GUID). In Qlik Sense Desktop, this property corresponds to the full path of the app.
- qLastReloadTimestring
Date and time of the last reload of the app in ISO format.
- qModifiedboolean
Is set to true if the app has been updated since the last save.
- qHasScriptboolean
Is set to true if a script is defined in the app.
- qStateNamesarray of strings
Array of alternate states.
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qLocaleInfoobject
qLocaleInfo properties
- qDecimalSepstring
Decimal separator.
- qThousandSepstring
Thousand separator.
- qListSepstring
List separator.
- qMoneyDecimalSepstring
Money decimal separator.
- qMoneyThousandSepstring
Money thousand separator.
- qCurrentYearinteger
Current year.
- qMoneyFmtstring
Money format. Example: #.##0,00 kr;-#.##0,00 kr
- qTimeFmtstring
Time format. Example: hh:mm:ss
- qDateFmtstring
Date format. Example: YYYY-MM-DD
- qTimestampFmtstring
Time stamp format. Example: YYYY-MM-DD hh:mm:ss[.fff]
- qCalendarStringsobject
qCalendarStrings properties
- qDayNamesarray of strings
List of short day names.
- qMonthNamesarray of strings
List of short month names.
- qLongDayNamesarray of strings
List of long day names.
- qLongMonthNamesarray of strings
List of long month names.
-
- qFirstWeekDayinteger
First day of the week, starting from 0. According to ISO 8601, Monday is the first day of the week.
- 0 = Monday
- 1 = Tuesday
- ...
- 6 = Sunday
If this property has not been set in a script, the returned value comes from the Windows operating system.
- qBrokenWeeksboolean
Is set to true if broken weeks are allowed in a year. According to ISO 8601, no broken weeks should be allowed. This property is not shown if set to false. If qBrokenWeeks is set to true, qReferenceDay is irrelevant. If this property has not been set in a script, the returned value comes from the Windows operating system.
- qReferenceDayinteger
Day in the year that is always in week 1. According to ISO 8601, January 4th should always be part of the first week of the year ( qReferenceDay =4). Recommended values are in the range 1 and 7. If this property has not been set in a script, the returned value comes from the Windows operating system. This property is not relevant if there are broken weeks in the year.
- qFirstMonthOfYearinteger
First month of the year, starting from 1. According to ISO 8601, January is the first month of the year.
- 1 = January
- 2 = February
- 12 = January
If this property has not been set in a script, the returned value comes from the Windows operating system.
- qCollationstring
Locale name (following language tagging convention RFC 4646): < language>-<REGION> Where:
- language is a lowercase ISO 639 language code
- REGION specifies an uppercase ISO 3166 country code.
If this property has not been set in a script, the returned value comes from the Windows operating system.
- qNumericalAbbreviationstring
Number format. Example: 3:k;6:M;9:G;12:T;15:P;18:E;21:Z;24:Y;-3:m;-6:μ;-9:n;-12:p;-15:f;-18:a;-21:z;-24:y
-
- qHasDataboolean
Is set to true if the app contains data following a script reload.
- qReadOnlyboolean
If set to true, it means that the app is read-only.
- qIsOpenedWithoutDataboolean
If set to true, it means that the app was opened without loading its data.
- qIsSessionAppboolean
If set to true, the app is a Session App, i.e. not persistent.
- qProhibitBinaryLoadboolean
If set to true, the persisted app cannot be used in a Binary load statement in Qlik load script.
- qThumbnailobjectIn addition, this structure can return dynamic properties.
qThumbnail properties
- qUrlstring
Relative path of the thumbnail.
-
- qIsBDILiveModeboolean
If set to true, the app is in BDI Direct Query Mode.
- qIsDirectQueryModeboolean
If set to true, the app is in Direct Query Mode.
- qUnsupportedFeaturesarray of strings
Array of features not supported by the app.
Values may be any of: "binningData""bookmarks""calculatedFields""continuousData""invertedSelections""rangeSelections""reducingData""search""selectionCount""selectionInsights""tableMiniChart""trendlines""calculatedDimensions""includeZeroValues""includeNullValues""filterPanePaging""filterPaneCustomSorting""showFrequency""limitation""totals"
- qUsagestring
Can be one of: "ANALYTICS""DATA_PREPARATION""DATAFLOW_PREP""SINGLE_TABLE_PREP"
Errors
arrayGetAppLayout()
const result = await doc.GetAppLayout({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetAppLayout"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qLayout": {
"qTitle": "value",
"qFileName": "value",
"qLastReloadTime": "value",
"qModified": true,
"qHasScript": true,
"qStateNames": [
"value"
],
"qMeta": {
"qName": "value"
},
"qLocaleInfo": {
"qDecimalSep": "value",
"qThousandSep": "value",
"qListSep": "value",
"qMoneyDecimalSep": "value",
"qMoneyThousandSep": "value",
"qCurrentYear": 123,
"qMoneyFmt": "value",
"qTimeFmt": "value",
"qDateFmt": "value",
"qTimestampFmt": "value",
"qCalendarStrings": {
"qDayNames": [
"value"
],
"qMonthNames": [
"value"
],
"qLongDayNames": [
"value"
],
"qLongMonthNames": [
"value"
]
},
"qFirstWeekDay": 123,
"qBrokenWeeks": true,
"qReferenceDay": 123,
"qFirstMonthOfYear": 123,
"qCollation": "value",
"qNumericalAbbreviation": "value"
},
"qHasData": true,
"qReadOnly": true,
"qIsOpenedWithoutData": true,
"qIsSessionApp": true,
"qProhibitBinaryLoad": true,
"qThumbnail": {
"qUrl": "value"
},
"qIsBDILiveMode": true,
"qIsDirectQueryMode": true,
"qUnsupportedFeatures": [
"binningData"
],
"qUsage": "ANALYTICS"
}
}
}
Gets the properties of an app.
Response
- qPropobject
Qlik Sense Desktop
In Qlik Sense Desktop, this structure can contain dynamic properties.
Qlik Sense Enterprise
In Qlik Sense Enterprise, only a few dynamic properties at the app level are persisted. The persisted dynamic properties are the following:
- modifiedDate
- published
- publishTime
- privileges
- description
- dynamicColor
qProp properties
- qTitlestring
App title.
- qLastReloadTimestring
Last reload time of the app.
- qMigrationHashstring
Internal property reserved for app migration. Patch version of the app. Do not update.
- qSavedInProductVersionstring
Internal property reserved for app migration. The app is saved in this version of the product. Do not update.
- qThumbnailobjectIn addition, this structure can contain dynamic properties.
qThumbnail properties
- qUrlstring
Relative path of the thumbnail.
-
- qHasSectionAccessboolean
If true the app has section access configured.
- qUsagestring
Can be one of: "ANALYTICS""DATA_PREPARATION""DATAFLOW_PREP""SINGLE_TABLE_PREP"
Errors
arrayGetAppProperties()
const result = await doc.GetAppProperties({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetAppProperties"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qProp": {
"qTitle": "value",
"qLastReloadTime": "value",
"qMigrationHash": "value",
"qSavedInProductVersion": "value",
"qThumbnail": {
"qUrl": "value"
},
"qHasSectionAccess": true,
"qUsage": "ANALYTICS"
}
}
}
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
- qTable1stringRequired
Name of the first table.
- qTable2stringRequired
Name of the second table.
Response
- qScorearray of objects
qScore properties
- qFieldPairNamestring
Pair of fields. < FieldName1> / < FieldName2> Where: < FieldName1 > is a field in the table 1 (defined in qTable1 ) < FieldName2 > is a field in the table 2 (defined in qTable2 ) If the field is a synthetic key, the name of the field is preceded by [Synthetic key]: .
- qScoreSummaryinteger
Flag used to interpret calculated scores. One of the following values or sum of values that apply:
- 0: The cardinal ratio cannot be zero but the symbol score and the row score can be zero.
- -1: The fields do not have the same type.
- -2: The number of rows of the field FieldName1 is zero.
- -4: The number of distinct values of the field FieldName1 is zero.
- -8: The number of rows of the field FieldName2 is zero.
- -16: The number of distinct values of the field FieldName2 is zero.
Example: The number of rows of the field FieldName1 is zero, and the number of distinct values of the field FieldName2 is zero, then qScoreSummary is -18.
- qField1Scoresobject
qField1Scores properties
- qFieldNamestring
Field name. One of the field names defined in qFieldPairName.
- qReadableNamestring
- qCardinalRationumber
Cardinality of a column/field divided by the number of rows in the table. If the cardinal ratio is 1, it means that the column is a candidate/primary key.
- qSymbolScorenumber
Number of distinct matches between the two fields defined in qFieldPairName divided by the number of distinct values in the field qFieldName . If 0, it means that there are no common values between the two fields defined in qFieldPairName .
- qRowScorenumber
Number of matches between the two fields defined in qFieldPairName divided by the number of values in the field qFieldName . If 0, it means that there are no common values between the two fields defined in qFieldPairName .
-
- qField2Scoresobject
qField2Scores properties
- qFieldNamestring
Field name. One of the field names defined in qFieldPairName.
- qReadableNamestring
- qCardinalRationumber
Cardinality of a column/field divided by the number of rows in the table. If the cardinal ratio is 1, it means that the column is a candidate/primary key.
- qSymbolScorenumber
Number of distinct matches between the two fields defined in qFieldPairName divided by the number of distinct values in the field qFieldName . If 0, it means that there are no common values between the two fields defined in qFieldPairName .
- qRowScorenumber
Number of matches between the two fields defined in qFieldPairName divided by the number of values in the field qFieldName . If 0, it means that there are no common values between the two fields defined in qFieldPairName .
-
-
Errors
arrayGetAssociationScores(qTable1, qTable2)
const result = await doc.GetAssociationScores([
"value",
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetAssociationScores",
"params": {
"qTable1": "value",
"qTable2": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qScore": [
{
"qFieldPairName": "value",
"qScoreSummary": 123,
"qField1Scores": {
"qFieldName": "value",
"qReadableName": "value",
"qCardinalRatio": 123,
"qSymbolScore": 123,
"qRowScore": 123
},
"qField2Scores": {
"qFieldName": "value",
"qReadableName": "value",
"qCardinalRatio": 123,
"qSymbolScore": 123,
"qRowScore": 123
}
}
]
}
}
Returns the handle of a bookmark.
Parameters
- qIdstringRequired
Identifier of the bookmark.
Response
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayGetBookmark(qId)
const result = await doc.GetBookmark([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetBookmark",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Returns all bookmarks compatible with options.
Parameters
- qOptionsobjectRequired
Bookmark type filter and requested properties.
qOptions properties
- qTypesarray of strings
List of object types.
- qDataobject
Contains dynamic JSON data specified by the client.
- qIncludePatchesboolean
Include the bookmark patches. Patches can be very large and may make the list result unmanageable.
-
Response
- qListarray of objects
qList properties
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qDataobject
Contains dynamic JSON data specified by the client.
-
Errors
arrayGetBookmarks(qOptions)
const result = await doc.GetBookmarks([
{
"qTypes": [
"value"
],
"qData": {},
"qIncludePatches": true
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetBookmarks",
"params": {
"qOptions": {
"qTypes": [
"value"
],
"qData": {},
"qIncludePatches": true
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qList": [
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMeta": {
"qName": "value"
},
"qData": {}
}
]
}
}
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
- qConnectionIdstringRequired
Identifier of the connection.
Response
- qConnectionobject
qConnection properties
- qIdstring
Identifier of the connection. Is generated by the engine and is unique.
- qNamestring
Name of the connection. This parameter is mandatory and must be set when creating or modifying a connection.
- qConnectionStringstring
One of:
- ODBC CONNECT TO [<provider name>]
- OLEDB CONNECT TO [<provider name>]
- CUSTOM CONNECT TO [<provider name>]
- "<local absolute or relative path, UNC path>"
- "<URL>"
Connection string. This parameter is mandatory and must be set when creating or modifying a connection.
- qTypestring
One of:
- ODBC
- OLEDB
- <Name of the custom connection file>
- folder
- internet
Type of the connection. This parameter is mandatory and must be set when creating or modifying a connection. For ODBC, OLEDB and custom connections, the engine checks that the connection type matches the connection string. The type is not case sensitive.
- qUserNamestring
Name of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the user name.
- qPasswordstring
Password of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the password.
- qModifiedDatestring
Is generated by the engine. Creation date of the connection or last modification date of the connection.
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qLogOnstring
Can be one of: "LOG_ON_SERVICE_USER""LOG_ON_CURRENT_USER"
-
Errors
arrayGetConnection(qConnectionId)
const result = await doc.GetConnection([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetConnection",
"params": {
"qConnectionId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qConnection": {
"qId": "value",
"qName": "value",
"qConnectionString": "value",
"qType": "value",
"qUserName": "value",
"qPassword": "value",
"qModifiedDate": "value",
"qMeta": {
"qName": "value"
},
"qLogOn": "LOG_ON_SERVICE_USER"
}
}
}
Lists the connections in an app.
Response
- qConnectionsarray of objects
qConnections properties
- qIdstring
Identifier of the connection. Is generated by the engine and is unique.
- qNamestring
Name of the connection. This parameter is mandatory and must be set when creating or modifying a connection.
- qConnectionStringstring
One of:
- ODBC CONNECT TO [<provider name>]
- OLEDB CONNECT TO [<provider name>]
- CUSTOM CONNECT TO [<provider name>]
- "<local absolute or relative path, UNC path>"
- "<URL>"
Connection string. This parameter is mandatory and must be set when creating or modifying a connection.
- qTypestring
One of:
- ODBC
- OLEDB
- <Name of the custom connection file>
- folder
- internet
Type of the connection. This parameter is mandatory and must be set when creating or modifying a connection. For ODBC, OLEDB and custom connections, the engine checks that the connection type matches the connection string. The type is not case sensitive.
- qUserNamestring
Name of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the user name.
- qPasswordstring
Password of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the password.
- qModifiedDatestring
Is generated by the engine. Creation date of the connection or last modification date of the connection.
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qLogOnstring
Can be one of: "LOG_ON_SERVICE_USER""LOG_ON_CURRENT_USER"
-
Errors
arrayGetConnections()
const result = await doc.GetConnections({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetConnections"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qConnections": [
{
"qId": "value",
"qName": "value",
"qConnectionString": "value",
"qType": "value",
"qUserName": "value",
"qPassword": "value",
"qModifiedDate": "value",
"qMeta": {
"qName": "value"
},
"qLogOn": "LOG_ON_SERVICE_USER"
}
]
}
}
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.
Qlik Sense
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 .
Qlik Sense Desktop
Returns the global content library and the app specific content library from the disk.
Response
- qListobject
qList properties
- qItemsarray of objects
Information about the content library.
qItems properties
- qNamestring
Name of the library.
- qAppSpecificboolean
Is set to true if the library is specific to the app (not a global content library).
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
-
-
Errors
arrayGetContentLibraries()
const result = await doc.GetContentLibraries({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetContentLibraries"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qList": {
"qItems": [
{
"qName": "value",
"qAppSpecific": true,
"qMeta": {
"qName": "value"
}
}
]
}
}
}
Gives information about an ODBC, OLEDB or CUSTOM connection. See Outputs for more details.
Parameters
- qConnectionIdstringRequired
Name of the connection.
Response
- qInfoobject
qInfo properties
- qDBMSNamestring
Name of the product accessed by the provider.
- qDBUsageboolean
If set to true, it means that the data source contains some databases.
- qOwnerUsageboolean
If set to true, it means that the data source contains some owners.
- qDBSeparatorstring
Character string used after the database name. Example with separator " . ": FROM LinkedTablesData.dbo.Months Where:
- LinkedTablesData is the database name
- dbo is the owner name
- Months is the table name
- qOwnerSeparatorstring
Character string used after the owner name. Example with separator " . ": FROM LinkedTablesData.dbo.Months Where:
- LinkedTablesData is the database name
- dbo is the owner name
- Months is the table name
- qDBFirstboolean
If set to true, it means that the database is displayed first, before the owners and tables.
- qQuotePreffixstring
Prefix used with field, database or owner names that contain special characters or keywords.
- qQuoteSuffixstring
Suffix used with field, database or owner names that contain special characters or keywords.
- qSpecialCharsstring
List of the special characters.
- qDefaultDatabasestring
Name of the default database.
- qKeywordsarray of strings
List of the script keywords.
-
Errors
arrayGetDatabaseInfo(qConnectionId)
const result = await doc.GetDatabaseInfo([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetDatabaseInfo",
"params": {
"qConnectionId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qInfo": {
"qDBMSName": "value",
"qDBUsage": true,
"qOwnerUsage": true,
"qDBSeparator": "value",
"qOwnerSeparator": "value",
"qDBFirst": true,
"qQuotePreffix": "value",
"qQuoteSuffix": "value",
"qSpecialChars": "value",
"qDefaultDatabase": "value",
"qKeywords": [
"value"
]
}
}
}
Lists the owners of a database for a ODBC, OLEDB or CUSTOM connection.
Parameters
- qConnectionIdstringRequired
Identifier of the connection.
- qDatabasestring
Name of the database.
Response
- qOwnersarray of objects
qOwners properties
- qNamestring
Name of the owner.
-
Errors
arrayGetDatabaseOwners(qConnectionId, qDatabase?)
const result = await doc.GetDatabaseOwners([
"value",
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetDatabaseOwners",
"params": {
"qConnectionId": "value",
"qDatabase": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qOwners": [
{
"qName": "value"
}
]
}
}
Lists the fields inside a table of a database for a ODBC, OLEDB or CUSTOM connection.
Parameters
- qConnectionIdstringRequired
Identifier of the connection.
- qDatabasestring
Name of the database. If qDatabase is not set then qOwner must be set.
- qOwnerstring
Owner of the database. If qOwner is not set then qDatabase must be set.
- qTablestringRequired
Name of the table.
Response
- qFieldsarray of objects
qFields properties
- qNamestring
Name of the field.
- qIsKeyboolean
Is set to true if the field is a primary key.
- qOriginalFieldNamestring
Is shown for fixed records. qOriginalFieldName and qName are identical if no field names are used in the file. qOriginalFieldName differs from qName if embedded file names are used in the file.
-
Errors
arrayGetDatabaseTableFields(qConnectionId, qDatabase?, qOwner?, qTable)
const result = await doc.GetDatabaseTableFields([
"value",
"value",
"value",
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetDatabaseTableFields",
"params": {
"qConnectionId": "value",
"qDatabase": "value",
"qOwner": "value",
"qTable": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qFields": [
{
"qName": "value",
"qIsKey": true,
"qOriginalFieldName": "value"
}
]
}
}
Retrieves the values of the specified table of a database for a ODBC, OLEDB or CUSTOM connection.
Parameters
- qConnectionIdstringRequired
Identifier of the connection.
- qDatabasestring
Name of the database. If qDatabase is not set then qOwner must be set.
- qOwnerstring
Owner of the database. If qOwner is not set then qDatabase must be set.
- qTablestringRequired
Name of the table.
- qConditionsobject
qConditions properties
- qTypestring
Can be one of: "NONE""RAW"
- qWherePredicatestring
-
Response
- qPreviewarray of objects
qPreview properties
- qValuesarray of strings
List of values inside the table. The first values (in result/qPreview/0/qValues ) correspond to the field names in the table. The following values (from result/qPreview/1/qValues ) are the values of the fields in the table.
-
- qRowCountinteger
Errors
arrayGetDatabaseTablePreview(qConnectionId, qDatabase?, qOwner?, qTable, qConditions?)
const result = await doc.GetDatabaseTablePreview([
"value",
"value",
"value",
"value",
{
"qType": "NONE",
"qWherePredicate": "value"
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetDatabaseTablePreview",
"params": {
"qConnectionId": "value",
"qDatabase": "value",
"qOwner": "value",
"qTable": "value",
"qConditions": {
"qType": "NONE",
"qWherePredicate": "value"
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qPreview": [
{
"qValues": [
"value"
]
}
],
"qRowCount": 123
}
}
Lists the tables inside a database for a ODBC, OLEDB or CUSTOM connection.
Parameters
- qConnectionIdstringRequired
Identifier of the connection.
- qDatabasestring
Name of the database. If qDatabase is not set then qOwner must be set.
- qOwnerstring
Owner of the database. If qOwner is not set then qDatabase must be set.
Response
- qTablesarray of objects
qTables properties
- qNamestring
Name of the table.
- qTypestring
Type of the table. For example: Table or View.
-
Errors
arrayGetDatabaseTables(qConnectionId, qDatabase?, qOwner?)
const result = await doc.GetDatabaseTables([
"value",
"value",
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetDatabaseTables",
"params": {
"qConnectionId": "value",
"qDatabase": "value",
"qOwner": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qTables": [
{
"qName": "value",
"qType": "value"
}
]
}
}
Lists the databases inside a ODBC, OLEDB or CUSTOM data source.
Parameters
- qConnectionIdstringRequired
Identifier of the connection.
Response
- qDatabasesarray of objects
qDatabases properties
- qNamestring
Name of the database.
- qIsDefaultboolean
Is set to true if the database is set by default.
-
Errors
arrayGetDatabases(qConnectionId)
const result = await doc.GetDatabases([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetDatabases",
"params": {
"qConnectionId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qDatabases": [
{
"qName": "value",
"qIsDefault": true
}
]
}
}
Returns the handle of a dimension.
Parameters
- qIdstringRequired
Identifier of the dimension.
Response
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayGetDimension(qId)
const result = await doc.GetDimension([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetDimension",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Creates a script that contains one section. This section contains SET statements that give localized information from the regional settings of the computer.
Parameters
- qLocalizedMainSectionstring
Name of the script section. The default value is Main .
Response
- qReturnstring
Errors
arrayGetEmptyScript(qLocalizedMainSection?)
const result = await doc.GetEmptyScript([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetEmptyScript",
"params": {
"qLocalizedMainSection": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": "value"
}
}
Gets the current Backus-Naur Form (BNF) grammar of the Qlik chart expressions supported within a given App.
Response
- qBnfDefsarray of objects
qBnfDefs properties
- qBnfarray of integers
Array of token references that all together build up the definition of the current token. Generally, if the array is not empty, the definition is a BNF rule (qIsBnfRule is set to true). However, some BNF rules do have an empty array (qIsBnfRule is set to true, but qBnf is empty).
- qNbrinteger
Number of the current token definition.
- qPNbrinteger
Number of the parent rule definition.
- qHelpIdinteger
Reference identifier to a function described in the documentation. The identifier is stored in the definition of the token containing the function name. Is not used in Qlik Sense.
- qNamestring
Token name. One of:
- A rule name
- An identifier
- A literal value
- qStrstring
Literal string of the token. Examples: 'Round' and '('.
- qIsBnfRuleboolean
If set to true, a list of related rule tokens is assigned to qBnf . This parameter is optional. The default value is false.
- qScriptStatementboolean
If set to true, the definition specifies a script statement. This parameter is optional. The default value is false.
- qControlStatementboolean
If set to true, the definition specifies a control statement. This parameter is optional. The default value is false.
- qBnfLiteralboolean
If set to true, the definition specifies a literal token. This parameter is optional. The default value is false.
- qQvFuncboolean
If set to true, the definition is related to a Qlik Sense function. It cannot be an aggregation function. This parameter is optional. The default value is false.
- qAggrFuncboolean
If set to true, the definition is related to an aggregation function. This parameter is optional. The default value is false.
- qFGstring
Can be one of: "ALL""U""NONE""AGGR""NUM""RNG""EXP""TRIG""FIN""MATH""COUNT""STR""MAPP""RCRD""CND""LOG""NULL""SYS""FILE""TBL""DATE""NUMI""FRMT""CLR""RNK""GEO""EXT""PROB""ARRAY""LEG""DB""WINDOW"
- qFieldFlagboolean
If set to true, the definition is related to a field. This parameter is optional. The default value is false.
- qMTstring
Can be one of: "N""D""R""V"
- qDeprboolean
Indicates whether a script statement, a chart or a script function is deprecated (not recommended for use). If set to true, the script statement or the function is not recommended for use in Qlik Sense. This parameter is optional. The default value is false.
- qFGListarray of strings
List of groups the function belongs to.
Values may be any of: "ALL""U""NONE""AGGR""NUM""RNG""EXP""TRIG""FIN""MATH""COUNT""STR""MAPP""RCRD""CND""LOG""NULL""SYS""FILE""TBL""DATE""NUMI""FRMT""CLR""RNK""GEO""EXT""PROB""ARRAY""LEG""DB""WINDOW"
-
- qBnfHashstring
Errors
arrayGetExpressionBNF()
const result = await doc.GetExpressionBNF({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetExpressionBNF"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qBnfDefs": [
{
"qBnf": [
123
],
"qNbr": 123,
"qPNbr": 123,
"qHelpId": 123,
"qName": "value",
"qStr": "value",
"qIsBnfRule": true,
"qScriptStatement": true,
"qControlStatement": true,
"qBnfLiteral": true,
"qQvFunc": true,
"qAggrFunc": true,
"qFG": "ALL",
"qFieldFlag": true,
"qMT": "N",
"qDepr": true,
"qFGList": [
"ALL"
]
}
],
"qBnfHash": "value"
}
}
Gets a string hash calculated from the current Backus-Naur Form (BNF) grammar of the Qlik chart expressions supported within a given App.
Response
- qBnfHashstring
Errors
arrayGetExpressionBNFHash()
const result = await doc.GetExpressionBNFHash({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetExpressionBNFHash"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qBnfHash": "value"
}
}
Retrieves the variables that are tagged as favorite.
Response
- qNamesarray of strings
Errors
arrayGetFavoriteVariables()
const result = await doc.GetFavoriteVariables({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetFavoriteVariables"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qNames": [
"value"
]
}
}
Returns a handle to a field.
Parameters
- qFieldNamestringRequired
Name of the field.
- qStateNamestring
Name of the alternate state. Default state is current selections.
Response
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayGetField(qFieldName, qStateName?)
const result = await doc.GetField([
"value",
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetField",
"params": {
"qFieldName": "value",
"qStateName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
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
- qFieldsOrColumnsWithWildcardsarray of objectsRequired
Pairs of table (optionally) and field names. Support wildcard matches.
qFieldsOrColumnsWithWildcards properties
- qFieldNamestring
Name of the field or column to be matched.
- qTableNamestring
Name of the table to be matched on. This parameter is optional. If TableName is set, FieldName represent the Table column with that name. If TableName is not set, FieldName represents the the field with that name.
-
- qMaxNumberOfValuesintegerRequired
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.
- qRandSeedinteger
Optional. Sets the random number seed. Should only be set for test purposes.
Response
- qResultarray of objects
qResult properties
- qFieldOrColumnobject
qFieldOrColumn properties
- qFieldNamestring
Name of the field or column to be matched.
- qTableNamestring
Name of the table to be matched on. This parameter is optional. If TableName is set, FieldName represent the Table column with that name. If TableName is not set, FieldName represents the the field with that name.
-
- qValuesarray of objects
Matched values part of the sample.
qValues properties
- qTextstring
Text related to the field value. This parameter is optional.
- qIsNumericboolean
Is set to true if the value is a numeric. This parameter is optional. Default is false.
- qNumbernumber
Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. This parameter is optional.
-
-
Errors
arrayGetFieldAndColumnSamples(qFieldsOrColumnsWithWildcards, qMaxNumberOfValues, qRandSeed?)
const result = await doc.GetFieldAndColumnSamples([
[
{
"qFieldName": "value",
"qTableName": "value"
}
],
123,
123
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetFieldAndColumnSamples",
"params": {
"qFieldsOrColumnsWithWildcards": [
{
"qFieldName": "value",
"qTableName": "value"
}
],
"qMaxNumberOfValues": 123,
"qRandSeed": 123
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qResult": [
{
"qFieldOrColumn": {
"qFieldName": "value",
"qTableName": "value"
},
"qValues": [
{
"qText": "value",
"qIsNumeric": true,
"qNumber": 123
}
]
}
]
}
}
Returns the description of a field.
Parameters
- qFieldNamestringRequired
Name of the field.
Response
- qReturnobject
qReturn properties
- qInternalNumberinteger
Internal number of the field.
- qNamestring
Name of the field.
- qSrcTablesarray of strings
List of table names.
- qIsSystemboolean
If set to true, it means that the field is a system field. The default value is false.
- qIsHiddenboolean
If set to true, it means that the field is hidden. The default value is false.
- qIsSemanticboolean
If set to true, it means that the field is a semantic. The default value is false.
- qDistinctOnlyboolean
If set to true, only distinct field values are shown. The default value is false.
- qCardinalinteger
Number of distinct field values.
- qTotalCountinteger
Total number of field values.
- qPossibleCount_OBSOLETEinteger
- qHasInfo_OBSOLETEboolean
- qIsLockedboolean
If set to true, it means that the field is locked. The default value is false.
- qAlwaysOneSelectedboolean
If set to true, it means that the field has one and only one selection (not 0 and not more than 1). If this property is set to true, the field cannot be cleared anymore and no more selections can be performed in that field. The default value is false.
- qAndModeboolean
If set to true a logical AND (instead of a logical OR) is used when making selections in a field. The default value is false.
- qIsNumericboolean
Is set to true if the value is a numeric. The default value is false.
- qCommentstring
Field comment.
- qTagsarray of strings
Gives information on a field. For example, it can return the type of the field. Examples: key, text, ASCII.
- qIsDefinitionOnlyboolean
If set to true, it means that the field is a field on the fly. The default value is false.
- qByteSizeinteger
Static RAM memory used in bytes.
-
Errors
arrayGetFieldDescription(qFieldName)
const result = await doc.GetFieldDescription([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetFieldDescription",
"params": {
"qFieldName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qInternalNumber": 123,
"qName": "value",
"qSrcTables": [
"value"
],
"qIsSystem": true,
"qIsHidden": true,
"qIsSemantic": true,
"qDistinctOnly": true,
"qCardinal": 123,
"qTotalCount": 123,
"qPossibleCount_OBSOLETE": 123,
"qHasInfo_OBSOLETE": true,
"qIsLocked": true,
"qAlwaysOneSelected": true,
"qAndMode": true,
"qIsNumeric": true,
"qComment": "value",
"qTags": [
"value"
],
"qIsDefinitionOnly": true,
"qByteSize": 123
}
}
}
Find the field-on-the-fly by passing its readable name.
Parameters
- qReadableNamestringRequired
Readable name of the field-on-the-fly.
Response
- qNamestring
Errors
arrayGetFieldOnTheFlyByName(qReadableName)
const result = await doc.GetFieldOnTheFlyByName([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetFieldOnTheFlyByName",
"params": {
"qReadableName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qName": "value"
}
}
Retrives any fields from an expression.
Parameters
- qExprstringRequired
Expression to get fields from.
Response
- qFieldNamesarray of strings
Errors
arrayGetFieldsFromExpression(qExpr)
const result = await doc.GetFieldsFromExpression([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetFieldsFromExpression",
"params": {
"qExpr": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qFieldNames": [
"value"
]
}
}
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.
Parameters
- qFieldNamesarray of stringsRequired
List of fields names that resource ids should be returned from.
Response
- qFieldsarray of objects
qFields properties
- qNamestring
Name of the field to get the resource id for.
- qResourceIdsarray of objects
Field level resource Id per table that the field is part of
qResourceIds properties
- qTablestring
Name of the table that the field belongs to get the resource id for
- qResourceIdstring
Resource identifier for the field
-
-
Errors
arrayGetFieldsResourceIds(qFieldNames)
const result = await doc.GetFieldsResourceIds([
[
"value"
]
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetFieldsResourceIds",
"params": {
"qFieldNames": [
"value"
]
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qFields": [
{
"qName": "value",
"qResourceIds": [
{
"qTable": "value",
"qResourceId": "value"
}
]
}
]
}
}
Lists the fields of a table for a folder connection.
FileType
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
- qConnectionIdstringRequired
Identifier of the connection.
- qRelativePathstring
Path of the connection file.
- qDataFormatobjectRequired
Type of the file.
qDataFormat properties
- qTypestring
Can be one of: "CSV""FIX""DIF""EXCEL_BIFF""EXCEL_OOXML""HTML""QVD""XML""QVX""JSON""KML""PARQUET"
- qLabelstring
One of:
- Embedded labels (field names are present in the file)
- No labels
- Explicit labels (for DIFfiles)
- qQuotestring
One of:
- None (no quotes)
- MSQ (Modern Style Quoting)
- Standard (quotes " " or ' ' can be used, but only if they are the first and last non blank characters of a field value)
This property is used for delimited files.
- qCommentstring
String that marks the beginning of the comment line. Example: “#” or “//” The engine ignores the commented lines during the data load. This property is only used for delimited files.
- qDelimiterobject
qDelimiter properties
- qNamestring
Name of the delimiter. Example: "Tab_DELIMITER"
- qScriptCodestring
Representation of the delimiter value that is used in the script. Example: "'\t'"
- qNumberinteger
Delimiter character number used by the engine to determine how to separate the values.
- qIsMultipleboolean
Is set to true if multiple spaces are used to separate the values.
-
- qCodePageinteger
Character set used in the file.
- qHeaderSizeinteger
Size of the header. Example: If the header size is 2, the first two rows in the file are considered as header and not as data. The header can contain the field names.
- qRecordSizeinteger
Record length. Each record (row of data) contains a number of columns with a fixed field size. This property is used for fixed record data files.
- qTabSizeinteger
Number of spaces that one tab character represents in the table file. This property is used for fixed record data files.
- qIgnoreEOFboolean
Is set to true, the end-of-file character is not taken into account during reload. This property is used for delimited files and fixed record data files.
- qFixedWidthDelimitersstring
Positions of the field breaks in the table. This property is used for fixed record data files.
-
- qTablestringRequired
Name of the table. This parameter must be set for XLS , XLSX , _HTML _ and XML files.
Response
- qFieldsarray of objects
qFields properties
- qNamestring
Name of the field.
- qIsKeyboolean
Is set to true if the field is a primary key.
- qOriginalFieldNamestring
Is shown for fixed records. qOriginalFieldName and qName are identical if no field names are used in the file. qOriginalFieldName differs from qName if embedded file names are used in the file.
-
- qFormatSpecstring
Errors
arrayGetFileTableFields(qConnectionId, qRelativePath?, qDataFormat, qTable)
const result = await doc.GetFileTableFields([
"value",
"value",
{
"qType": "CSV",
"qLabel": "value",
"qQuote": "value",
"qComment": "value",
"qDelimiter": {
"qName": "value",
"qScriptCode": "value",
"qNumber": 123,
"qIsMultiple": true
},
"qCodePage": 123,
"qHeaderSize": 123,
"qRecordSize": 123,
"qTabSize": 123,
"qIgnoreEOF": true,
"qFixedWidthDelimiters": "value"
},
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetFileTableFields",
"params": {
"qConnectionId": "value",
"qRelativePath": "value",
"qDataFormat": {
"qType": "CSV",
"qLabel": "value",
"qQuote": "value",
"qComment": "value",
"qDelimiter": {
"qName": "value",
"qScriptCode": "value",
"qNumber": 123,
"qIsMultiple": true
},
"qCodePage": 123,
"qHeaderSize": 123,
"qRecordSize": 123,
"qTabSize": 123,
"qIgnoreEOF": true,
"qFixedWidthDelimiters": "value"
},
"qTable": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qFields": [
{
"qName": "value",
"qIsKey": true,
"qOriginalFieldName": "value"
}
],
"qFormatSpec": "value"
}
}
Lists the values in a table for a folder connection.
FileType
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
- qConnectionIdstringRequired
Identifier of the connection.
- qRelativePathstring
Path of the connection file.
- qDataFormatobjectRequired
Type of the file.
qDataFormat properties
- qTypestring
Can be one of: "CSV""FIX""DIF""EXCEL_BIFF""EXCEL_OOXML""HTML""QVD""XML""QVX""JSON""KML""PARQUET"
- qLabelstring
One of:
- Embedded labels (field names are present in the file)
- No labels
- Explicit labels (for DIFfiles)
- qQuotestring
One of:
- None (no quotes)
- MSQ (Modern Style Quoting)
- Standard (quotes " " or ' ' can be used, but only if they are the first and last non blank characters of a field value)
This property is used for delimited files.
- qCommentstring
String that marks the beginning of the comment line. Example: “#” or “//” The engine ignores the commented lines during the data load. This property is only used for delimited files.
- qDelimiterobject
qDelimiter properties
- qNamestring
Name of the delimiter. Example: "Tab_DELIMITER"
- qScriptCodestring
Representation of the delimiter value that is used in the script. Example: "'\t'"
- qNumberinteger
Delimiter character number used by the engine to determine how to separate the values.
- qIsMultipleboolean
Is set to true if multiple spaces are used to separate the values.
-
- qCodePageinteger
Character set used in the file.
- qHeaderSizeinteger
Size of the header. Example: If the header size is 2, the first two rows in the file are considered as header and not as data. The header can contain the field names.
- qRecordSizeinteger
Record length. Each record (row of data) contains a number of columns with a fixed field size. This property is used for fixed record data files.
- qTabSizeinteger
Number of spaces that one tab character represents in the table file. This property is used for fixed record data files.
- qIgnoreEOFboolean
Is set to true, the end-of-file character is not taken into account during reload. This property is used for delimited files and fixed record data files.
- qFixedWidthDelimitersstring
Positions of the field breaks in the table. This property is used for fixed record data files.
-
- qTablestringRequired
Name of the table. This parameter must be set for XLS , XLSX , _HTML _ and XML files.
Response
- qPreviewarray of objects
qPreview properties
- qValuesarray of strings
List of values inside the table. The first values (in result/qPreview/0/qValues ) correspond to the field names in the table. The following values (from result/qPreview/1/qValues ) are the values of the fields in the table.
-
- qFormatSpecstring
Errors
arrayGetFileTablePreview(qConnectionId, qRelativePath?, qDataFormat, qTable)
const result = await doc.GetFileTablePreview([
"value",
"value",
{
"qType": "CSV",
"qLabel": "value",
"qQuote": "value",
"qComment": "value",
"qDelimiter": {
"qName": "value",
"qScriptCode": "value",
"qNumber": 123,
"qIsMultiple": true
},
"qCodePage": 123,
"qHeaderSize": 123,
"qRecordSize": 123,
"qTabSize": 123,
"qIgnoreEOF": true,
"qFixedWidthDelimiters": "value"
},
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetFileTablePreview",
"params": {
"qConnectionId": "value",
"qRelativePath": "value",
"qDataFormat": {
"qType": "CSV",
"qLabel": "value",
"qQuote": "value",
"qComment": "value",
"qDelimiter": {
"qName": "value",
"qScriptCode": "value",
"qNumber": 123,
"qIsMultiple": true
},
"qCodePage": 123,
"qHeaderSize": 123,
"qRecordSize": 123,
"qTabSize": 123,
"qIgnoreEOF": true,
"qFixedWidthDelimiters": "value"
},
"qTable": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qPreview": [
{
"qValues": [
"value"
]
}
],
"qFormatSpec": "value"
}
}
Lists the tables for a folder connection.
FileType
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
- qConnectionIdstringRequired
Identifier of the connection.
- qRelativePathstring
Path of the connection file.
- qDataFormatobjectRequired
Type of the file.
qDataFormat properties
- qTypestring
Can be one of: "CSV""FIX""DIF""EXCEL_BIFF""EXCEL_OOXML""HTML""QVD""XML""QVX""JSON""KML""PARQUET"
- qLabelstring
One of:
- Embedded labels (field names are present in the file)
- No labels
- Explicit labels (for DIFfiles)
- qQuotestring
One of:
- None (no quotes)
- MSQ (Modern Style Quoting)
- Standard (quotes " " or ' ' can be used, but only if they are the first and last non blank characters of a field value)
This property is used for delimited files.
- qCommentstring
String that marks the beginning of the comment line. Example: “#” or “//” The engine ignores the commented lines during the data load. This property is only used for delimited files.
- qDelimiterobject
qDelimiter properties
- qNamestring
Name of the delimiter. Example: "Tab_DELIMITER"
- qScriptCodestring
Representation of the delimiter value that is used in the script. Example: "'\t'"
- qNumberinteger
Delimiter character number used by the engine to determine how to separate the values.
- qIsMultipleboolean
Is set to true if multiple spaces are used to separate the values.
-
- qCodePageinteger
Character set used in the file.
- qHeaderSizeinteger
Size of the header. Example: If the header size is 2, the first two rows in the file are considered as header and not as data. The header can contain the field names.
- qRecordSizeinteger
Record length. Each record (row of data) contains a number of columns with a fixed field size. This property is used for fixed record data files.
- qTabSizeinteger
Number of spaces that one tab character represents in the table file. This property is used for fixed record data files.
- qIgnoreEOFboolean
Is set to true, the end-of-file character is not taken into account during reload. This property is used for delimited files and fixed record data files.
- qFixedWidthDelimitersstring
Positions of the field breaks in the table. This property is used for fixed record data files.
-
Response
- qTablesarray of objects
qTables properties
- qNamestring
Name of the table.
- qTypestring
Type of the table. For example: Table or View.
-
Errors
arrayGetFileTables(qConnectionId, qRelativePath?, qDataFormat)
const result = await doc.GetFileTables([
"value",
"value",
{
"qType": "CSV",
"qLabel": "value",
"qQuote": "value",
"qComment": "value",
"qDelimiter": {
"qName": "value",
"qScriptCode": "value",
"qNumber": 123,
"qIsMultiple": true
},
"qCodePage": 123,
"qHeaderSize": 123,
"qRecordSize": 123,
"qTabSize": 123,
"qIgnoreEOF": true,
"qFixedWidthDelimiters": "value"
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetFileTables",
"params": {
"qConnectionId": "value",
"qRelativePath": "value",
"qDataFormat": {
"qType": "CSV",
"qLabel": "value",
"qQuote": "value",
"qComment": "value",
"qDelimiter": {
"qName": "value",
"qScriptCode": "value",
"qNumber": 123,
"qIsMultiple": true
},
"qCodePage": 123,
"qHeaderSize": 123,
"qRecordSize": 123,
"qTabSize": 123,
"qIgnoreEOF": true,
"qFixedWidthDelimiters": "value"
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qTables": [
{
"qName": "value",
"qType": "value"
}
]
}
}
Lists the tables and fields of a JSON or XML file for a folder connection.
Parameters
- qConnectionIdstringRequired
Identifier of the connection.
- qRelativePathstring
Path of the connection file.
- qDataFormatobjectRequired
Type of the file.
qDataFormat properties
- qTypestring
Can be one of: "CSV""FIX""DIF""EXCEL_BIFF""EXCEL_OOXML""HTML""QVD""XML""QVX""JSON""KML""PARQUET"
- qLabelstring
One of:
- Embedded labels (field names are present in the file)
- No labels
- Explicit labels (for DIFfiles)
- qQuotestring
One of:
- None (no quotes)
- MSQ (Modern Style Quoting)
- Standard (quotes " " or ' ' can be used, but only if they are the first and last non blank characters of a field value)
This property is used for delimited files.
- qCommentstring
String that marks the beginning of the comment line. Example: “#” or “//” The engine ignores the commented lines during the data load. This property is only used for delimited files.
- qDelimiterobject
qDelimiter properties
- qNamestring
Name of the delimiter. Example: "Tab_DELIMITER"
- qScriptCodestring
Representation of the delimiter value that is used in the script. Example: "'\t'"
- qNumberinteger
Delimiter character number used by the engine to determine how to separate the values.
- qIsMultipleboolean
Is set to true if multiple spaces are used to separate the values.
-
- qCodePageinteger
Character set used in the file.
- qHeaderSizeinteger
Size of the header. Example: If the header size is 2, the first two rows in the file are considered as header and not as data. The header can contain the field names.
- qRecordSizeinteger
Record length. Each record (row of data) contains a number of columns with a fixed field size. This property is used for fixed record data files.
- qTabSizeinteger
Number of spaces that one tab character represents in the table file. This property is used for fixed record data files.
- qIgnoreEOFboolean
Is set to true, the end-of-file character is not taken into account during reload. This property is used for delimited files and fixed record data files.
- qFixedWidthDelimitersstring
Positions of the field breaks in the table. This property is used for fixed record data files.
-
Response
- qTablesarray of objects
qTables properties
- qNamestring
Name of the table.
- qFieldsarray of objects
List of the fields in the table.
qFields properties
- qNamestring
Name of the field.
- qIsKeyboolean
Is set to true if the field is a primary key.
- qOriginalFieldNamestring
Is shown for fixed records. qOriginalFieldName and qName are identical if no field names are used in the file. qOriginalFieldName differs from qName if embedded file names are used in the file.
-
- qFormatSpecstring
List of format specification items, within brackets. Examples of specification items:
- file type
- embedded labels, no labels
- table is <table name>
-
Errors
arrayGetFileTablesEx(qConnectionId, qRelativePath?, qDataFormat)
const result = await doc.GetFileTablesEx([
"value",
"value",
{
"qType": "CSV",
"qLabel": "value",
"qQuote": "value",
"qComment": "value",
"qDelimiter": {
"qName": "value",
"qScriptCode": "value",
"qNumber": 123,
"qIsMultiple": true
},
"qCodePage": 123,
"qHeaderSize": 123,
"qRecordSize": 123,
"qTabSize": 123,
"qIgnoreEOF": true,
"qFixedWidthDelimiters": "value"
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetFileTablesEx",
"params": {
"qConnectionId": "value",
"qRelativePath": "value",
"qDataFormat": {
"qType": "CSV",
"qLabel": "value",
"qQuote": "value",
"qComment": "value",
"qDelimiter": {
"qName": "value",
"qScriptCode": "value",
"qNumber": 123,
"qIsMultiple": true
},
"qCodePage": 123,
"qHeaderSize": 123,
"qRecordSize": 123,
"qTabSize": 123,
"qIgnoreEOF": true,
"qFixedWidthDelimiters": "value"
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qTables": [
{
"qName": "value",
"qFields": [
{
"qName": "value",
"qIsKey": true,
"qOriginalFieldName": "value"
}
],
"qFormatSpec": "value"
}
]
}
}
Lists the items for a folder connection.
Parameters
- qConnectionIdstringRequired
Identifier of the connection.
- qRelativePathstring
Relative path of the connection.
Response
- qFolderItemsarray of objects
qFolderItems properties
- qNamestring
Name of the folder item.
- qTypestring
Can be one of: "FOLDER""FILE""OTHER"
-
Errors
arrayGetFolderItemsForConnection(qConnectionId, qRelativePath?)
const result = await doc.GetFolderItemsForConnection([
"value",
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetFolderItemsForConnection",
"params": {
"qConnectionId": "value",
"qRelativePath": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qFolderItems": [
{
"qName": "value",
"qType": "FOLDER"
}
]
}
}
Response
- qGroupStatesarray of objectsExperimental
qGroupStates properties
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qActiveFieldDefstring
String defining the active field.
-
Errors
arrayGetGroupStates()
const result = await doc.GetGroupStates({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetGroupStates"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qGroupStates": [
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qActiveFieldDef": "value"
}
]
}
}
Gets the content of a file.
Parameters
- qPathstringRequired
["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.
Response
- qContentstring
Errors
arrayGetIncludeFileContent(qPath)
const result = await doc.GetIncludeFileContent([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetIncludeFileContent",
"params": {
"qPath": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qContent": "value"
}
}
Returns the content of a library.
Global content 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.
App specific content library
The embedded files are returned.
Parameters
- qNamestringRequired
Name of the content library. It corresponds to the property qContentLibraryListItem/qName returned by the GetContentLibraries method.
Response
- qListobject
qList properties
- qItemsarray of objects
Information about the list of content files.
qItems properties
- qUrlDefstring
Relative path to the content file. The URL is static. In Qlik Sense Enterprise, content files located:
- In the /content/ <content library name>/ folder are part of a global content library.
- In the /appcontent/ folder are part of the app specific library. The content files are never embedded in the qvf file. In Qlik Sense Desktop, content files located:
- In the /content/default/ folder are outside the qvf file.
- In the /media/ folder are embedded in the qvf file.
- qUrlstring
Relative path to the content file. The URL is static. In Qlik Sense Enterprise, content files located:
- In the /content/ <content library name>/ folder are part of a global content library.
- In the /appcontent/ folder are part of the app specific library. The content files are never embedded in the qvf file. In Qlik Sense Desktop, content files located:
- In the /content/default/ folder are outside the qvf file.
- In the /media/ folder are embedded in the qvf file.
-
-
Errors
arrayGetLibraryContent(qName)
const result = await doc.GetLibraryContent([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetLibraryContent",
"params": {
"qName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qList": {
"qItems": [
{
"qUrlDef": "value",
"qUrl": "value"
}
]
}
}
}
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.
Response
- qLineagearray of objects
qLineage properties
- qDiscriminatorstring
A string indicating the origin of the data:
- [filename]: the data comes from a local file.
- INLINE: the data is entered inline in the load script.
- RESIDENT: the data comes from a resident table. The table name is listed.
- AUTOGENERATE: the data is generated from the load script (no external table of data source).
- Provider: the data comes from a data connection. The connector source name is listed.
- [webfile]: the data comes from a web-based file.
- STORE: path to QVD or TXT file where data is stored.
- EXTENSION: the data comes from a Server Side Extension (SSE).
- qStatementstring
The LOAD and SELECT script statements from the data load script.
-
Errors
arrayGetLineage()
const result = await doc.GetLineage({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetLineage"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qLineage": [
{
"qDiscriminator": "value",
"qStatement": "value"
}
]
}
}
Returns locale information.
Response
- qReturnobject
qReturn properties
- qDecimalSepstring
Decimal separator.
- qThousandSepstring
Thousand separator.
- qListSepstring
List separator.
- qMoneyDecimalSepstring
Money decimal separator.
- qMoneyThousandSepstring
Money thousand separator.
- qCurrentYearinteger
Current year.
- qMoneyFmtstring
Money format. Example: #.##0,00 kr;-#.##0,00 kr
- qTimeFmtstring
Time format. Example: hh:mm:ss
- qDateFmtstring
Date format. Example: YYYY-MM-DD
- qTimestampFmtstring
Time stamp format. Example: YYYY-MM-DD hh:mm:ss[.fff]
- qCalendarStringsobject
qCalendarStrings properties
- qDayNamesarray of strings
List of short day names.
- qMonthNamesarray of strings
List of short month names.
- qLongDayNamesarray of strings
List of long day names.
- qLongMonthNamesarray of strings
List of long month names.
-
- qFirstWeekDayinteger
First day of the week, starting from 0. According to ISO 8601, Monday is the first day of the week.
- 0 = Monday
- 1 = Tuesday
- ...
- 6 = Sunday
If this property has not been set in a script, the returned value comes from the Windows operating system.
- qBrokenWeeksboolean
Is set to true if broken weeks are allowed in a year. According to ISO 8601, no broken weeks should be allowed. This property is not shown if set to false. If qBrokenWeeks is set to true, qReferenceDay is irrelevant. If this property has not been set in a script, the returned value comes from the Windows operating system.
- qReferenceDayinteger
Day in the year that is always in week 1. According to ISO 8601, January 4th should always be part of the first week of the year ( qReferenceDay =4). Recommended values are in the range 1 and 7. If this property has not been set in a script, the returned value comes from the Windows operating system. This property is not relevant if there are broken weeks in the year.
- qFirstMonthOfYearinteger
First month of the year, starting from 1. According to ISO 8601, January is the first month of the year.
- 1 = January
- 2 = February
- 12 = January
If this property has not been set in a script, the returned value comes from the Windows operating system.
- qCollationstring
Locale name (following language tagging convention RFC 4646): < language>-<REGION> Where:
- language is a lowercase ISO 639 language code
- REGION specifies an uppercase ISO 3166 country code.
If this property has not been set in a script, the returned value comes from the Windows operating system.
- qNumericalAbbreviationstring
Number format. Example: 3:k;6:M;9:G;12:T;15:P;18:E;21:Z;24:Y;-3:m;-6:μ;-9:n;-12:p;-15:f;-18:a;-21:z;-24:y
-
Errors
arrayGetLocaleInfo()
const result = await doc.GetLocaleInfo({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetLocaleInfo"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qDecimalSep": "value",
"qThousandSep": "value",
"qListSep": "value",
"qMoneyDecimalSep": "value",
"qMoneyThousandSep": "value",
"qCurrentYear": 123,
"qMoneyFmt": "value",
"qTimeFmt": "value",
"qDateFmt": "value",
"qTimestampFmt": "value",
"qCalendarStrings": {
"qDayNames": [
"value"
],
"qMonthNames": [
"value"
],
"qLongDayNames": [
"value"
],
"qLongMonthNames": [
"value"
]
},
"qFirstWeekDay": 123,
"qBrokenWeeks": true,
"qReferenceDay": 123,
"qFirstMonthOfYear": 123,
"qCollation": "value",
"qNumericalAbbreviation": "value"
}
}
}
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.
Response
- qvarray of integers
Errors
arrayGetLooselyCoupledVector()
const result = await doc.GetLooselyCoupledVector({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetLooselyCoupledVector"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qv": [
123
]
}
}
Retrieves any fields that match all of the specified tags or just one of them in the data model of an app.
Parameters
- qTagsarray of stringsRequired
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 .
- qMatchingFieldModestring
Matching field mode. The default value is MATCHINGFIELDMODE_MATCH_ALL.
One of:
- MATCHINGFIELDMODE_MATCH_ALL
- MATCHINGFIELDMODE_MATCH_ONE
Response
- qFieldNamesarray of objects
qFieldNames properties
- qNamestring
Name of the field.
- qTagsarray of strings
List of tags.
-
Errors
arrayGetMatchingFields(qTags, qMatchingFieldMode?)
const result = await doc.GetMatchingFields([
[
"value"
],
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetMatchingFields",
"params": {
"qTags": [
"value"
],
"qMatchingFieldMode": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qFieldNames": [
{
"qName": "value",
"qTags": [
"value"
]
}
]
}
}
Returns the handle of a measure.
Parameters
- qIdstringRequired
Identifier of the measure.
Response
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayGetMeasure(qId)
const result = await doc.GetMeasure([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetMeasure",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Returns the handle of a measure with a label. If multiple measures has the same label the first is returned.
Parameters
- qLabelstringRequired
is the label of the measure to be returned.
Response
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayGetMeasureWithLabel(qLabel)
const result = await doc.GetMeasureWithLabel([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetMeasureWithLabel",
"params": {
"qLabel": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Lists the media files.
Response
- qListobject
Lists the media files. Is the layout for MediaListDef.
This struct is deprecated.qList properties
- qItemsarray of objects
Information about the list of media files. In Qlik Sense Desktop, the media files are retrieved from: %userprofile%\Documents\Qlik\Sense\Content\Default In Qlik Sense Enterprise, the media files are retrieved from: <installation_directory>\Qlik\Sense\Repository\Content\Default The default installation directory is ProgramData .
qItems properties
- qUrlDefstring
Relative path to the media file. The URL is static. Media files located:
- in the /content/default/ folder are outside the qvf file.
- in the /media/ folder are embedded in the qvf file.
- qUrlstring
Relative path to the media file. Media files located:
- in the /content/default/ folder are outside the qvf file.
- in the /media/ folder are embedded in the qvf file.
-
-
- qReturnboolean
Errors
arrayGetMediaList()
const result = await doc.GetMediaList({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetMediaList"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qList": {
"qItems": [
{
"qUrlDef": "value",
"qUrl": "value"
}
]
},
"qReturn": true
}
}
Returns the type of the app object and the corresponding handle.
Parameters
- qIdstringRequired
Identifier of the object to retrieve.
Response
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayGetObject(qId)
const result = await doc.GetObject([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetObject",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Returns all objects compatible with options.
Parameters
- qOptionsobjectRequired
Object type filter and requested properties.
qOptions properties
- qTypesarray of strings
List of object types.
- qIncludeSessionObjectsboolean
Set to true to include session objects. The default value is false.
- qDataobject
Contains dynamic JSON data specified by the client.
-
Response
- qListarray of objects
qList properties
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qDataobject
Contains dynamic JSON data specified by the client.
-
Errors
arrayGetObjects(qOptions)
const result = await doc.GetObjects([
{
"qTypes": [
"value"
],
"qIncludeSessionObjects": true,
"qData": {}
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetObjects",
"params": {
"qOptions": {
"qTypes": [
"value"
],
"qIncludeSessionObjects": true,
"qData": {}
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qList": [
{
"qInfo": {
"qId": "value",
"qType": "value"
},
"qMeta": {
"qName": "value"
},
"qData": {}
}
]
}
}
GetScript()
const result = await doc.GetScript({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetScript"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qScript": "value"
}
}
Lists the breakpoints in the script of an app.
Response
- qBreakpointsarray of objects
qBreakpoints properties
- qbufferNamestring
Name of the breakpoint.
- qlineIxinteger
Line number in the script where the breakpoint is set.
- qEnabledboolean
If set to true then the breakpoint is enabled (in use).
-
Errors
arrayGetScriptBreakpoints()
const result = await doc.GetScriptBreakpoints({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetScriptBreakpoints"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qBreakpoints": [
{
"qbufferName": "value",
"qlineIx": 123,
"qEnabled": true
}
]
}
}
Gets script and script meta-data.
Response
- qScriptobject
qScript properties
- qScriptstring
Script text.
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qIsLockedboolean
True if user is temporarily locked from modifying the script. Meta contains the ID of the last modifier. Only applicable to QCS.
-
Errors
arrayGetScriptEx()
const result = await doc.GetScriptEx({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetScriptEx"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qScript": {
"qScript": "value",
"qMeta": {
"qName": "value"
},
"qIsLocked": true
}
}
}
Gets script meta-data.
Response
- qMetaobjectExperimental
qMeta properties
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qIsLockedboolean
True if user is temporarily locked from modifying the script. Meta contains the ID of the last modifier. Only applicable to QCS.
-
Errors
arrayGetScriptMeta()
const result = await doc.GetScriptMeta({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetScriptMeta"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qMeta": {
"qMeta": {
"qName": "value"
},
"qIsLocked": true
}
}
}
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
- qStateNamestring
Optional. The name of the state to get set analysis expression for. If left empty, the default state will be retrieved.
- qBookmarkIdstring
Optional. The Id of the bookmark to get the set analysis expression for. If left empty, the current selection will be retrieved.
Response
- qSetExpressionstring
Errors
arrayGetSetAnalysis(qStateName?, qBookmarkId?)
const result = await doc.GetSetAnalysis([
"value",
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetSetAnalysis",
"params": {
"qStateName": "value",
"qBookmarkId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSetExpression": "value"
}
}
Retrieves the data of a specific table.
Parameters
- qOffsetintegerRequired
Position from the top, starting from 0. If the offset is set to 0, the rows starting from the position/index 0 are shown.
- qRowsintegerRequired
Number of rows to show.
- qSyntheticModebooleanRequired
If this parameter is set to true, the internal data/table representation is shown. Synthetic fields are present (if any).
- qTableNamestringRequired
Name of the table.
Response
- qDataarray of objects
qData properties
- qValuearray of objects
Array of field values.
qValue properties
- qTextstring
Text related to the field value. This parameter is optional.
- qIsNumericboolean
Is set to true if the value is a numeric. This parameter is optional. Default is false.
- qNumbernumber
Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. This parameter is optional.
-
-
Errors
arrayGetTableData(qOffset, qRows, qSyntheticMode, qTableName)
const result = await doc.GetTableData([
123,
123,
true,
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetTableData",
"params": {
"qOffset": 123,
"qRows": 123,
"qSyntheticMode": true,
"qTableName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qData": [
{
"qValue": [
{
"qText": "value",
"qIsNumeric": true,
"qNumber": 123
}
]
}
]
}
}
Returns profile data for a given table.
Parameters
- qTableNamestringRequired
Name of the table
Response
- qProfilingobject
qProfiling properties
- qNoOfRowsinteger
Number of rows in the table.
- qFieldProfilingarray of objects
Field values profiling info
qFieldProfiling properties
- qNamestring
Name of the field.
- qFieldTagsarray of strings
List of tags related to the field.
- qNumberFormatobject
Sets the formatting of a field. The properties of qFieldAttributes and the formatting mechanism are described below.
Formatting mechanism
The formatting mechanism depends on the type set in qType, as shown below:
In case of inconsistencies between the type and the format pattern, the format pattern takes precedence over the type.Type is DATE, TIME, TIMESTAMP or INTERVAL
The following applies:
- If a format pattern is defined in qFmt , the formatting is as defined in qFmt .
- If qFmt is empty, the formatting is defined by the number interpretation variables included at the top of the script ( TimeFormat , DateFormat , TimeStampFormat ).
- The properties qDec , qThou , qnDec , qUseThou are not used.
Type is INTEGER
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the formatting mechanism uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
- If no format pattern is defined in qFmt , no formatting is applied. The properties qDec , qThou , qnDec , qUseThou and the number interpretation variables defined in the script are not used .
Type is REAL
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
- If no format pattern is defined in qFmt , and if the value is almost an integer value (for example, 14,000012), the value is formatted as an integer. The properties qDec , qThou , qnDec , qUseThou are not used.
- If no format pattern is defined in qFmt , and if qnDec is defined and not 0, the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
- If no format pattern is defined in qFmt , and if qnDec is 0, the number of decimals is 14 and the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
Type is FIX
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
- If no format pattern is defined in qFmt , the properties qDec and qnDec are used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
Type is MONEY
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of any script ( MoneyDecimalSep and MoneyThousandSep ).
- If no format pattern is defined in qFmt , the engine uses the number interpretation variables included at the top of the script ( MoneyDecimalSep and MoneyThousandSep ).
Type is ASCII
No formatting, qFmt is ignored.
qNumberFormat properties
- qTypestring
Can be one of: "U""A""I""R""F""M""D""T""TS""IV"
- qnDecinteger
Number of decimals. Default is 10.
- qUseThouinteger
Defines whether or not a thousands separator must be used. Default is 0.
- qFmtstring
Defines the format pattern that applies to qText . Is used in connection to the type of the field (parameter qType ). For more information, see Formatting mechanism. Example: YYYY-MM-DD for a date.
- qDecstring
Defines the decimal separator. Example: .
- qThoustring
Defines the thousand separator (if any). Is used if qUseThou is set to 1. Example: ,
- qDistinctValuesinteger
Number of distinct values
- qDistinctNumericValuesinteger
Number of distinct numeric values
- qDistinctTextValuesinteger
Number of distinct text values
- qNumericValuesinteger
Number of numeric values
- qNullValuesinteger
Number of null values
- qTextValuesinteger
Number of textual values
- qNegValuesinteger
Number of negative values
- qPosValuesinteger
Number of positive values
- qZeroValuesinteger
Number of zero values for numerical values
- qSumnumber
Sum of all numerical values. NaN otherwise.
- qSum2number
Squared sum of all numerical values. NaN otherwise.
- qAveragenumber
Average of all numerical values. NaN otherwise.
- qMediannumber
Median of all numerical values. NaN otherwise.
- qStdnumber
Standard deviation of numerical values. NaN otherwise.
- qMinnumber
Minimum value of numerical values. NaN otherwise.
- qMaxnumber
Maximum value of numerical values. NaN otherwise.
- qSkewnessnumber
Skewness of the numerical values. NaN otherwise.
- qKurtosisnumber
Kurtosis of the numerical values. NaN otherwise.
- qFractilesarray of numbers
The .01, .05, .1, .25, .5, .75, .9, .95, .99 fractiles. Array of NaN otherwise.
- qEmptyStringsinteger
Number of empty strings
- qMaxStringLeninteger
Maximum string length of textual values. 0 otherwise.
- qMinStringLeninteger
Minimum string length of textual values. 0 otherwise.
- qSumStringLeninteger
Sum of all characters in strings in the field
- qAvgStringLennumber
Average string length of textual values. 0 otherwise.
- qFirstSortedstring
For textual values the first sorted string.
- qLastSortedstring
For textual values the last sorted string.
- qMostFrequentarray of objects
Three most frequent values and their frequencies
qMostFrequent properties
- qSymbolobject
qSymbol properties
- qTextstring
String value of the symbol. This parameter is optional and present only if Symbol is a string.
- qNumbernumber
Numeric value of the symbol. NaN otherwise.
-
- qFrequencyinteger
Frequency of the above symbol in the field
-
- qFrequencyDistributionobject
qFrequencyDistribution properties
- qNumberOfBinsinteger
Number of bins.
- qBinsEdgesarray of numbers
Bins edges.
- qFrequenciesarray of integers
Bins frequencies.
-
-
-
Errors
arrayGetTableProfileData(qTableName)
const result = await doc.GetTableProfileData([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetTableProfileData",
"params": {
"qTableName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qProfiling": {
"qNoOfRows": 123,
"qFieldProfiling": [
{
"qName": "value",
"qFieldTags": [
"value"
],
"qNumberFormat": {
"qType": "U",
"qnDec": 10,
"qUseThou": 123,
"qFmt": "value",
"qDec": "value",
"qThou": "value"
},
"qDistinctValues": 123,
"qDistinctNumericValues": 123,
"qDistinctTextValues": 123,
"qNumericValues": 123,
"qNullValues": 123,
"qTextValues": 123,
"qNegValues": 123,
"qPosValues": 123,
"qZeroValues": 123,
"qSum": 123,
"qSum2": 123,
"qAverage": 123,
"qMedian": 123,
"qStd": 123,
"qMin": 123,
"qMax": 123,
"qSkewness": 123,
"qKurtosis": 123,
"qFractiles": [
123
],
"qEmptyStrings": 123,
"qMaxStringLen": 123,
"qMinStringLen": 123,
"qSumStringLen": 123,
"qAvgStringLen": 123,
"qFirstSorted": "value",
"qLastSorted": "value",
"qMostFrequent": [
{
"qSymbol": {
"qText": "value",
"qNumber": 123
},
"qFrequency": 123
}
],
"qFrequencyDistribution": {
"qNumberOfBins": 123,
"qBinsEdges": [
123
],
"qFrequencies": [
123
]
}
}
]
}
}
}
Doc GetTablesAndKeys
(qWindowSize, qNullSize, qCellHeight, qSyntheticMode, qIncludeSysVars, qIncludeProfiling?)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
- qWindowSizeobjectRequired
Size of the window that is used to display the results.
qWindowSize properties
- qcxinteger
Number of pixels on the x axis.
- qcyinteger
Number of pixels on the y axis.
-
- qNullSizeobjectRequired
qNullSize properties
- qcxinteger
Number of pixels on the x axis.
- qcyinteger
Number of pixels on the y axis.
-
- qCellHeightintegerRequired
Height of a cell in a table in pixels.
- qSyntheticModebooleanRequired
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.
- qIncludeSysVarsbooleanRequired
If set to true, the system variables are included.
- qIncludeProfilingboolean
If set to true, profiling information is included.
Response
- qtrarray of objects
qtr properties
- qNamestring
Name of the table.
- qLooseboolean
This property is set to true if the table is loose.
- qNoOfRowsinteger
Number of rows in the table.
- qFieldsarray of objects
Information about the fields in the table.
qFields properties
- qNamestring
Name of the field.
- qOriginalFieldsarray of strings
Is shown for fixed records. qOriginalFieldName and qName are identical if no field names are used in the file. qOriginalFieldName differs from qName if embedded file names are used in the file.
- qPresentboolean
- qHasNullboolean
This property is set to true if the field contains some Null values.
- qHasWildboolean
- qHasDuplicatesboolean
This property is set to true if the field contains some duplicate values.
- qIsSyntheticboolean
This property is set to true if the field contains a synthetic key.
- qInformationDensitynumber
Number of records that have values (for example, not NULL) in the field as compared to the total number of records in the table.
- qnNonNullsinteger
Number of values that are non Null.
- qnRowsinteger
Number of rows in the field.
- qSubsetRationumber
Number of distinct values in the field (in the current table) as compared to the total number of distinct values of this field (in all tables).
- qnTotalDistinctValuesinteger
Number of distinct values in the field.
- qnPresentDistinctValuesinteger
- qKeyTypestring
Can be one of: "NOT_KEY""ANY_KEY""PRIMARY_KEY""PERFECT_KEY"
- qCommentstring
Comment related to the field.
- qTagsarray of strings
List of tags related to the field.
- qDerivedFieldsarray of objects
List of the derived fields.
qDerivedFields properties
- qDefinitionNamestring
Name of the derived definition.
- qTagsarray of strings
List of tags.
- qActiveboolean
Is set to true is the derived field is in use.
-
- qIsFieldOnTheFlyboolean
- qReadableNamestring
-
- qPosobject
qPos properties
- qxinteger
x-coordinate in pixels. The origin is the top left of the screen.
- qyinteger
y-coordinate in pixels. The origin is the top left of the screen.
-
- qCommentstring
Comment related to the table.
- qIsDirectDiscoveryboolean
If set to true, Direct Discovery is used. Direct Discovery fields are not loaded into memory and remain in the external database.
- qIsSyntheticboolean
This property is set to true if the table contains a synthetic key.
- qTableTagsarray of strings
List of tags related to the table.
- qProfilingDataobject
qProfilingData properties
- qNoOfRowsinteger
Number of rows in the table.
- qFieldProfilingarray of objects
Field values profiling info
qFieldProfiling properties
- qNamestring
Name of the field.
- qFieldTagsarray of strings
List of tags related to the field.
- qNumberFormatobject
Sets the formatting of a field. The properties of qFieldAttributes and the formatting mechanism are described below.
Formatting mechanism
The formatting mechanism depends on the type set in qType, as shown below:
In case of inconsistencies between the type and the format pattern, the format pattern takes precedence over the type.Type is DATE, TIME, TIMESTAMP or INTERVAL
The following applies:
- If a format pattern is defined in qFmt , the formatting is as defined in qFmt .
- If qFmt is empty, the formatting is defined by the number interpretation variables included at the top of the script ( TimeFormat , DateFormat , TimeStampFormat ).
- The properties qDec , qThou , qnDec , qUseThou are not used.
Type is INTEGER
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the formatting mechanism uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
- If no format pattern is defined in qFmt , no formatting is applied. The properties qDec , qThou , qnDec , qUseThou and the number interpretation variables defined in the script are not used .
Type is REAL
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
- If no format pattern is defined in qFmt , and if the value is almost an integer value (for example, 14,000012), the value is formatted as an integer. The properties qDec , qThou , qnDec , qUseThou are not used.
- If no format pattern is defined in qFmt , and if qnDec is defined and not 0, the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
- If no format pattern is defined in qFmt , and if qnDec is 0, the number of decimals is 14 and the property qDec is used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
Type is FIX
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of the script ( DecimalSep and ThousandSep ).
- If no format pattern is defined in qFmt , the properties qDec and qnDec are used. If qDec is not defined, the variable DecimalSep defined at the top of the script is used.
Type is MONEY
The following applies:
- If a format pattern is defined in qFmt , the engine looks at the values set in qDec and qThou . If these properties are not defined, the engine uses the number interpretation variables included at the top of any script ( MoneyDecimalSep and MoneyThousandSep ).
- If no format pattern is defined in qFmt , the engine uses the number interpretation variables included at the top of the script ( MoneyDecimalSep and MoneyThousandSep ).
Type is ASCII
No formatting, qFmt is ignored.
qNumberFormat properties
- qTypestring
Can be one of: "U""A""I""R""F""M""D""T""TS""IV"
- qnDecinteger
Number of decimals. Default is 10.
- qUseThouinteger
Defines whether or not a thousands separator must be used. Default is 0.
- qFmtstring
Defines the format pattern that applies to qText . Is used in connection to the type of the field (parameter qType ). For more information, see Formatting mechanism. Example: YYYY-MM-DD for a date.
- qDecstring
Defines the decimal separator. Example: .
- qThoustring
Defines the thousand separator (if any). Is used if qUseThou is set to 1. Example: ,
- qDistinctValuesinteger
Number of distinct values
- qDistinctNumericValuesinteger
Number of distinct numeric values
- qDistinctTextValuesinteger
Number of distinct text values
- qNumericValuesinteger
Number of numeric values
- qNullValuesinteger
Number of null values
- qTextValuesinteger
Number of textual values
- qNegValuesinteger
Number of negative values
- qPosValuesinteger
Number of positive values
- qZeroValuesinteger
Number of zero values for numerical values
- qSumnumber
Sum of all numerical values. NaN otherwise.
- qSum2number
Squared sum of all numerical values. NaN otherwise.
- qAveragenumber
Average of all numerical values. NaN otherwise.
- qMediannumber
Median of all numerical values. NaN otherwise.
- qStdnumber
Standard deviation of numerical values. NaN otherwise.
- qMinnumber
Minimum value of numerical values. NaN otherwise.
- qMaxnumber
Maximum value of numerical values. NaN otherwise.
- qSkewnessnumber
Skewness of the numerical values. NaN otherwise.
- qKurtosisnumber
Kurtosis of the numerical values. NaN otherwise.
- qFractilesarray of numbers
The .01, .05, .1, .25, .5, .75, .9, .95, .99 fractiles. Array of NaN otherwise.
- qEmptyStringsinteger
Number of empty strings
- qMaxStringLeninteger
Maximum string length of textual values. 0 otherwise.
- qMinStringLeninteger
Minimum string length of textual values. 0 otherwise.
- qSumStringLeninteger
Sum of all characters in strings in the field
- qAvgStringLennumber
Average string length of textual values. 0 otherwise.
- qFirstSortedstring
For textual values the first sorted string.
- qLastSortedstring
For textual values the last sorted string.
- qMostFrequentarray of objects
Three most frequent values and their frequencies
qMostFrequent properties
- qSymbolobject
qSymbol properties
- qTextstring
String value of the symbol. This parameter is optional and present only if Symbol is a string.
- qNumbernumber
Numeric value of the symbol. NaN otherwise.
-
- qFrequencyinteger
Frequency of the above symbol in the field
-
- qFrequencyDistributionobject
qFrequencyDistribution properties
- qNumberOfBinsinteger
Number of bins.
- qBinsEdgesarray of numbers
Bins edges.
- qFrequenciesarray of integers
Bins frequencies.
-
-
-
-
- qkarray of objects
qk properties
- qKeyFieldsarray of strings
Name of the key field.
- qTablesarray of strings
Table the key belongs to.
-
Errors
arrayGetTablesAndKeys(qWindowSize, qNullSize, qCellHeight, qSyntheticMode, qIncludeSysVars, qIncludeProfiling?)
const result = await doc.GetTablesAndKeys([
{
"qcx": 123,
"qcy": 123
},
{
"qcx": 123,
"qcy": 123
},
123,
true,
true,
true
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetTablesAndKeys",
"params": {
"qWindowSize": {
"qcx": 123,
"qcy": 123
},
"qNullSize": {
"qcx": 123,
"qcy": 123
},
"qCellHeight": 123,
"qSyntheticMode": true,
"qIncludeSysVars": true,
"qIncludeProfiling": true
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qtr": [
{
"qName": "value",
"qLoose": true,
"qNoOfRows": 123,
"qFields": [
{
"qName": "value",
"qOriginalFields": [
"value"
],
"qPresent": true,
"qHasNull": true,
"qHasWild": true,
"qHasDuplicates": true,
"qIsSynthetic": true,
"qInformationDensity": 123,
"qnNonNulls": 123,
"qnRows": 123,
"qSubsetRatio": 123,
"qnTotalDistinctValues": 123,
"qnPresentDistinctValues": 123,
"qKeyType": "NOT_KEY",
"qComment": "value",
"qTags": [
"value"
],
"qDerivedFields": [
{
"qDefinitionName": "value",
"qTags": [
"value"
],
"qActive": true
}
],
"qIsFieldOnTheFly": true,
"qReadableName": "value"
}
],
"qPos": {
"qx": 123,
"qy": 123
},
"qComment": "value",
"qIsDirectDiscovery": true,
"qIsSynthetic": true,
"qTableTags": [
"value"
],
"qProfilingData": {
"qNoOfRows": 123,
"qFieldProfiling": [
{
"qName": "value",
"qFieldTags": [
"value"
],
"qNumberFormat": {
"qType": "U",
"qnDec": 10,
"qUseThou": 123,
"qFmt": "value",
"qDec": "value",
"qThou": "value"
},
"qDistinctValues": 123,
"qDistinctNumericValues": 123,
"qDistinctTextValues": 123,
"qNumericValues": 123,
"qNullValues": 123,
"qTextValues": 123,
"qNegValues": 123,
"qPosValues": 123,
"qZeroValues": 123,
"qSum": 123,
"qSum2": 123,
"qAverage": 123,
"qMedian": 123,
"qStd": 123,
"qMin": 123,
"qMax": 123,
"qSkewness": 123,
"qKurtosis": 123,
"qFractiles": [
123
],
"qEmptyStrings": 123,
"qMaxStringLen": 123,
"qMinStringLen": 123,
"qSumStringLen": 123,
"qAvgStringLen": 123,
"qFirstSorted": "value",
"qLastSorted": "value",
"qMostFrequent": [
{
"qSymbol": {
"qText": "value",
"qNumber": 123
},
"qFrequency": 123
}
],
"qFrequencyDistribution": {
"qNumberOfBins": 123,
"qBinsEdges": [
123
],
"qFrequencies": [
123
]
}
}
]
}
}
],
"qk": [
{
"qKeyFields": [
"value"
],
"qTables": [
"value"
]
}
]
}
}
Fetches updated variables after a statement execution.
Response
- qMacrosarray of objects
qMacros properties
- qTagstring
Name of the variable.
- qRefSeqNointeger
Order in which the variable was referenced during the script execution. The same number sequence is used for both qRefSeqNo and qSetSeqNo .
- qSetSeqNointeger
Order in which the variable was updated during the script execution. The same number sequence is used for both qRefSeqNo and qSetSeqNo .
- qDisplayStringstring
Variable value.
- qIsSystemboolean
Is set to true if the variable is a system variable.
- qIsReservedboolean
Is set to true if the variable is a reserved variable.
-
Errors
arrayGetTextMacros()
const result = await doc.GetTextMacros({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetTextMacros"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qMacros": [
{
"qTag": "value",
"qRefSeqNo": 123,
"qSetSeqNo": 123,
"qDisplayString": "value",
"qIsSystem": true,
"qIsReserved": true
}
]
}
}
Returns a handle to a variable.
Parameters
- qNamestringRequired
Name of the variable.
Response
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayGetVariable(qName)
const result = await doc.GetVariable([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetVariable",
"params": {
"qName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Gets the handle of a variable.
Parameters
- qIdstringRequired
Identifier of the variable.
Response
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayGetVariableById(qId)
const result = await doc.GetVariableById([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetVariableById",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Gets the handle of a variable.
Parameters
- qNamestringRequired
Name of the variable.
Response
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayGetVariableByName(qName)
const result = await doc.GetVariableByName([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetVariableByName",
"params": {
"qName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Parameters
- qListDefobjectRequired
qListDef properties
- qTypestring
Type of variables to include in the list.
- qShowReservedboolean
Shows the reserved variables if set to true.
- qShowConfigboolean
Shows the system variables if set to true.
- qDataobject
Contains dynamic JSON data specified by the client.
- qShowSessionboolean
Shows the session variables if set to true.
-
Response
- qListarray of objects
qList properties
- qNamestring
Name of the variable.
- qDescriptionstring
Description of the variable.
- qDefinitionstring
Definition of the variable. It can be a value or an expression.
- qIsConfigboolean
If set to true, it means that the variable is a system variable. A system variable provides information about the system and is set by the engine. The content cannot be changed by the user. This parameter is optional. The default value is false.
- qIsReservedboolean
If set to true, it means that the variable is reserved. The default value is false. This parameter is optional. Examples:
- ScriptError is a reserved variable, set by the engine.
- DayNames is a reserved variable, set by the user.
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qDataobject
Contains dynamic JSON data specified by the client.
- qIsScriptCreatedboolean
If set to true, it means that the variable was defined via script.
-
Errors
arrayGetVariables(qListDef)
const result = await doc.GetVariables([
{
"qType": "value",
"qShowReserved": true,
"qShowConfig": true,
"qData": {},
"qShowSession": true
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetVariables",
"params": {
"qListDef": {
"qType": "value",
"qShowReserved": true,
"qShowConfig": true,
"qData": {},
"qShowSession": true
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qList": [
{
"qName": "value",
"qDescription": "value",
"qDefinition": "value",
"qIsConfig": true,
"qIsReserved": true,
"qMeta": {
"qName": "value"
},
"qInfo": {
"qId": "value",
"qType": "value"
},
"qData": {},
"qIsScriptCreated": true
}
]
}
}
Returns information about the position of the tables in the data model viewer.
Response
- qReturnobject
qReturn properties
- qPosobject
qPos properties
- qLeftinteger
Position from the left. Corresponds to the first column.
- qTopinteger
Position from the top. Corresponds to the first row.
- qWidthinteger
Number of columns in the page. The indexing of the columns may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).
- qHeightinteger
Number of rows or elements in the page. The indexing of the rows may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).
-
- qCtlInfoobject
qCtlInfo properties
- qInternalViewobject
qInternalView properties
- qTablesarray of objects
List of the tables in the database model viewer.
qTables properties
- qPosobject
qPos properties
- qLeftinteger
Position from the left. Corresponds to the first column.
- qTopinteger
Position from the top. Corresponds to the first row.
- qWidthinteger
Number of columns in the page. The indexing of the columns may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).
- qHeightinteger
Number of rows or elements in the page. The indexing of the rows may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).
-
- qCaptionstring
Table name.
-
- qBroomPointsarray of objects
List of the broom points in the database model viewer. Not used in Qlik Sense.
qBroomPoints properties
- qPosobject
qPos properties
- qxinteger
x-coordinate in pixels. The origin is the top left of the screen.
- qyinteger
y-coordinate in pixels. The origin is the top left of the screen.
-
- qTablestring
Name of the table.
- qFieldsarray of strings
List of fields in the table.
-
- qConnectionPointsarray of objects
List of connection points in the database model viewer. Not used in Qlik Sense.
qConnectionPoints properties
- qPosobject
qPos properties
- qxinteger
x-coordinate in pixels. The origin is the top left of the screen.
- qyinteger
y-coordinate in pixels. The origin is the top left of the screen.
-
- qFieldsarray of strings
List of the fields in the table.
-
- qZoomFactornumber
Zoom factor in the database model viewer. The default value is 1.0.
-
- qSourceViewobject
qSourceView properties
- qTablesarray of objects
List of the tables in the database model viewer.
qTables properties
- qPosobject
qPos properties
- qLeftinteger
Position from the left. Corresponds to the first column.
- qTopinteger
Position from the top. Corresponds to the first row.
- qWidthinteger
Number of columns in the page. The indexing of the columns may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).
- qHeightinteger
Number of rows or elements in the page. The indexing of the rows may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).
-
- qCaptionstring
Table name.
-
- qBroomPointsarray of objects
List of the broom points in the database model viewer. Not used in Qlik Sense.
qBroomPoints properties
- qPosobject
qPos properties
- qxinteger
x-coordinate in pixels. The origin is the top left of the screen.
- qyinteger
y-coordinate in pixels. The origin is the top left of the screen.
-
- qTablestring
Name of the table.
- qFieldsarray of strings
List of fields in the table.
-
- qConnectionPointsarray of objects
List of connection points in the database model viewer. Not used in Qlik Sense.
qConnectionPoints properties
- qPosobject
qPos properties
- qxinteger
x-coordinate in pixels. The origin is the top left of the screen.
- qyinteger
y-coordinate in pixels. The origin is the top left of the screen.
-
- qFieldsarray of strings
List of the fields in the table.
-
- qZoomFactornumber
Zoom factor in the database model viewer. The default value is 1.0.
-
-
- qModeinteger
View mode to display when opening Qlik Sense data model viewer. One of:
- 0 for internal view mode.
- 1 for source view mode.
-
Errors
arrayGetViewDlgSaveInfo()
const result = await doc.GetViewDlgSaveInfo({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GetViewDlgSaveInfo"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qPos": {
"qLeft": 123,
"qTop": 123,
"qWidth": 123,
"qHeight": 123
},
"qCtlInfo": {
"qInternalView": {
"qTables": [
{
"qPos": {
"qLeft": 123,
"qTop": 123,
"qWidth": 123,
"qHeight": 123
},
"qCaption": "value"
}
],
"qBroomPoints": [
{
"qPos": {
"qx": 123,
"qy": 123
},
"qTable": "value",
"qFields": [
"value"
]
}
],
"qConnectionPoints": [
{
"qPos": {
"qx": 123,
"qy": 123
},
"qFields": [
"value"
]
}
],
"qZoomFactor": 1
},
"qSourceView": {
"qTables": [
{
"qPos": {
"qLeft": 123,
"qTop": 123,
"qWidth": 123,
"qHeight": 123
},
"qCaption": "value"
}
],
"qBroomPoints": [
{
"qPos": {
"qx": 123,
"qy": 123
},
"qTable": "value",
"qFields": [
"value"
]
}
],
"qConnectionPoints": [
{
"qPos": {
"qx": 123,
"qy": 123
},
"qFields": [
"value"
]
}
],
"qZoomFactor": 1
}
},
"qMode": 123
}
}
}
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
FileType
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
- qConnectionIdstringRequired
Identifier of the connection file.
- qRelativePathstring
Path of the connection file.
Response
- qDataFormatobject
FileType
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
qDataFormat properties
- qTypestring
Can be one of: "CSV""FIX""DIF""EXCEL_BIFF""EXCEL_OOXML""HTML""QVD""XML""QVX""JSON""KML""PARQUET"
- qLabelstring
One of:
- Embedded labels (field names are present in the file)
- No labels
- Explicit labels (for DIFfiles)
- qQuotestring
One of:
- None (no quotes)
- MSQ (Modern Style Quoting)
- Standard (quotes " " or ' ' can be used, but only if they are the first and last non blank characters of a field value)
This property is used for delimited files.
- qCommentstring
String that marks the beginning of the comment line. Example: “#” or “//” The engine ignores the commented lines during the data load. This property is only used for delimited files.
- qDelimiterobject
qDelimiter properties
- qNamestring
Name of the delimiter. Example: "Tab_DELIMITER"
- qScriptCodestring
Representation of the delimiter value that is used in the script. Example: "'\t'"
- qNumberinteger
Delimiter character number used by the engine to determine how to separate the values.
- qIsMultipleboolean
Is set to true if multiple spaces are used to separate the values.
-
- qCodePageinteger
Character set used in the file.
- qHeaderSizeinteger
Size of the header. Example: If the header size is 2, the first two rows in the file are considered as header and not as data. The header can contain the field names.
- qRecordSizeinteger
Record length. Each record (row of data) contains a number of columns with a fixed field size. This property is used for fixed record data files.
- qTabSizeinteger
Number of spaces that one tab character represents in the table file. This property is used for fixed record data files.
- qIgnoreEOFboolean
Is set to true, the end-of-file character is not taken into account during reload. This property is used for delimited files and fixed record data files.
- qFixedWidthDelimitersstring
Positions of the field breaks in the table. This property is used for fixed record data files.
Errors
arrayGuessFileType(qConnectionId, qRelativePath?)
const result = await doc.GuessFileType([
"value",
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "GuessFileType",
"params": {
"qConnectionId": "value",
"qRelativePath": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qDataFormat": {
"qType": "CSV",
"qLabel": "value",
"qQuote": "value",
"qComment": "value",
"qDelimiter": {
"qName": "value",
"qScriptCode": "value",
"qNumber": 123,
"qIsMultiple": true
},
"qCodePage": 123,
"qHeaderSize": 123,
"qRecordSize": 123,
"qTabSize": 123,
"qIgnoreEOF": true,
"qFixedWidthDelimiters": "value"
}
}
}
Locks all selections in fields for current state.
Parameters
- qStateNamestring
Alternate state name. When set, applies to alternate state instead of current.
Response
objectErrors
arrayLockAll(qStateName?)
const result = await doc.LockAll([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "LockAll",
"params": {
"qStateName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Updates a connection.
Parameters
- qConnectionIdstringRequired
Identifier of the connection.
- qConnectionobjectRequired
Information about the connection. Properties that can be updated.
qConnection properties
- qIdstring
Identifier of the connection. Is generated by the engine and is unique.
- qNamestring
Name of the connection. This parameter is mandatory and must be set when creating or modifying a connection.
- qConnectionStringstring
One of:
- ODBC CONNECT TO [<provider name>]
- OLEDB CONNECT TO [<provider name>]
- CUSTOM CONNECT TO [<provider name>]
- "<local absolute or relative path, UNC path>"
- "<URL>"
Connection string. This parameter is mandatory and must be set when creating or modifying a connection.
- qTypestring
One of:
- ODBC
- OLEDB
- <Name of the custom connection file>
- folder
- internet
Type of the connection. This parameter is mandatory and must be set when creating or modifying a connection. For ODBC, OLEDB and custom connections, the engine checks that the connection type matches the connection string. The type is not case sensitive.
- qUserNamestring
Name of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the user name.
- qPasswordstring
Password of the user who creates the connection. This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. A call to GetConnection Method does not return the password.
- qModifiedDatestring
Is generated by the engine. Creation date of the connection or last modification date of the connection.
- qMetaobject
Layout for NxMetaDef.
qMeta properties
- qNamestring
Name. This property is optional.
-
- qLogOnstring
Can be one of: "LOG_ON_SERVICE_USER""LOG_ON_CURRENT_USER"
-
- qOverrideCredentialsboolean
Set this parameter to true to override the user name and password.
Response
objectErrors
arrayModifyConnection(qConnectionId, qConnection, qOverrideCredentials?)
const result = await doc.ModifyConnection([
"value",
{
"qId": "value",
"qName": "value",
"qConnectionString": "value",
"qType": "value",
"qUserName": "value",
"qPassword": "value",
"qModifiedDate": "value",
"qMeta": {
"qName": "value"
},
"qLogOn": "LOG_ON_SERVICE_USER"
},
true
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ModifyConnection",
"params": {
"qConnectionId": "value",
"qConnection": {
"qId": "value",
"qName": "value",
"qConnectionString": "value",
"qType": "value",
"qUserName": "value",
"qPassword": "value",
"qModifiedDate": "value",
"qMeta": {
"qName": "value"
},
"qLogOn": "LOG_ON_SERVICE_USER"
},
"qOverrideCredentials": true
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Publishes an app. All app objects are published. Generic objects, bookmarks, dimensions and measures inside the app are published.
Parameters
- qStreamIdstringRequired
Identifier of the stream.
- qNamestring
Name of the published app. If this parameter is not set, the engine automatically gives a new name to the published app.
Response
objectErrors
arrayPublish(qStreamId, qName?)
const result = await doc.Publish([
"value",
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "Publish",
"params": {
"qStreamId": "value",
"qName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Redoes the previous operation.
Response
- qSuccessboolean
Errors
arrayRedo()
const result = await doc.Redo({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "Redo"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Removes an alternate state in the app.
Parameters
- qStateNamestringRequired
Name of the alternate state.
Response
objectErrors
arrayRemoveAlternateState(qStateName)
const result = await doc.RemoveAlternateState([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "RemoveAlternateState",
"params": {
"qStateName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Removes an session alternate state in the app.
Parameters
- qStateNamestringRequired
Name of the alternate state.
Response
- qSuccessboolean
Errors
arrayRemoveSessionAlternateState(qStateName)
const result = await doc.RemoveSessionAlternateState([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "RemoveSessionAlternateState",
"params": {
"qStateName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Removes a variable.
Parameters
- qNamestringRequired
Name of the variable. Variable names are case sensitive.
Response
- qReturnboolean
Errors
arrayRemoveVariable(qName)
const result = await doc.RemoveVariable([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "RemoveVariable",
"params": {
"qName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": true
}
}
Replace a bookmark. Optional inparams to change the original bookmarks properties, original are kept if left out.
Parameters
- qIdstringRequired
Identifier of the bookmark.
- qIgnorePatchesboolean
Set to true to exclude patches from the bookmark. Default is false.
- qObjectIdsToPatcharray of strings
Add softpatches for this objects if available. If empty all softpatches are added to the bookmark. Ignored if IgnorePatches is set to true.
Response
- qInfoobject
qInfo properties
- qIdstring
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qTypestring
Type of the object. This parameter is mandatory.
-
- qReturnobject
qReturn properties
- qTypestring
The native type of the object.
- qHandleinteger
The handle used to connect to object.
- qGenericTypestring
The type of the object.
- qGenericIdstring
Object ID.
-
Errors
arrayReplaceBookmark(qId, qIgnorePatches?, qObjectIdsToPatch?)
const result = await doc.ReplaceBookmark([
"value",
true,
[
"value"
]
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "ReplaceBookmark",
"params": {
"qId": "value",
"qIgnorePatches": true,
"qObjectIdsToPatch": [
"value"
]
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qInfo": {
"qId": "value",
"qType": "value"
},
"qReturn": {
"qType": "value",
"qHandle": 123,
"qGenericType": "value",
"qGenericId": "value"
}
}
}
Restore a temporary selection state identified by Id.
Parameters
- qIdstringRequired
Identifier of the temporary selection state
Response
- qReturnboolean
Errors
arrayRestoreTempSelectionState(qId)
const result = await doc.RestoreTempSelectionState([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "RestoreTempSelectionState",
"params": {
"qId": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": true
}
}
Resume()
const result = await doc.Resume({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "Resume"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Save a copy of an app with a different name. Can be used to save a session app as an ordinary app.
Parameters
- qNewAppNamestringRequired
<Name of the saved app>
Response
- qNewAppIdstring
Errors
arraySaveAs(qNewAppName)
const result = await doc.SaveAs([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SaveAs",
"params": {
"qNewAppName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qNewAppId": "value"
}
}
Saves all objects that were modified in the app.
Response
objectErrors
arraySaveObjects()
const result = await doc.SaveObjects({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SaveObjects"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
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.
Parameters
- qFieldNamestringRequired
Name of the field to scramble.
Response
objectErrors
arrayScramble(qFieldName)
const result = await doc.Scramble([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "Scramble",
"params": {
"qFieldName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Returns the search matches for one or more search terms. The search results depend on the search context. SearchCombinationOptions
SearchMatchCombinations
Name | Description | Type |
---|---|---|
qSearchMatchCombinations | Array of search combinations. | Array of SearchMatchCombination |
Parameters
- qOptionsobjectRequired
Information about the search fields and the search context.
qOptions properties
- qSearchFieldsarray of strings
List of the search fields. If empty, the search is performed in all fields of the app.
- qContextstring
Can be one of: "Cleared""LockedFieldsOnly""CurrentSelections"
- qCharEncodingstring
Can be one of: "Utf8""Utf16"
- qAttributesarray of strings
Optional.
- For SearchSuggest method, this array is empty.
- For SearchObjects method, this array is empty or contain qProperty .
- For SearchResults method, this array is empty, or contains qNum and/or qElemNum . It allows the user to request details in the outputted SearchGroupItemMatch . For more information, see SearchGroupItemMatch.
-
- qTermsarray of stringsRequired
List of terms to search for.
- qPageobjectRequired
Array of pages to retrieve.
qPage properties
- qOffsetinteger
Position from the top, starting from 0. If the offset is set to 0, the first search result to be returned is at position 0.
- qCountinteger
Number of search groups to return (in qSearchGroupArray ).
- qMaxNbrFieldMatchesinteger
Maximum number of matching values to return per search result. The default value is -1; all values are returned. This property is to be used with the SearchAssociations method.
- qGroupOptionsarray of objects
Options of the search groups. If this property is not set, all values are returned. This property is to be used with the SearchResults method or the SearchObjects method.
qGroupOptions properties
- qGroupTypestring
Can be one of: "DatasetType""GenericObjectsType"
- qOffsetinteger
Position starting from 0. The default value is 0.
- qCountinteger
Maximum number of items per group (in qItems[ ] ). The default value is -1; all values are returned.
-
- qGroupItemOptionsarray of objects
Options of the search group items. If this property is not set, all values are returned. This property is to be used with the SearchResults method or the SearchObjects method.
qGroupItemOptions properties
- qGroupItemTypestring
Can be one of: "Field""GenericObject"
- qOffsetinteger
Position starting from 0. The default value is 0.
- qCountinteger
Maximum number of matches per item (in qItemMatches[ ] ). The default value is -1: all values are returned.
-
-
Response
- qResultsobjectDeprecated
qResults properties
- qFieldNamesarray of strings
List of the fields that contains search associations.
- qSearchTermsarray of strings
List of the search terms.
- qFieldDictionariesarray of objectsDeprecated
Information about the fields containing search hits.
qFieldDictionaries properties
- qFieldinteger
Position of the field in the list of fields, starting from 0. The list of fields is defined in qResults/qFieldNames and contains the search associations.
- qResultarray of objectsDeprecated
List of the matching values. The maximum number of values in this list is set by qMaxNbrFieldMatches .
qResult properties
- qTextstring
Text of the associated value.
- qElemNumberinteger
Element number of the associated value.
- qRangesarray of objects
List of ranges. For example, if the user searches the term read and the associative value is Reading , then the corresponding range would be Read in Reading .
qRanges properties
- qCharPosinteger
Starting position of the match in the search result, starting from 0.
- qCharCountinteger
Length of the match in the search result.
- qTerminteger
Position of the term in the list of search terms, starting from 0.
-
-
-
- qSearchTermsMatchedarray of arraysDeprecated
List of search results. The maximum number of search results in this list is set by qPage/qCount .
qSearchTermsMatched properties
- qIdinteger
Index of the search result, starting from 0.
- qFieldMatchesarray of objectsDeprecated
Information about the search matches.
qFieldMatches properties
- qFieldinteger
Position of the field in the list of fields, starting from 0. The list of fields is defined in qResults/qFieldNames and contains the search associations.
- qValuesarray of integers
Positions of the matching values in the search results. The maximum number of values in this list is defined by qMaxNbrFieldMatches .
- qTermsarray of integers
Positions of the search terms, starting from 0.
- qNoOfMatchesinteger
Number of search hits in the field. The number of values in qValues and the value of qNoOfMatches are equal if qMaxNbrFieldMatches is -1.
-
-
- qTotalSearchResultsinteger
Total number of search results. This number is not limited by qPage/qCount .
-
Errors
arraySearchAssociations(qOptions, qTerms, qPage)
const result = await doc.SearchAssociations([
{
"qSearchFields": [
"value"
],
"qContext": "Cleared",
"qCharEncoding": "Utf8",
"qAttributes": [
"value"
]
},
[
"value"
],
{
"qOffset": 123,
"qCount": 123,
"qMaxNbrFieldMatches": -1,
"qGroupOptions": [
{
"qGroupType": "DatasetType",
"qOffset": 123,
"qCount": -1
}
],
"qGroupItemOptions": [
{
"qGroupItemType": "Field",
"qOffset": 123,
"qCount": -1
}
]
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SearchAssociations",
"params": {
"qOptions": {
"qSearchFields": [
"value"
],
"qContext": "Cleared",
"qCharEncoding": "Utf8",
"qAttributes": [
"value"
]
},
"qTerms": [
"value"
],
"qPage": {
"qOffset": 123,
"qCount": 123,
"qMaxNbrFieldMatches": -1,
"qGroupOptions": [
{
"qGroupType": "DatasetType",
"qOffset": 123,
"qCount": -1
}
],
"qGroupItemOptions": [
{
"qGroupItemType": "Field",
"qOffset": 123,
"qCount": -1
}
]
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qResults": {
"qFieldNames": [
"value"
],
"qSearchTerms": [
"value"
],
"qFieldDictionaries": [
{
"qField": 123,
"qResult": [
{
"qText": "value",
"qElemNumber": 123,
"qRanges": [
{
"qCharPos": 123,
"qCharCount": 123,
"qTerm": 123
}
]
}
]
}
],
"qSearchTermsMatched": [
[
{
"qId": 123,
"qFieldMatches": [
{
"qField": 123,
"qValues": [
123
],
"qTerms": [
123
],
"qNoOfMatches": 123
}
]
}
]
],
"qTotalSearchResults": 123
}
}
}
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
- qOptionsobjectRequired
Information about attributes.
qOptions properties
- qAttributesarray of strings
This array is either empty or contains qProperty .
- qCharEncodingstring
Can be one of: "Utf8""Utf16"
-
- qTermsarray of stringsRequired
Terms to search for.
- qPageobjectRequired
Array of pages to retrieve.
qPage properties
- qOffsetinteger
Position from the top, starting from 0. If the offset is set to 0, the first search result to be returned is at position 0.
- qCountinteger
Number of search groups to return (in qSearchGroupArray ).
- qMaxNbrFieldMatchesinteger
Maximum number of matching values to return per search result. The default value is -1; all values are returned. This property is to be used with the SearchAssociations method.
- qGroupOptionsarray of objects
Options of the search groups. If this property is not set, all values are returned. This property is to be used with the SearchResults method or the SearchObjects method.
qGroupOptions properties
- qGroupTypestring
Can be one of: "DatasetType""GenericObjectsType"
- qOffsetinteger
Position starting from 0. The default value is 0.
- qCountinteger
Maximum number of items per group (in qItems[ ] ). The default value is -1; all values are returned.
-
- qGroupItemOptionsarray of objects
Options of the search group items. If this property is not set, all values are returned. This property is to be used with the SearchResults method or the SearchObjects method.
qGroupItemOptions properties
- qGroupItemTypestring
Can be one of: "Field""GenericObject"
- qOffsetinteger
Position starting from 0. The default value is 0.
- qCountinteger
Maximum number of matches per item (in qItemMatches[ ] ). The default value is -1: all values are returned.
-
-
Response
- qResultobject
qResult properties
- qSearchTermsarray of strings
List of the search terms.
- qTotalNumberOfGroupsinteger
Total number of groups.
- qSearchGroupArrayarray of objects
List of search groups. The groups are numbered from the value of SearchPage.qOffset to the value of SearchPage.qOffset + SearchPage.qCount .
qSearchGroupArray properties
- qIdinteger
Identifier of the search group.
- qGroupTypestring
Can be one of: "DatasetType""GenericObjectsType"
- qSearchTermsMatchedarray of integers
Indexes of the search terms that are included in the group. These search terms are related to the list of terms defined in SearchResult.qSearchTerms .
- qTotalNumberOfItemsinteger
Total number of distinct items in the search group.
- qItemsarray of objects
List of items in the search group. The group items are numbered from the value of SearchGroupOptions.qOffset to the value of SearchGroupOptions.qOffset + SearchGroupOptions.qCount
qItems properties
- qItemTypestring
Can be one of: "Field""GenericObject"
- qTotalNumberOfMatchesinteger
Total number of distinct matches in the search group item.
- qIdentifierstring
Identifier of the item. It corresponds to:
- The name of the field, if the type of the search group is data set.
- The id of the generic object if the type of the search group is generic object.
- qItemMatchesarray of objects
List of matches in the search group item. The group item matches are numbered from the value of SearchGroupItemOptions.qOffset to the value of SearchGroupItemOptions.qOffset + SearchGroupItemOptions.qCount .
qItemMatches properties
- qTextstring
Search match value. Value of the search group item. If the match is found in a field, it corresponds to the value of the field. If the match is found in a generic object property, it corresponds to the property value.
- qFieldSelectionModestring
Can be one of: "OneAndOnlyOne"
- qRangesarray of objects
List of ranges. For example, if the search terms are Price and Make, and the search group item value is Make by Price vs Mileage, then there are two ranges: one for Price and one for Make.
qRanges properties
- qCharPosinteger
Starting position of the match in the search result, starting from 0.
- qCharCountinteger
Length of the match in the search result.
- qTerminteger
Position of the term in the list of search terms, starting from 0.
-
- qAttributesarray of objects
Provides detail of the match as requested by the user in SearchObjectsOptions.qAttributes or SearchCombinationOptions.qAttributes If the user requests SearchObjects or SearchResults with an empty qAttributes option, the outputted qAttributes is returned empty. For SearchObjects requested with qProperty , the SearchGroupItemMatch.qAttributes return value contains [“qProperty”, "qMetaDef/title”] if the match has been found in the title of the item. For dimension values, the returned qProperty will be “*” . For SearchResults requested with qNum , the SearchGroupItemMatch.qAttributes return value contains ["qNum", N] where N is the numeric value of the element or NaN if the value is not numeric. For SearchResults requested with qElemNum , the SearchGroupItemMatch.qAttributes return value contains ["qElemNum", N] where N is the value index of the element.
qAttributes properties
- qKeystring
String corresponding to SearchObjectOptions.qAttributes. It will be qProperty for SearchObjectOptions.
- qValuestring
String corresponding to qKey for the current SearchGroupItemMatch. For example, if the match is Make by Price found in the title of a generic object, qValue will be qMetaDef/title.
-
-
- qSearchTermsMatchedarray of integers
Indexes of the search terms that are included in the group item. These search terms are related to the list of terms defined in SearchResult.qSearchTerms .
- qMatchTypestring
Can be one of: "FieldMatchNone""FieldMatchSubString""FieldMatchWord""FieldMatchExact""FieldMatchLast"
-
-
-
Errors
arraySearchObjects(qOptions, qTerms, qPage)
const result = await doc.SearchObjects([
{
"qAttributes": [
"value"
],
"qCharEncoding": "Utf8"
},
[
"value"
],
{
"qOffset": 123,
"qCount": 123,
"qMaxNbrFieldMatches": -1,
"qGroupOptions": [
{
"qGroupType": "DatasetType",
"qOffset": 123,
"qCount": -1
}
],
"qGroupItemOptions": [
{
"qGroupItemType": "Field",
"qOffset": 123,
"qCount": -1
}
]
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SearchObjects",
"params": {
"qOptions": {
"qAttributes": [
"value"
],
"qCharEncoding": "Utf8"
},
"qTerms": [
"value"
],
"qPage": {
"qOffset": 123,
"qCount": 123,
"qMaxNbrFieldMatches": -1,
"qGroupOptions": [
{
"qGroupType": "DatasetType",
"qOffset": 123,
"qCount": -1
}
],
"qGroupItemOptions": [
{
"qGroupItemType": "Field",
"qOffset": 123,
"qCount": -1
}
]
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qResult": {
"qSearchTerms": [
"value"
],
"qTotalNumberOfGroups": 123,
"qSearchGroupArray": [
{
"qId": 123,
"qGroupType": "DatasetType",
"qSearchTermsMatched": [
123
],
"qTotalNumberOfItems": 123,
"qItems": [
{
"qItemType": "Field",
"qTotalNumberOfMatches": 123,
"qIdentifier": "value",
"qItemMatches": [
{
"qText": "value",
"qFieldSelectionMode": "OneAndOnlyOne",
"qRanges": [
{
"qCharPos": 123,
"qCharCount": 123,
"qTerm": 123
}
],
"qAttributes": [
{
"qKey": "value",
"qValue": "value"
}
]
}
],
"qSearchTermsMatched": [
123
],
"qMatchType": "FieldMatchNone"
}
]
}
]
}
}
}
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
- qOptionsobjectRequired
Information about the search combinations.
qOptions properties
- qSearchFieldsarray of strings
List of the search fields. If empty, the search is performed in all fields of the app.
- qContextstring
Can be one of: "Cleared""LockedFieldsOnly""CurrentSelections"
- qCharEncodingstring
Can be one of: "Utf8""Utf16"
- qAttributesarray of strings
Optional.
- For SearchSuggest method, this array is empty.
- For SearchObjects method, this array is empty or contain qProperty .
- For SearchResults method, this array is empty, or contains qNum and/or qElemNum . It allows the user to request details in the outputted SearchGroupItemMatch . For more information, see SearchGroupItemMatch.
-
- qTermsarray of stringsRequired
Terms to search for.
- qPageobjectRequired
Array of pages to retrieve.
qPage properties
- qOffsetinteger
Position from the top, starting from 0. If the offset is set to 0, the first search result to be returned is at position 0.
- qCountinteger
Number of search groups to return (in qSearchGroupArray ).
- qMaxNbrFieldMatchesinteger
Maximum number of matching values to return per search result. The default value is -1; all values are returned. This property is to be used with the SearchAssociations method.
- qGroupOptionsarray of objects
Options of the search groups. If this property is not set, all values are returned. This property is to be used with the SearchResults method or the SearchObjects method.
qGroupOptions properties
- qGroupTypestring
Can be one of: "DatasetType""GenericObjectsType"
- qOffsetinteger
Position starting from 0. The default value is 0.
- qCountinteger
Maximum number of items per group (in qItems[ ] ). The default value is -1; all values are returned.
-
- qGroupItemOptionsarray of objects
Options of the search group items. If this property is not set, all values are returned. This property is to be used with the SearchResults method or the SearchObjects method.
qGroupItemOptions properties
- qGroupItemTypestring
Can be one of: "Field""GenericObject"
- qOffsetinteger
Position starting from 0. The default value is 0.
- qCountinteger
Maximum number of matches per item (in qItemMatches[ ] ). The default value is -1: all values are returned.
-
-
Response
- qResultobject
qResult properties
- qSearchTermsarray of strings
List of the search terms.
- qTotalNumberOfGroupsinteger
Total number of groups.
- qSearchGroupArrayarray of objects
List of search groups. The groups are numbered from the value of SearchPage.qOffset to the value of SearchPage.qOffset + SearchPage.qCount .
qSearchGroupArray properties
- qIdinteger
Identifier of the search group.
- qGroupTypestring
Can be one of: "DatasetType""GenericObjectsType"
- qSearchTermsMatchedarray of integers
Indexes of the search terms that are included in the group. These search terms are related to the list of terms defined in SearchResult.qSearchTerms .
- qTotalNumberOfItemsinteger
Total number of distinct items in the search group.
- qItemsarray of objects
List of items in the search group. The group items are numbered from the value of SearchGroupOptions.qOffset to the value of SearchGroupOptions.qOffset + SearchGroupOptions.qCount
qItems properties
- qItemTypestring
Can be one of: "Field""GenericObject"
- qTotalNumberOfMatchesinteger
Total number of distinct matches in the search group item.
- qIdentifierstring
Identifier of the item. It corresponds to:
- The name of the field, if the type of the search group is data set.
- The id of the generic object if the type of the search group is generic object.
- qItemMatchesarray of objects
List of matches in the search group item. The group item matches are numbered from the value of SearchGroupItemOptions.qOffset to the value of SearchGroupItemOptions.qOffset + SearchGroupItemOptions.qCount .
qItemMatches properties
- qTextstring
Search match value. Value of the search group item. If the match is found in a field, it corresponds to the value of the field. If the match is found in a generic object property, it corresponds to the property value.
- qFieldSelectionModestring
Can be one of: "OneAndOnlyOne"
- qRangesarray of objects
List of ranges. For example, if the search terms are Price and Make, and the search group item value is Make by Price vs Mileage, then there are two ranges: one for Price and one for Make.
qRanges properties
- qCharPosinteger
Starting position of the match in the search result, starting from 0.
- qCharCountinteger
Length of the match in the search result.
- qTerminteger
Position of the term in the list of search terms, starting from 0.
-
- qAttributesarray of objects
Provides detail of the match as requested by the user in SearchObjectsOptions.qAttributes or SearchCombinationOptions.qAttributes If the user requests SearchObjects or SearchResults with an empty qAttributes option, the outputted qAttributes is returned empty. For SearchObjects requested with qProperty , the SearchGroupItemMatch.qAttributes return value contains [“qProperty”, "qMetaDef/title”] if the match has been found in the title of the item. For dimension values, the returned qProperty will be “*” . For SearchResults requested with qNum , the SearchGroupItemMatch.qAttributes return value contains ["qNum", N] where N is the numeric value of the element or NaN if the value is not numeric. For SearchResults requested with qElemNum , the SearchGroupItemMatch.qAttributes return value contains ["qElemNum", N] where N is the value index of the element.
qAttributes properties
- qKeystring
String corresponding to SearchObjectOptions.qAttributes. It will be qProperty for SearchObjectOptions.
- qValuestring
String corresponding to qKey for the current SearchGroupItemMatch. For example, if the match is Make by Price found in the title of a generic object, qValue will be qMetaDef/title.
-
-
- qSearchTermsMatchedarray of integers
Indexes of the search terms that are included in the group item. These search terms are related to the list of terms defined in SearchResult.qSearchTerms .
- qMatchTypestring
Can be one of: "FieldMatchNone""FieldMatchSubString""FieldMatchWord""FieldMatchExact""FieldMatchLast"
-
-
-
Errors
arraySearchResults(qOptions, qTerms, qPage)
const result = await doc.SearchResults([
{
"qSearchFields": [
"value"
],
"qContext": "Cleared",
"qCharEncoding": "Utf8",
"qAttributes": [
"value"
]
},
[
"value"
],
{
"qOffset": 123,
"qCount": 123,
"qMaxNbrFieldMatches": -1,
"qGroupOptions": [
{
"qGroupType": "DatasetType",
"qOffset": 123,
"qCount": -1
}
],
"qGroupItemOptions": [
{
"qGroupItemType": "Field",
"qOffset": 123,
"qCount": -1
}
]
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SearchResults",
"params": {
"qOptions": {
"qSearchFields": [
"value"
],
"qContext": "Cleared",
"qCharEncoding": "Utf8",
"qAttributes": [
"value"
]
},
"qTerms": [
"value"
],
"qPage": {
"qOffset": 123,
"qCount": 123,
"qMaxNbrFieldMatches": -1,
"qGroupOptions": [
{
"qGroupType": "DatasetType",
"qOffset": 123,
"qCount": -1
}
],
"qGroupItemOptions": [
{
"qGroupItemType": "Field",
"qOffset": 123,
"qCount": -1
}
]
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qResult": {
"qSearchTerms": [
"value"
],
"qTotalNumberOfGroups": 123,
"qSearchGroupArray": [
{
"qId": 123,
"qGroupType": "DatasetType",
"qSearchTermsMatched": [
123
],
"qTotalNumberOfItems": 123,
"qItems": [
{
"qItemType": "Field",
"qTotalNumberOfMatches": 123,
"qIdentifier": "value",
"qItemMatches": [
{
"qText": "value",
"qFieldSelectionMode": "OneAndOnlyOne",
"qRanges": [
{
"qCharPos": 123,
"qCharCount": 123,
"qTerm": 123
}
],
"qAttributes": [
{
"qKey": "value",
"qValue": "value"
}
]
}
],
"qSearchTermsMatched": [
123
],
"qMatchType": "FieldMatchNone"
}
]
}
]
}
}
}
Returns search terms suggestions.
Parameters
- qOptionsobjectRequired
Information about the search combinations.
qOptions properties
- qSearchFieldsarray of strings
List of the search fields. If empty, the search is performed in all fields of the app.
- qContextstring
Can be one of: "Cleared""LockedFieldsOnly""CurrentSelections"
- qCharEncodingstring
Can be one of: "Utf8""Utf16"
- qAttributesarray of strings
Optional.
- For SearchSuggest method, this array is empty.
- For SearchObjects method, this array is empty or contain qProperty .
- For SearchResults method, this array is empty, or contains qNum and/or qElemNum . It allows the user to request details in the outputted SearchGroupItemMatch . For more information, see SearchGroupItemMatch.
-
- qTermsarray of stringsRequired
Terms to search for.
Response
- qResultobject
qResult properties
- qSuggestionsarray of objects
List of suggestions.
qSuggestions properties
- qValuestring
Value of the suggestion.
- qTerminteger
Index of the suggestion value. The indexing starts from 0 and from the left.
-
- qFieldNamesarray of strings
List of field names that contain search hits.
-
Errors
arraySearchSuggest(qOptions, qTerms)
const result = await doc.SearchSuggest([
{
"qSearchFields": [
"value"
],
"qContext": "Cleared",
"qCharEncoding": "Utf8",
"qAttributes": [
"value"
]
},
[
"value"
]
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SearchSuggest",
"params": {
"qOptions": {
"qSearchFields": [
"value"
],
"qContext": "Cleared",
"qCharEncoding": "Utf8",
"qAttributes": [
"value"
]
},
"qTerms": [
"value"
]
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qResult": {
"qSuggestions": [
{
"qValue": "value",
"qTerm": 123
}
],
"qFieldNames": [
"value"
]
}
}
}
Parameters
- qOptionsobjectRequiredExperimental
qOptions properties
- qSearchFieldsarray of strings
List of the search fields. If empty, the search is performed in all fields of the app.
-
- qTermsarray of stringsRequired
- qPageobjectRequiredExperimental
qPage properties
- qOffsetinteger
Position from the top, starting from 0. If the offset is set to 0, the first search result to be returned is at position 0.
- qCountinteger
Number of search fields to return
- qMaxNbrFieldMatchesinteger
Maximum number of matching values to return per search result.
-
Response
- qResultobjectExperimental
qResult properties
- qSearchTermsarray of strings
List of the search terms.
- qFieldMatchesarray of objectsExperimental
List of search groups. The groups are numbered from the value of SearchPage.qOffset to the value of SearchPage.qOffset + SearchPage.qCount .
qFieldMatches properties
- qFieldNamestring
Field name of matches.
- qValuesarray of objectsExperimental
List of search matches.
qValues properties
- qTextstring
- qElemNointeger
- qSearchTermsMatchedarray of integers
-
-
-
Errors
arraySearchValues(qOptions, qTerms, qPage)
const result = await doc.SearchValues([
{
"qSearchFields": [
"value"
]
},
[
"value"
],
{
"qOffset": 123,
"qCount": 123,
"qMaxNbrFieldMatches": -1
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SearchValues",
"params": {
"qOptions": {
"qSearchFields": [
"value"
]
},
"qTerms": [
"value"
],
"qPage": {
"qOffset": 123,
"qCount": 123,
"qMaxNbrFieldMatches": -1
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qResult": {
"qSearchTerms": [
"value"
],
"qFieldMatches": [
{
"qFieldName": "value",
"qValues": [
{
"qText": "value",
"qElemNo": 123,
"qSearchTermsMatched": [
123
]
}
]
}
]
}
}
}
Selects all search hits for a specified group. The results depend on the search context. SearchCombinationOptions.
Parameters
- qOptionsobjectRequired
Information about the search fields and the search context.
qOptions properties
- qSearchFieldsarray of strings
List of the search fields. If empty, the search is performed in all fields of the app.
- qContextstring
Can be one of: "Cleared""LockedFieldsOnly""CurrentSelections"
- qCharEncodingstring
Can be one of: "Utf8""Utf16"
- qAttributesarray of strings
Optional.
- For SearchSuggest method, this array is empty.
- For SearchObjects method, this array is empty or contain qProperty .
- For SearchResults method, this array is empty, or contains qNum and/or qElemNum . It allows the user to request details in the outputted SearchGroupItemMatch . For more information, see SearchGroupItemMatch.
-
- qTermsarray of stringsRequired
List of terms to search for.
- qMatchIxintegerRequired
Index (value of qId ) of the search result to select.
- qSoftLockboolean
This parameter is deprecated and should not be set.
Response
objectErrors
arraySelectAssociations(qOptions, qTerms, qMatchIx, qSoftLock?)
const result = await doc.SelectAssociations([
{
"qSearchFields": [
"value"
],
"qContext": "Cleared",
"qCharEncoding": "Utf8",
"qAttributes": [
"value"
]
},
[
"value"
],
123,
true
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SelectAssociations",
"params": {
"qOptions": {
"qSearchFields": [
"value"
],
"qContext": "Cleared",
"qCharEncoding": "Utf8",
"qAttributes": [
"value"
]
},
"qTerms": [
"value"
],
"qMatchIx": 123,
"qSoftLock": true
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Doc SendGenericCommandToCustomConnector
(qProvider, qCommand, qMethod, qParameters, qAppendConnection)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
- qProviderstringRequired
Connector file name. Command to be executed by the connector.
- qCommandstringRequired
One of:
- JsonRequest
- GetCustomCaption
- IsConnected
- DisableQlikViewSelectButton
- HaveStarField
- qMethodstringRequired
Method name to be used within the command. The available methods depend on the chosen connector.
- qParametersarray of stringsRequired
Parameters of the command. No parameters are required.
- qAppendConnectionstringRequired
Name of the connection.
Response
- qResultstring
Errors
arraySendGenericCommandToCustomConnector(qProvider, qCommand, qMethod, qParameters, qAppendConnection)
const result = await doc.SendGenericCommandToCustomConnector([
"value",
"value",
"value",
[
"value"
],
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SendGenericCommandToCustomConnector",
"params": {
"qProvider": "value",
"qCommand": "value",
"qMethod": "value",
"qParameters": [
"value"
],
"qAppendConnection": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qResult": "value"
}
}
Sets properties to an app.
Parameters
- qPropobjectRequired
Information about the properties of an app.
qProp properties
- qTitlestring
App title.
- qLastReloadTimestring
Last reload time of the app.
- qMigrationHashstring
Internal property reserved for app migration. Patch version of the app. Do not update.
- qSavedInProductVersionstring
Internal property reserved for app migration. The app is saved in this version of the product. Do not update.
- qThumbnailobjectIn addition, this structure can contain dynamic properties.
qThumbnail properties
- qUrlstring
Relative path of the thumbnail.
-
- qHasSectionAccessboolean
If true the app has section access configured.
- qUsagestring
Can be one of: "ANALYTICS""DATA_PREPARATION""DATAFLOW_PREP""SINGLE_TABLE_PREP"
-
Response
objectErrors
arraySetAppProperties(qProp)
const result = await doc.SetAppProperties([
{
"qTitle": "value",
"qLastReloadTime": "value",
"qMigrationHash": "value",
"qSavedInProductVersion": "value",
"qThumbnail": {
"qUrl": "value"
},
"qHasSectionAccess": true,
"qUsage": "ANALYTICS"
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SetAppProperties",
"params": {
"qProp": {
"qTitle": "value",
"qLastReloadTime": "value",
"qMigrationHash": "value",
"qSavedInProductVersion": "value",
"qThumbnail": {
"qUrl": "value"
},
"qHasSectionAccess": true,
"qUsage": "ANALYTICS"
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Set some variables as favorite.
Parameters
- qNamesarray of stringsRequired
Variables to set as favorite.
Response
objectErrors
arraySetFavoriteVariables(qNames)
const result = await doc.SetFavoriteVariables([
[
"value"
]
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SetFavoriteVariables",
"params": {
"qNames": [
"value"
]
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Limits the number of rows of data to load from a data source. This method works when reloading in debug mode.
Parameters
- qLimitintegerRequired
Fetch limit. Number of rows to load.
Response
objectErrors
arraySetFetchLimit(qLimit)
const result = await doc.SetFetchLimit([
123
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SetFetchLimit",
"params": {
"qLimit": 123
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
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.
Parameters
- qvarray of integersRequired
The list of table states to set. A state will not be changed if already set to 2.
Response
- qReturnboolean
Errors
arraySetLooselyCoupledVector(qv)
const result = await doc.SetLooselyCoupledVector([
[
123
]
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SetLooselyCoupledVector",
"params": {
"qv": [
123
]
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": true
}
}
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
- qProhibitbooleanRequired
True or false.
Response
objectErrors
arraySetProhibitBinaryLoad(qProhibit)
const result = await doc.SetProhibitBinaryLoad([
true
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SetProhibitBinaryLoad",
"params": {
"qProhibit": true
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Sets values in script.
Parameters
- qScriptstringRequired
Script content.
Response
objectErrors
arraySetScript(qScript)
const result = await doc.SetScript([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SetScript",
"params": {
"qScript": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Set some breakpoints in the script of an app.
Parameters
- qBreakpointsarray of objectsRequired
Information about the breakpoints.
qBreakpoints properties
- qbufferNamestring
Name of the breakpoint.
- qlineIxinteger
Line number in the script where the breakpoint is set.
- qEnabledboolean
If set to true then the breakpoint is enabled (in use).
-
Response
objectErrors
arraySetScriptBreakpoints(qBreakpoints)
const result = await doc.SetScriptBreakpoints([
[
{
"qbufferName": "value",
"qlineIx": 123,
"qEnabled": true
}
]
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SetScriptBreakpoints",
"params": {
"qBreakpoints": [
{
"qbufferName": "value",
"qlineIx": 123,
"qEnabled": true
}
]
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Sets the positions of the tables in the data model viewer.
Parameters
- qInfoobjectRequired
Information about the table.
qInfo properties
- qPosobject
qPos properties
- qLeftinteger
Position from the left. Corresponds to the first column.
- qTopinteger
Position from the top. Corresponds to the first row.
- qWidthinteger
Number of columns in the page. The indexing of the columns may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).
- qHeightinteger
Number of rows or elements in the page. The indexing of the rows may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).
-
- qCtlInfoobject
qCtlInfo properties
- qInternalViewobject
qInternalView properties
- qTablesarray of objects
List of the tables in the database model viewer.
qTables properties
- qPosobject
qPos properties
- qLeftinteger
Position from the left. Corresponds to the first column.
- qTopinteger
Position from the top. Corresponds to the first row.
- qWidthinteger
Number of columns in the page. The indexing of the columns may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).
- qHeightinteger
Number of rows or elements in the page. The indexing of the rows may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).
-
- qCaptionstring
Table name.
-
- qBroomPointsarray of objects
List of the broom points in the database model viewer. Not used in Qlik Sense.
qBroomPoints properties
- qPosobject
qPos properties
- qxinteger
x-coordinate in pixels. The origin is the top left of the screen.
- qyinteger
y-coordinate in pixels. The origin is the top left of the screen.
-
- qTablestring
Name of the table.
- qFieldsarray of strings
List of fields in the table.
-
- qConnectionPointsarray of objects
List of connection points in the database model viewer. Not used in Qlik Sense.
qConnectionPoints properties
- qPosobject
qPos properties
- qxinteger
x-coordinate in pixels. The origin is the top left of the screen.
- qyinteger
y-coordinate in pixels. The origin is the top left of the screen.
-
- qFieldsarray of strings
List of the fields in the table.
-
- qZoomFactornumber
Zoom factor in the database model viewer. The default value is 1.0.
-
- qSourceViewobject
qSourceView properties
- qTablesarray of objects
List of the tables in the database model viewer.
qTables properties
- qPosobject
qPos properties
- qLeftinteger
Position from the left. Corresponds to the first column.
- qTopinteger
Position from the top. Corresponds to the first row.
- qWidthinteger
Number of columns in the page. The indexing of the columns may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).
- qHeightinteger
Number of rows or elements in the page. The indexing of the rows may vary depending on whether the cells are expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef ).
-
- qCaptionstring
Table name.
-
- qBroomPointsarray of objects
List of the broom points in the database model viewer. Not used in Qlik Sense.
qBroomPoints properties
- qPosobject
qPos properties
- qxinteger
x-coordinate in pixels. The origin is the top left of the screen.
- qyinteger
y-coordinate in pixels. The origin is the top left of the screen.
-
- qTablestring
Name of the table.
- qFieldsarray of strings
List of fields in the table.
-
- qConnectionPointsarray of objects
List of connection points in the database model viewer. Not used in Qlik Sense.
qConnectionPoints properties
- qPosobject
qPos properties
- qxinteger
x-coordinate in pixels. The origin is the top left of the screen.
- qyinteger
y-coordinate in pixels. The origin is the top left of the screen.
-
- qFieldsarray of strings
List of the fields in the table.
-
- qZoomFactornumber
Zoom factor in the database model viewer. The default value is 1.0.
-
-
- qModeinteger
View mode to display when opening Qlik Sense data model viewer. One of:
- 0 for internal view mode.
- 1 for source view mode.
-
Response
objectErrors
arraySetViewDlgSaveInfo(qInfo)
const result = await doc.SetViewDlgSaveInfo([
{
"qPos": {
"qLeft": 123,
"qTop": 123,
"qWidth": 123,
"qHeight": 123
},
"qCtlInfo": {
"qInternalView": {
"qTables": [
{
"qPos": {
"qLeft": 123,
"qTop": 123,
"qWidth": 123,
"qHeight": 123
},
"qCaption": "value"
}
],
"qBroomPoints": [
{
"qPos": {
"qx": 123,
"qy": 123
},
"qTable": "value",
"qFields": [
"value"
]
}
],
"qConnectionPoints": [
{
"qPos": {
"qx": 123,
"qy": 123
},
"qFields": [
"value"
]
}
],
"qZoomFactor": 1
},
"qSourceView": {
"qTables": [
{
"qPos": {
"qLeft": 123,
"qTop": 123,
"qWidth": 123,
"qHeight": 123
},
"qCaption": "value"
}
],
"qBroomPoints": [
{
"qPos": {
"qx": 123,
"qy": 123
},
"qTable": "value",
"qFields": [
"value"
]
}
],
"qConnectionPoints": [
{
"qPos": {
"qx": 123,
"qy": 123
},
"qFields": [
"value"
]
}
],
"qZoomFactor": 1
}
},
"qMode": 123
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "SetViewDlgSaveInfo",
"params": {
"qInfo": {
"qPos": {
"qLeft": 123,
"qTop": 123,
"qWidth": 123,
"qHeight": 123
},
"qCtlInfo": {
"qInternalView": {
"qTables": [
{
"qPos": {
"qLeft": 123,
"qTop": 123,
"qWidth": 123,
"qHeight": 123
},
"qCaption": "value"
}
],
"qBroomPoints": [
{
"qPos": {
"qx": 123,
"qy": 123
},
"qTable": "value",
"qFields": [
"value"
]
}
],
"qConnectionPoints": [
{
"qPos": {
"qx": 123,
"qy": 123
},
"qFields": [
"value"
]
}
],
"qZoomFactor": 1
},
"qSourceView": {
"qTables": [
{
"qPos": {
"qLeft": 123,
"qTop": 123,
"qWidth": 123,
"qHeight": 123
},
"qCaption": "value"
}
],
"qBroomPoints": [
{
"qPos": {
"qx": 123,
"qy": 123
},
"qTable": "value",
"qFields": [
"value"
]
}
],
"qConnectionPoints": [
{
"qPos": {
"qx": 123,
"qy": 123
},
"qFields": [
"value"
]
}
],
"qZoomFactor": 1
}
},
"qMode": 123
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}
Store current selection state temporarily.
Parameters
- qTTLOfTempStateinteger
Time to live in seconds for stored selection state
Response
- qIdstring
- qReturnboolean
Errors
arrayStoreTempSelectionState(qTTLOfTempState?)
const result = await doc.StoreTempSelectionState([
123
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "StoreTempSelectionState",
"params": {
"qTTLOfTempState": 123
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qId": "value",
"qReturn": true
}
}
Transform current app into an instance of the targeted mode
Parameters
- qDstParametersobjectRequired
Attributes that should be set in the new app.
qDstParameters properties
- qNamestring
The name (title) of the application
- qSpaceIdstring
ID of the space where the app is to be created. Empty value implies Personal space
- qScriptParameterPrefixstring
Prefix to be used on inserted ScriptParameters, only applicable for template apps
-
Response
- qResultobject
qResult properties
- qAppIdstring
ID of created App
-
Errors
arrayTransformApp(qDstParameters)
const result = await doc.TransformApp([
{
"qName": "value",
"qSpaceId": "value",
"qScriptParameterPrefix": "value"
}
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "TransformApp",
"params": {
"qDstParameters": {
"qName": "value",
"qSpaceId": "value",
"qScriptParameterPrefix": "value"
}
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qResult": {
"qAppId": "value"
}
}
}
Undoes the previous operation.
Response
- qSuccessboolean
Errors
arrayUndo()
const result = await doc.Undo({})
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "Undo"
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qSuccess": true
}
}
Unlocks all selections in fields for current state.
Parameters
- qStateNamestring
Alternate state name. When set, applies to alternate state instead of current.
Response
objectErrors
arrayUnlockAll(qStateName?)
const result = await doc.UnlockAll([
"value"
])
Request
{
"jsonrpc": "2.0",
"id": 1,
"handle": 3,
"method": "UnlockAll",
"params": {
"qStateName": "value"
}
}
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {}
}