Qlik Sense Engine (qix)
Field
Clear()
const result = await field.clear()Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "Clear"}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": true }}Maintains the selections in the current field while clearing the selections in the other fields.
Parameters
- qSoftLock boolean
Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.
Response
- qReturn boolean
Errors
arrayClearAllButThis(qSoftLock?)
const result = await field.clearAllButThis(true)Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "ClearAllButThis", "params": { "qSoftLock": true }}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": true }}GetAndMode()
const result = await field.getAndMode()Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "GetAndMode"}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": true }}Retrieves the number of distinct values in a field.
Response
- qReturn integer
Errors
arrayGetCardinal()
const result = await field.getCardinal()Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "GetCardinal"}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": 123 }}Gets the properties of a field.
Response
- qProperties object
qProperties properties
- qOneAndOnlyOne boolean
This parameter is set to true, if 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 property _OneAndOnlyOne_ can be set to true if one and only value has been selected in the field prior to setting the property.
-
Errors
arrayGetNxProperties()
const result = await field.getNxProperties()Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "GetNxProperties"}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qProperties": { "qOneAndOnlyOne": true } }}Lock()
const result = await field.lock()Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "Lock"}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": true }}Selects some values in a field, by entering the element numbers related to the values to select.
Parameters
- qValues array of integersRequired
Indexes (or element numbers) of the values to select.
- qToggleMode booleanRequired
Set to true to keep any selections present in the list object. If this parameter is set to false, selections made before accepting the list object search become alternative.
- qSoftLock boolean
Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.
Response
- qReturn boolean
Errors
arrayLowLevelSelect(qValues, qToggleMode, qSoftLock?)
const result = await field.lowLevelSelect([ 123], true, true)Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "LowLevelSelect", "params": { "qValues": [ 123 ], "qToggleMode": true, "qSoftLock": true }}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": true }}Selects field values matching a search string.
Parameters
- qMatch stringRequired
String to search for. Can contain wild cards or numeric search criteria. The characters <>"~()='[] have pre-defined meanings when used at the start of the string. To use them, EnableSpecialCharacterEscapingInSearch needs to be enabled and the delimiter \ needs to precede the special character.
- qSoftLock boolean
Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.
- qExcludedValuesMode integer
Include excluded values in search.
Response
- qReturn boolean
Errors
arraySelect(qMatch, qSoftLock?, qExcludedValuesMode?)
const result = await field.select("value", true, 123)Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "Select", "params": { "qMatch": "value", "qSoftLock": true, "qExcludedValuesMode": 123 }}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": true }}Selects all values of a field. Excluded values are also selected.
Parameters
- qSoftLock boolean
Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.
Response
- qReturn boolean
Errors
arraySelectAll(qSoftLock?)
const result = await field.selectAll(true)Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "SelectAll", "params": { "qSoftLock": true }}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": true }}Selects all alternatives values in a specific field.
Parameters
- qSoftLock boolean
Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.
Response
- qReturn boolean
Errors
arraySelectAlternative(qSoftLock?)
const result = await field.selectAlternative(true)Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "SelectAlternative", "params": { "qSoftLock": true }}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": true }}Inverts the current selections.
Parameters
- qSoftLock boolean
Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.
Response
- qReturn boolean
Errors
arraySelectExcluded(qSoftLock?)
const result = await field.selectExcluded(true)Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "SelectExcluded", "params": { "qSoftLock": true }}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": true }}Selects all possible values in a specific field.
Parameters
- qSoftLock boolean
Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.
Response
- qReturn boolean
Errors
arraySelectPossible(qSoftLock?)
const result = await field.selectPossible(true)Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "SelectPossible", "params": { "qSoftLock": true }}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": true }}Selects some values in a field, by entering the values to select.
Parameters
- qFieldValues array of objectsRequired
List of the values to select.
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.
-
- qToggleMode boolean
The default value is false.
- qSoftLock boolean
Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.
Response
- qReturn boolean
Errors
arraySelectValues(qFieldValues, qToggleMode?, qSoftLock?)
const result = await field.selectValues([ { "qText": "value", "qIsNumeric": true, "qNumber": 123 }], true, true)Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "SelectValues", "params": { "qFieldValues": [ { "qText": "value", "qIsNumeric": true, "qNumber": 123 } ], "qToggleMode": true, "qSoftLock": true }}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": true }}Sets a field in the AND mode.
Parameters
- qAndMode booleanRequired
Specifies if the AND mode applies to the field. Set this parameter to true to enter the AND mode.
Response
objectErrors
arraySetAndMode(qAndMode)
const result = await field.setAndMode(true)Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "SetAndMode", "params": { "qAndMode": true }}Response
{ "jsonrpc": "2.0", "id": 1, "result": {}}Sets some properties to a field.
Parameters
- qProperties objectRequired
Information about the properties of the field.
qProperties properties
- qOneAndOnlyOne boolean
This parameter is set to true, if 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 property _OneAndOnlyOne_ can be set to true if one and only value has been selected in the field prior to setting the property.
-
Response
objectErrors
arraySetNxProperties(qProperties)
const result = await field.setNxProperties({ "qOneAndOnlyOne": true})Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "SetNxProperties", "params": { "qProperties": { "qOneAndOnlyOne": true } }}Response
{ "jsonrpc": "2.0", "id": 1, "result": {}}Toggle selects field values matching a search string.
Parameters
- qMatch stringRequired
String to search for. Can contain wild cards or numeric search criteria.
- qSoftLock boolean
Set to true to ignore locks; in that case, locked fields can be selected. The default value is false.
- qExcludedValuesMode integer
Include excluded values in search.
Response
- qReturn boolean
Errors
arrayToggleSelect(qMatch, qSoftLock?, qExcludedValuesMode?)
const result = await field.toggleSelect("value", true, 123)Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "ToggleSelect", "params": { "qMatch": "value", "qSoftLock": true, "qExcludedValuesMode": 123 }}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": true }}Unlocks all selected values of a specific field if the target (or handle ) is a field.
Response
- qReturn boolean
Errors
arrayUnlock()
const result = await field.unlock()Request
{ "jsonrpc": "2.0", "id": 1, "handle": 3, "method": "Unlock"}Response
{ "jsonrpc": "2.0", "id": 1, "result": { "qReturn": true }}