Qlik Sense Engine (qix)
GenericBookmark
Applies a bookmark.
Response
- qSuccess boolean
Errors
arrayApply()
const result = await genericBookmark.apply()Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "Apply"}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qSuccess": true }}Applies a bookmark and verify result dataset against originally selected values.
Response
- qResult objectExperimental
qResult properties
- qApplySuccess boolean
Apply successfully or not *
- qWarnings array of objectsExperimental
Field values verfication result *
qWarnings properties
- qState string
Alternate State *
- qField string
Field Name *
- qVerifyResult string
Can be one of: "NOT_VERIFIED""FIELD_VALUE_MATCH_ALL""FIELD_MISSING""FIELD_VALUE_MISSING""STATE_MISSING""SEARCH_NO_MATCH"
- qMissingValues array of strings Deprecated
Strings representing missing field values. Will be replaced by MissingDuals. *
- qMissingDuals array of objectsExperimental
Missing field values as duals, carrying both text and numeric parts. Number of values included is capped. Default cap is 20. *
qMissingDuals properties
- qText string
Text related to the field value. This parameter is optional.
- qIsNumeric boolean
Is set to true if the value is a numeric. This parameter is optional. Default is false.
- qNumber number
Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. This parameter is optional.
-
- qTotalMissing integerExperimental
Total count of missing field values *
-
- qGroupStateResult objectExperimental
Result of applying GroupState to multiple cyclic groups.
qGroupStateResult properties
- qApplySuccess boolean
When true, the operation was successful.
- qWarnings array of objectsExperimental
Lists which states failed to be applied and why.
qWarnings properties
- qState objectExperimental
qState properties
- qInfo object
qInfo properties
- qId string
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qType string
Type of the object. This parameter is mandatory.
-
- qActiveFieldDef string
String defining the active field.
-
- qType string
Can be one of: "group_missing""group_not_applicable""fielddef_missing"
-
-
-
Errors
arrayApplyAndVerify()
const result = await genericBookmark.applyAndVerify()Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "ApplyAndVerify"}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qResult": { "qApplySuccess": true, "qWarnings": [ { "qState": "value", "qField": "value", "qVerifyResult": "NOT_VERIFIED", "qMissingValues": [ "value" ], "qMissingDuals": [ { "qText": "value", "qIsNumeric": true, "qNumber": 123 } ], "qTotalMissing": 123 } ], "qGroupStateResult": { "qApplySuccess": true, "qWarnings": [ { "qState": { "qInfo": { "qId": "value", "qType": "value" }, "qActiveFieldDef": "value" }, "qType": "group_missing" } ] } } }}Applies a patch to the properties of an object. Allows an update to some of the properties. It should not be possible to patch "/qInfo/qId", and it will be forbidden in the near future.
Parameters
- qPatches array of objectsRequired
Array of patches.
qPatches properties
- qOp string
Can be one of: "add""remove""replace"
- qPath string
Path to the property to add, remove or replace.
- qValue string
This parameter is not used in a remove operation. Corresponds to the value of the property to add or to the new value of the property to update. Examples: "false", "2", ""New title""
-
Response
objectErrors
arrayApplyPatches(qPatches)
const result = await genericBookmark.applyPatches([ { "qOp": "add", "qPath": "value", "qValue": "value" }])Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "ApplyPatches", "params": { "qPatches": [ { "qOp": "add", "qPath": "value", "qValue": "value" } ] }}Response
{ "jsonrpc": "2.0", "id": 1, "result": {}}Adds the generic bookmark to the list of approved objects
Response
objectErrors
arrayApprove()
const result = await genericBookmark.approve()Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "Approve"}Response
{ "jsonrpc": "2.0", "id": 1, "result": {}}Retrieves the values of a field for the default state.
Fieldvalue
| Name | Description | Type |
|---|---|---|
| qText | Text related to the field value. | String |
| qIsNumeric | Is set to true if the value is a numeric. Default is false. |
Boolean |
| qNumber | Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. |
Double |
Parameters
- qField stringRequired
Name of the field.
- qGetExcludedValues booleanRequired
If set to true, only NOT-selected values are returned.
- qDataPage objectRequired
Range of returned values.
qDataPage properties
- qStartIndex integer
The start value of the range.
- qEndIndex integer
The end value of the range.
-
Response
- qFieldValues array of objects
qFieldValues properties
- qText string
Text related to the field value. This parameter is optional.
- qIsNumeric boolean
Is set to true if the value is a numeric. This parameter is optional. Default is false.
- qNumber number
Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. This parameter is optional.
-
Errors
arrayGetFieldValues(qField, qGetExcludedValues, qDataPage)
const result = await genericBookmark.getFieldValues("value", true, { "qStartIndex": 123, "qEndIndex": 123})Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "GetFieldValues", "params": { "qField": "value", "qGetExcludedValues": true, "qDataPage": { "qStartIndex": 123, "qEndIndex": 123 } }}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qFieldValues": [ { "qText": "value", "qIsNumeric": true, "qNumber": 123 } ] }}Retrieves the values of a field per state.
Fieldvalue
| Name | Description | Type |
|---|---|---|
| qText | Text related to the field value. | String |
| qIsNumeric | Is set to true if the value is a numeric. Default is false. |
Boolean |
| qNumber | Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. |
Double |
Parameters
- qField stringRequired
Name of the field.
- qGetExcludedValues booleanRequired
When to true, only NOT-selected values are returned.
- qDataPages objectRequired
Range of returned values per state, an empty array will return the values of all states. Only one page without a state name returns the values for all states, using the start and end indices of the first page.
qDataPages properties
- qStatePages array of objects
Bookmark field pages for different states.
qStatePages properties
- qStateName string
The name of the selected state.
- qStartIndex integer
The start value of the range.
- qEndIndex integer
The end value of the range.
-
-
Response
- qFieldValues array of objects
qFieldValues properties
- qStateName string
Name of the state.
- qFieldValues array of objects
The field values associated with the state.
qFieldValues properties
- qText string
Text related to the field value. This parameter is optional.
- qIsNumeric boolean
Is set to true if the value is a numeric. This parameter is optional. Default is false.
- qNumber number
Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. This parameter is optional.
-
-
Errors
arrayGetFieldValuesEx(qField, qGetExcludedValues, qDataPages)
const result = await genericBookmark.getFieldValuesEx("value", true, { "qStatePages": [ { "qStateName": "$", "qStartIndex": 0, "qEndIndex": 0 } ]})Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "GetFieldValuesEx", "params": { "qField": "value", "qGetExcludedValues": true, "qDataPages": { "qStatePages": [ { "qStateName": "$", "qStartIndex": 0, "qEndIndex": 0 } ] } }}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qFieldValues": [ { "qStateName": "value", "qFieldValues": [ { "qText": "value", "qIsNumeric": true, "qNumber": 123 } ] } ] }}Returns:
- The type of the object.
- The identifier of the object.
Response
- qInfo object
qInfo properties
- qId string
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qType string
Type of the object. This parameter is mandatory.
-
Errors
arrayGetInfo()
const result = await genericBookmark.getInfo()Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "GetInfo"}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qInfo": { "qId": "value", "qType": "value" } }}Evaluates an object and displays its properties including the dynamic properties. If the member delta is set to true in the request object, only the delta is evaluated.
Response
- qLayout object
Is the layout for GenericBookmarkProperties.
qLayout properties
- qInfo object
qInfo properties
- qId string
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qType string
Type of the object. This parameter is mandatory.
-
- qMeta object
Layout for NxMetaDef.
qMeta properties
- qName string
Name. This property is optional.
-
- qBookmark object
qBookmark properties
- qStateData array of objects
List of selections for each state.
qStateData properties
- qStateName string
Name of the alternate state. Default is current selections: $
- qFieldItems array of objects
List of the selections.
qFieldItems properties
- qDef object
qDef properties
- qName string
Name of the field.
- qType string
Can be one of: "NOT_PRESENT""PRESENT""IS_CYCLIC_GROUP""IS_DRILL_GROUP""IS_VAR""IS_EXPR""IS_IMPLICIT""IS_DETAIL"
-
- qLocked boolean
Indicates if the field is locked. Default is false.
- qSelectInfo object
qSelectInfo properties
- qTextSearch string
Text search string. Everything that matches the text is selected. This parameter is optional.
- qRangeLo number
Lower value of the search range. This parameter is used when performing range selections or text searches in dimensions. Default is Null.
- qRangeHi number
Highest value of the search range. This parameter is used when performing range selections or text searches in dimensions. Default is Null.
- qNumberFormat object
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
- qType string
Can be one of: "U""A""I""R""F""M""D""T""TS""IV"
- qnDec integer
Number of decimals. Default is 10.
- qUseThou integer
Defines whether or not a thousands separator must be used. Default is 0.
- qFmt string
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.
- qDec string
Defines the decimal separator. Example: .
- qThou string
Defines the thousand separator (if any). Is used if qUseThou is set to 1. Example: ,
- qRangeInfo array of objects
This parameter is used when performing range selections or text searches in measures. Gives information about the range of selections.
qRangeInfo properties
- qRangeLo number
Lowest value in the range.
- qRangeHi number
Highest value in the range.
- qMeasure string
Label of the measure.
-
- qSoftLock boolean
Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.
- qContinuousRangeInfo array of objects
List of information about ranges for selections.
qContinuousRangeInfo properties
- qMin number
Lowest value in the range
- qMax number
Highest value in the range
- qMinInclEq boolean
If set to true, the range includes the lowest value in the range of selections (Equals to ). [bn(50500)] Example: The range is [1,10]. If qMinInclEq is set to true it means that 1 is included in the range of selections.
- qMaxInclEq boolean
If set to true, the range includes the highest value in the range of selections (Equals to ). [bn(50500)] Example: The range is [1,10]. If qMinInclEq is set to true it means that 10 is included in the range of selections.
-
- qSelectFieldSearch boolean
This parameter is true if the TextSearch is a result of a Select Field operation.
-
- qValues array of objects
qValues properties
- qText string
Text related to the field value. This parameter is optional.
- qIsNumeric boolean
Is set to true if the value is a numeric. This parameter is optional. Default is false.
- qNumber number
Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. This parameter is optional.
-
- qExcludedValues array of objects
List of excluded values. Either the list of selected values or the list of excluded values is displayed.
qExcludedValues properties
- qText string
Text related to the field value. This parameter is optional.
- qIsNumeric boolean
Is set to true if the value is a numeric. This parameter is optional. Default is false.
- qNumber number
Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. This parameter is optional.
-
- qAndMode boolean
If set to true, selections within a list object are made in AND mode; If you have a list object that lists all customers, by selecting Customer 1 and Customer 2 while in and-mode, all records that are associated with Customer 1 and Customer 2 are selected. The default value is false; selections within a list object are made in OR mode. If you have a list object that lists all customers, by selecting Customer 1 and Customer 2 while in or-mode, all records that are associated with either Customer 1 or Customer 2 are selected. This parameter is not returned if set to false.
- qOneAndOnlyOne boolean
If set to true, the field has always one selection (not 0 and not more than 1). If another value is selected, the previous one is unselected. The default value is false. This parameter is not returned if set to false.
- qValuesCount integer
Count of selected values. Indicates if the Values field is loaded.
- qExcludedValuesCount integer
Count of excluded values. Indicates if the ExcludedValues field is loaded.
-
-
- qUtcModifyTime number
Time when the bookmark was created.
- qVariableItems array of objects
List of the variables in the app at the time the bookmark was created.
qVariableItems properties
- qName string
Name of the variable.
- qValue object
qValue properties
- qText string
Text related to the field value. This parameter is optional.
- qIsNumeric boolean
Is set to true if the value is a numeric. This parameter is optional. Default is false.
- qNumber number
Numeric value of the field. This parameter is displayed if qIsNumeric is set to true. This parameter is optional.
-
- qDefinition string
The Reporting mode definition of the variable.
-
- qPatches array of objects
Softpatches to be applied with this bookmark.
qPatches properties
- qInfo object
qInfo properties
- qId string
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qType string
Type of the object. This parameter is mandatory.
-
- qPatches array of objects
Array with patches.
qPatches properties
- qOp string
Can be one of: "add""remove""replace"
- qPath string
Path to the property to add, remove or replace.
- qValue string
This parameter is not used in a remove operation. Corresponds to the value of the property to add or to the new value of the property to update. Examples: "false", "2", ""New title""
-
- qChildren array of undefineds
Array with child objects and their patches.
-
- qCyclicGroupStates array of objects
Information about cyclic groups by zero-based index. This field is unused.
qCyclicGroupStates properties
- qInfo object
qInfo properties
- qId string
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qType string
Type of the object. This parameter is mandatory.
-
- qActiveField integer
Active field of the cyclic group, identified by a zero-based index.
-
- qGroupStates array of objectsExperimental
Information about cyclic groups indexed by field definition.
qGroupStates properties
- qInfo object
qInfo properties
- qId string
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qType string
Type of the object. This parameter is mandatory.
-
- qActiveFieldDef string
String defining the active field.
-
-
- qFieldInfos array of objects
Information about the field selections associated with the bookmark.
qFieldInfos properties
- qFieldName string
The name of the field.
- qValuesCount integer
Number of selected values in the field.
- qExcludedValuesCount integer
Number of excluded values in the field.
-
-
Errors
arrayGetLayout()
const result = await genericBookmark.getLayout()Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "GetLayout"}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qLayout": { "qInfo": { "qId": "value", "qType": "value" }, "qMeta": { "qName": "value" }, "qBookmark": { "qStateData": [ { "qStateName": "value", "qFieldItems": [ { "qDef": { "qName": "value", "qType": "NOT_PRESENT" }, "qLocked": true, "qSelectInfo": { "qTextSearch": "value", "qRangeLo": -1e+300, "qRangeHi": -1e+300, "qNumberFormat": { "qType": "U", "qnDec": 10, "qUseThou": 0, "qFmt": "value", "qDec": "value", "qThou": "value" }, "qRangeInfo": [ { "qRangeLo": -1e+300, "qRangeHi": -1e+300, "qMeasure": "value" } ], "qSoftLock": false, "qContinuousRangeInfo": [ { "qMin": 123, "qMax": 123, "qMinInclEq": true, "qMaxInclEq": true } ], "qSelectFieldSearch": false }, "qValues": [ { "qText": "value", "qIsNumeric": true, "qNumber": 123 } ], "qExcludedValues": [ { "qText": "value", "qIsNumeric": true, "qNumber": 123 } ], "qAndMode": true, "qOneAndOnlyOne": true, "qValuesCount": -1, "qExcludedValuesCount": -1 } ] } ], "qUtcModifyTime": 123, "qVariableItems": [ { "qName": "value", "qValue": { "qText": "value", "qIsNumeric": true, "qNumber": 123 }, "qDefinition": "value" } ], "qPatches": [ { "qInfo": { "qId": "value", "qType": "value" }, "qPatches": [ { "qOp": "add", "qPath": "value", "qValue": "value" } ], "qChildren": [] } ], "qCyclicGroupStates": [ { "qInfo": { "qId": "value", "qType": "value" }, "qActiveField": 123 } ], "qGroupStates": [ { "qInfo": { "qId": "value", "qType": "value" }, "qActiveFieldDef": "value" } ] }, "qFieldInfos": [ { "qFieldName": "value", "qValuesCount": 123, "qExcludedValuesCount": 123 } ] } }}Shows the properties of an object.
Response
- qProp object
qProp properties
- qInfo object
qInfo properties
- qId string
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qType string
Type of the object. This parameter is mandatory.
-
- qMetaDef object
Used to collect metadata.
Properties
Semantic type with an empty structure.
- qIncludeVariables booleanExperimental
If true all variables will be stored in the bookmark.
- qDistinctValues booleanExperimental
If true all selected values will be stored distinct, i.e. searchstrings will not be kept.
-
Errors
arrayGetProperties()
const result = await genericBookmark.getProperties()Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "GetProperties"}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qProp": { "qInfo": { "qId": "value", "qType": "value" }, "qMetaDef": {}, "qIncludeVariables": false, "qDistinctValues": false } }}Returns a set analysis expression from a bookmark. Fields on the fly and calculated dimensions will not be included in the generated expression; instead a MISSING VALUES comment will be included within the expression.
Parameters
- qStateName string
Optional. The name of the state to get set analysis expression for. If left empty, the default state will be retrieved.
Response
- qSetExpression string
Errors
arrayGetSetAnalysis(qStateName?)
const result = await genericBookmark.getSetAnalysis("value")Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "GetSetAnalysis", "params": { "qStateName": "value" }}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qSetExpression": "value" }}Publishes a bookmark.
Response
objectErrors
arrayPublish()
const result = await genericBookmark.publish()Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "Publish"}Response
{ "jsonrpc": "2.0", "id": 1, "result": {}}Sets some properties for a bookmark.
Parameters
- qProp objectRequired
Information about the bookmark.
qProp properties
- qInfo object
qInfo properties
- qId string
Identifier of the object. If the chosen identifier is already in use, the engine automatically sets another one. If an identifier is not set, the engine automatically sets one. This parameter is optional.
- qType string
Type of the object. This parameter is mandatory.
-
- qMetaDef object
Used to collect metadata.
Properties
Semantic type with an empty structure.
- qIncludeVariables booleanExperimental
If true all variables will be stored in the bookmark.
- qDistinctValues booleanExperimental
If true all selected values will be stored distinct, i.e. searchstrings will not be kept.
-
Response
objectErrors
arraySetProperties(qProp)
const result = await genericBookmark.setProperties({ "qInfo": { "qId": "value", "qType": "value" }, "qMetaDef": {}, "qIncludeVariables": false, "qDistinctValues": false})Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "SetProperties", "params": { "qProp": { "qInfo": { "qId": "value", "qType": "value" }, "qMetaDef": {}, "qIncludeVariables": false, "qDistinctValues": false } }}Response
{ "jsonrpc": "2.0", "id": 1, "result": {}}Removes the generic bookmark from the list of approved objects
Response
objectErrors
arrayUnApprove()
const result = await genericBookmark.unApprove()Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "UnApprove"}Response
{ "jsonrpc": "2.0", "id": 1, "result": {}}Unpublishes a bookmark.
Response
objectErrors
arrayUnPublish()
const result = await genericBookmark.unPublish()Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "UnPublish"}Response
{ "jsonrpc": "2.0", "id": 1, "result": {}}