1. Create a list object with identifier (qId) LB01. The list object has one dimension (qFieldDefs): Country. The initial data fetch is composed of the first seven rows (qHeight is 7).
The client sends:
{
"jsonrpc": "2.0",
"id": 1,
"method": "CreateObject",
"handle": 1,
"params": [
{
"qInfo": {
"qId": "LB01",
"qType": "ListObject"
},
"qListObjectDef": {
"qStateName": "$",
"qLibraryId": "",
"qDef": {
"qFieldDefs": [
"Country"
],
"qFieldLabels": [
"Country Label"
],
"qSortCriterias": [
{
"qSortByLoadOrder": 1
}
]
},
"qInitialDataFetch": [
{
"qTop": 0,
"qLeft": 0,
"qHeight": 7,
"qWidth": 1
}
]
}
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "GenericObject",
"qHandle": 2
},
"qInfo": {
"qId": "LB01",
"qType": "ListObject"
}
},
"change": [
2
]
}
The list object LB01 is created and the handle of the object is 2.
2. Select all the values of the list object. The handle of the request is 2 because the handle of the list object is 2.
The client sends:
{
"jsonrpc": "2.0",
"id": 2,
"method": "SelectListObjectAll",
"handle": 2,
"params": [
"/qListObjectDef",
false
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"qSuccess": true
},
"change": [
2
]
}
The selections are successful.
3. Get the layout of the list object.
The client sends:
{
"jsonrpc": "2.0",
"id": 3,
"method": "GetLayout",
"handle": 2,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"qLayout": {
"qInfo": {
"qId": "LB01",
"qType": "ListObject"
},
"qMeta": {},
"qSelectionInfo": {},
"qListObject": {
"qStateName": "$",
"qSize": {
"qcx": 1,
"qcy": 22
},
"qDimensionInfo": {
"qFallbackTitle": "Country Label",
"qApprMaxGlyphCount": 14,
"qCardinal": 22,
"qSortIndicator": "A",
"qGroupFallbackTitles": [
"Country Label"
],
"qGroupPos": 0,
"qStateCounts": {
"qLocked": 0,
"qSelected": 22,
"qOption": 0,
"qDeselected": 0,
"qAlternative": 0,
"qExcluded": 0
},
"qTags": [
"$ascii",
"$text"
],
"qDimensionType": "D",
"qGrouping": "N"
},
"qExpressions": [],
"qDataPages": [
{
"qMatrix": [
[
{
"qText": "United States",
"qNum": "NaN",
"qElemNumber": 0,
"qState": "S"
}
],
[
{
"qText": "Denmark",
"qNum": "NaN",
"qElemNumber": 1,
"qState": "S"
}
],
[
{
"qText": "Spain",
"qNum": "NaN",
"qElemNumber": 2,
"qState": "S"
}
],
[
{
"qText": "Canada",
"qNum": "NaN",
"qElemNumber": 3,
"qState": "S"
}
],
[
{
"qText": "Netherlands",
"qNum": "NaN",
"qElemNumber": 4,
"qState": "S"
}
],
[
{
"qText": "Switzerland",
"qNum": "NaN",
"qElemNumber": 5,
"qState": "S"
}
],
[
{
"qText": "France",
"qNum": "NaN",
"qElemNumber": 6,
"qState": "S"
}
]
],
"qTails": [],
"qArea": {
"qLeft": 0,
"qTop": 0,
"qWidth": 1,
"qHeight": 7
}
}
]
}
}
}
}
All values are selected (qSelected is 22, qExcluded is 0). Values from the initial data fetch are all in selected state (qState is S).
4. Get the handle of the field Country.
The client sends:
{
"jsonrpc": "2.0",
"id": 4,
"method": "GetField",
"handle": 1,
"params": [
"Country"
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"qReturn": {
"qType": "Field",
"qHandle": 3
}
}
}
The handle of the field is 3.
5. Toggle select the values from the field Country, starting with the letter S. The handle of the request is 3 because the handle of the field is 3.
The client sends:
{
"jsonrpc": "2.0",
"id": 5,
"method": "ToggleSelect",
"handle": 3,
"params": [
"S*",
false,
0
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 5,
"result": {
"qReturn": true
},
"change": [
1,
2,
3
]
}
The toggle select operation is successful.
6. Get the layout of the list object.
The client sends:
{
"jsonrpc": "2.0",
"id": 6,
"method": "GetLayout",
"handle": 2,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 6,
"result": {
"qLayout": {
"qInfo": {
"qId": "LB01",
"qType": "ListObject"
},
"qMeta": {},
"qSelectionInfo": {},
"qListObject": {
"qStateName": "$",
"qSize": {
"qcx": 1,
"qcy": 22
},
"qDimensionInfo": {
"qFallbackTitle": "Country Label",
"qApprMaxGlyphCount": 14,
"qCardinal": 22,
"qSortIndicator": "A",
"qGroupFallbackTitles": [
"Country Label"
],
"qGroupPos": 0,
"qStateCounts": {
"qLocked": 0,
"qSelected": 18,
"qOption": 0,
"qDeselected": 0,
"qAlternative": 4,
"qExcluded": 0
},
"qTags": [
"$ascii",
"$text"
],
"qDimensionType": "D",
"qGrouping": "N"
},
"qExpressions": [],
"qDataPages": [
{
"qMatrix": [
[
{
"qText": "United States",
"qNum": "NaN",
"qElemNumber": 0,
"qState": "S"
}
],
[
{
"qText": "Denmark",
"qNum": "NaN",
"qElemNumber": 1,
"qState": "S"
}
],
[
{
"qText": "Spain",
"qNum": "NaN",
"qElemNumber": 2,
"qState": "X"
}
],
[
{
"qText": "Canada",
"qNum": "NaN",
"qElemNumber": 3,
"qState": "S"
}
],
[
{
"qText": "Netherlands",
"qNum": "NaN",
"qElemNumber": 4,
"qState": "S"
}
],
[
{
"qText": "Switzerland",
"qNum": "NaN",
"qElemNumber": 5,
"qState": "X"
}
],
[
{
"qText": "France",
"qNum": "NaN",
"qElemNumber": 6,
"qState": "S"
}
]
],
"qTails": [],
"qArea": {
"qLeft": 0,
"qTop": 0,
"qWidth": 1,
"qHeight": 7
}
}
]
}
}
}
}
The countries starting with the letter S are excluded (Spain,Switzerland). The other values are still in selected state.