1. Create a sheet.
The client sends:
{
"jsonrpc": "2.0",
"id": 1,
"method": "CreateObject",
"handle": 1,
"params": [
{
"title": "Title for Sheet01",
"description": "Description of sheet 1",
"qInfo": {
"qId": "SH01",
"qType": "sheet"
},
"qChildListDef": {
"qData": {
"title": "/title",
"description": "/description",
"meta": "/meta",
"order": "/order",
"id": "/qInfo/qId",
"type": "/qInfo/qType",
"lb": "/qListObjectDef",
"hc": "/qHyperCubeDef"
}
}
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"qReturn": {
"qType": "GenericObject",
"qHandle": 2
},
"qInfo": {
"qId": "SH01",
"qType": "sheet"
}
},
"change": [
2
]
}
The sheet SH01 is created. The sheet has 2 as a handle.
2. Create a list object LB01 in the sheet. The handle of the request is 2 because the list object should be added to the sheet that has 2 as a handle.
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": 1,
"qLeft": 0,
"qWidth": 1
}
]
},
"title": "Title for LB01",
"description": "This is the list object 01"
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"qReturn": {
"qType": "GenericObject",
"qHandle": 3
},
"qInfo": {
"qId": "LB01",
"qType": "ListObject"
}
},
"change": [
3
]
}
The list object LB01 is created and has 3 as a handle.
3. Create a list object LB02 that is linked to the list object LB01. The handle of the request is 2 because the list object should be added to the sheet that has 2 as a handle. qExtendsId is set to LB01 because the list object LB02 should be linked to the list object LB01.
The client sends:
{
"jsonrpc": "2.0",
"id": 3,
"method": "CreateChild",
"handle": 2,
"params": [
{
"qInfo": {
"qId": "LB02",
"qType": "linked"
},
"qExtendsId": "LB01"
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"qReturn": {
"qType": "GenericObject",
"qHandle": 4
},
"qInfo": {
"qId": "LB02",
"qType": "linked"
}
},
"change": [
4
]
}
The list object LB02 is created . LB02 is linked to LB01 and has the same properties as LB01. If the properties of LB01 are changed, the properties of LB02 are changed as well. The list object LB02 has 4 as a handle.
4. Get the layout of the list object LB01. The handle of the request is 3 because LB01 has 3 as a handle.
The client sends:
{
"jsonrpc": "2.0",
"id": 4,
"method": "GetLayout",
"handle": 3,
"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": 0,
"qOption": 22,
"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": "O"
}
]
],
"qTails": [],
"qArea": {
"qLeft": 0,
"qTop": 0,
"qWidth": 1,
"qHeight": 1
}
}
]
},
"title": "Title for LB01",
"description": "This is the list object 01"
}
}
}
The properties of the list object LB01 are displayed. The list object has the dimension Country Label ("qFallbackTitle": "Country Label") and contains 22 values ( "qCardinal": 22) that are all in the optional state ("qOption": 22). For more information on the returned parameters, see the GetLayout method.
4. Get the layout of the list object LB02. The handle of the request is 4 because LB02 has 4 as a handle.
The client sends:
{
"jsonrpc": "2.0",
"id": 5,
"method": "GetLayout",
"handle": 4,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 5,
"result": {
"qLayout": {
"qInfo": {
"qId": "LB02",
"qType": "linked"
},
"qExtendsId": "LB01",
"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,
"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": "O"
}
]
],
"qTails": [],
"qArea": {
"qLeft": 0,
"qTop": 0,
"qWidth": 1,
"qHeight": 1
}
}
]
},
"title": "Title for LB01",
"description": "This is the list object 01"
}
}
}
The list object LB02 has the same properties as the list object LB01. The list object has the dimension Country Label ("qFallbackTitle": "Country Label") and contains 22 values ( "qCardinal": 22) that are all in the optional state ("qOption": 22). For more information on the returned parameters, see the GetLayout method.