Select all possible values of a list object
Select all possible values of a list object by using the SelectListObjectPossible method.
Example
1. Create the list object LB01.
The client sends:
{
"jsonrpc": "2.0",
"id": 2,
"method": "CreateChild",
"handle": 2,
"params": [
{
"qInfo": {
"qId": "LB01",
"qType": "ListObject"
},
"qListObjectDef": {
"qStateName": "$",
"qLibraryId": "",
"qDef": {
"qFieldDefs": [
"Country"
],
"qFieldLabels": [
"Country Label"
],
"qSortCriterias": [
{
"qSortByLoadOrder": 1
}
]
},
"qInitialDataFetch": [
{
"qTop": 0,
"qHeight": 5,
"qLeft": 0,
"qWidth": 1
}
],
"qShowAlternatives": true
},
"title": "A listbox",
"description": "Description of the listbox"
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"qReturn": {
"qType": "GenericObject",
"qHandle": 3
},
"qInfo": {
"qId": "LB01",
"qType": "ListObject"
}
},
"change": [
3
]
}
The list object is created and the handle is 3.
2. Get the layout of the list object. The handle is 3.
The client sends:
{
"jsonrpc": "2.0",
"id": 3,
"method": "GetLayout",
"handle": 3,
"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": 0,
"qOption": 22,
"qDeselected": 0,
"qAlternative": 0,
"qExcluded": 0,
"qSelectedExcluded": 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": "O"
}
],
[
{
"qText": "Denmark",
"qNum": "NaN",
"qElemNumber": 1,
"qState": "O"
}
],
[
{
"qText": "Spain",
"qNum": "NaN",
"qElemNumber": 2,
"qState": "O"
}
],
[
{
"qText": "Canada",
"qNum": "NaN",
"qElemNumber": 3,
"qState": "O"
}
],
[
{
"qText": "Netherlands",
"qNum": "NaN",
"qElemNumber": 4,
"qState": "O"
}
]
],
"qTails": [],
"qArea": {
"qLeft": 0,
"qTop": 0,
"qWidth": 1,
"qHeight": 5
}
}
]
},
"title": "A listbox",
"description": "Description of the listbox"
}
}
}
All values are optional (state is O).
3. Select all possible values of the list object.The handle of the request is 3 because the list object has 3 as a handle.
The client sends:
{
"jsonrpc": "2.0",
"id": 4,
"method": "SelectListObjectPossible",
"handle": 3,
"params": [
"/qListObjectDef",
false
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"qSuccess": true
},
"change": [
3
]
}
The selection is successful ("qSuccess": true).
4. Get the layout of the list object. The handle is 3.
The client sends:
{
"jsonrpc": "2.0",
"id": 5,
"method": "GetLayout",
"handle": 3,
"params": [
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 5,
"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,
"qSelectedExcluded": 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"
}
],
[
{
"qText": "Canada",
"qNum": "NaN",
"qElemNumber": 3,
"qState": "S"
}
],
[
{
"qText": "Netherlands",
"qNum": "NaN",
"qElemNumber": 4,
"qState": "S"
}
]
],
"qTails": [],
"qArea": {
"qLeft": 0,
"qTop": 0,
"qWidth": 1,
"qHeight": 5
}
}
]
},
"title": "A listbox",
"description": "Description of the listbox"
}
}
}
All possible values are selected (all the ones that were in the optional state).