1. Create the list object LB01.The dimension is the field Country.
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": 3,
"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 is created and the handle is 2. All values are in optional state.
2. Get the handle of the field Country.
The client sends:
{
"jsonrpc": "2.0",
"id": 2,
"method": "GetField",
"handle": 1,
"params": [
"Country"
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"qReturn": {
"qType": "Field",
"qHandle": 3
}
}
}
The handle of the field Country is 3.
3. Select all values of the field Country.The handle of the request is 3 because the field has 3 as a handle.
The client sends:
{
"jsonrpc": "2.0",
"id": 3,
"method": "SelectAll",
"handle": 3,
"params": [
false
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"qReturn": true
},
"change": [
1,
3
]
}
The selections are successful.
4. Get the layout 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": 4,
"method": "GetLayout",
"handle": 2,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"qLayout": {
"qInfo": {
"qId": "LB01",
"qType": "ListObject"
},
"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,
"qSelectedExcluded": 0,
"qLockedExcluded": 0
},
"qTags": [
"$ascii",
"$text"
],
"qDimensionType": "D",
"qGrouping": "N",
"qNumFormat": {
"qType": "R",
"qnDec": 14,
"qUseThou": 1,
"qFmt": "##############",
"qDec": ".",
"qThou": ","
},
"qIsAutoFormat": true,
"qGroupFieldDefs": [
"Country"
]
},
"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"
}
]
],
"qTails": [],
"qArea": {
"qLeft": 0,
"qTop": 0,
"qWidth": 1,
"qHeight": 3
}
}
]
}
}
}
}
All values in the field Country are selected ("qCardinal" is 22 and "qSelected" is 22).