The handle of the app is 1.
1. Create a transient list to be able to list the fields and the tables associated to each field (qShowSrcTables is set to true).
The client sends:
{
"jsonrpc": "2.0",
"id": 2,
"method": "CreateSessionObject",
"handle": 1,
"params": [
{
"qInfo": {
"qId": "",
"qType": "FieldList"
},
"qFieldListDef": {
"qShowSystem": true,
"qShowHidden": true,
"qShowSemantic": true,
"qShowSrcTables": true
}
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"qReturn": {
"qType": "GenericObject",
"qHandle": 2
}
},
"change": [
2
]
}
The list is created and has 2 as a handle.
2. Get the layout of the list (handle is 2).
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": "7e1408c0-d600-42fb-855c-e3b9562b7a90",
"qType": "FieldList"
},
"qSelectionInfo": {},
"qFieldList": {
"qItems": [
{
"qIsHidden": true,
"qIsSystem": true,
"qName": "$Field",
"qCardinal": 30,
"qTags": [
"$key",
"$hidden",
"$system",
"$ascii",
"$text"
],
"qSrcTables": []
},
{
"qIsHidden": true,
"qIsSystem": true,
"qName": "$Table",
"qCardinal": 7,
"qTags": [
"$key",
"$hidden",
"$system",
"$ascii",
"$text"
],
"qSrcTables": []
},
{
"qIsHidden": true,
"qIsSystem": true,
"qName": "$Rows",
"qCardinal": 7,
"qTags": [
"$hidden",
"$system",
"$numeric",
"$integer"
],
"qSrcTables": []
},
{
"qIsHidden": true,
"qIsSystem": true,
"qName": "$Fields",
"qCardinal": 5,
"qTags": [
"$hidden",
"$system",
"$numeric",
"$integer"
],
"qSrcTables": []
},
{
"qIsHidden": true,
"qIsSystem": true,
"qName": "$FieldNo",
"qCardinal": 11,
"qTags": [
"$hidden",
"$system",
"$numeric",
"$integer"
],
"qSrcTables": []
},
{
"qIsHidden": true,
"qIsSystem": true,
"qName": "$Info",
"qCardinal": 1,
"qTags": [
"$hidden",
"$system",
"$ascii",
"$text"
],
"qSrcTables": []
},
{
"qName": "CategoryID",
"qCardinal": 5,
"qTags": [
"$key",
"$numeric",
"$integer"
],
"qSrcTables": [
"Categories",
"Products"
]
},
{
"qName": "CategoryName",
"qCardinal": 5,
"qTags": [
"$ascii",
"$text"
],
"qSrcTables": [
"Categories"
]
},
{
"qName": "Address",
"qCardinal": 1,
"qTags": [
"$text"
],
"qSrcTables": [
"Customers"
]
},
{
"qName": "City",
"qCardinal": 1,
"qTags": [
"$text"
],
"qSrcTables": [
"Customers"
]
},
{
"qName": "ContactName",
"qCardinal": 1,
"qTags": [
"$text"
],
"qSrcTables": [
"Customers"
]
},
{
"qName": "ContactTitle",
"qCardinal": 1,
"qTags": [
"$ascii",
"$text"
],
"qSrcTables": [
"Customers"
]
},
{
"qName": "Country",
"qCardinal": 1,
"qTags": [
"$ascii",
"$text"
],
"qSrcTables": [
"Customers"
]
},
{
"qName": "Customer",
"qCardinal": 1,
"qTags": [
"$text"
],
"qSrcTables": [
"Customers"
]
},
{
"qName": "CustomerID",
"qCardinal": 1,
"qTags": [
"$key",
"$ascii",
"$text"
],
"qSrcTables": [
"Customers",
"Orders"
]
},
{
"qName": "Fax",
"qCardinal": 1,
"qTags": [],
"qSrcTables": [
"Customers"
]
},
{
"qName": "Phone",
"qCardinal": 1,
"qTags": [],
"qSrcTables": [
"Customers"
]
},
{
"qName": "PostalCode",
"qCardinal": 1,
"qTags": [
"$numeric",
"$integer"
],
"qSrcTables": [
"Customers"
]
},
{
"qName": "Region",
"qCardinal": 0,
"qTags": [
"$text"
],
"qSrcTables": [
"Customers"
]
},
{
"qName": "OrderID",
"qCardinal": 17,
"qTags": [
"$key",
"$numeric",
"$integer"
],
"qSrcTables": [
"Order_Details",
"Orders"
]
},
{
"qName": "ProductID",
"qCardinal": 10,
"qTags": [
"$key",
"$numeric",
"$integer"
],
"qSrcTables": [
"Order_Details",
"Products"
]
},
{
"qName": "Quantity",
"qCardinal": 16,
"qTags": [
"$numeric",
"$integer"
],
"qSrcTables": [
"Order_Details"
]
},
{
"qName": "UnitPrice",
"qCardinal": 14,
"qTags": [
"$numeric"
],
"qSrcTables": [
"Order_Details"
]
},
{
"qName": "OrderTotal",
"qCardinal": 30,
"qTags": [
"$numeric"
],
"qSrcTables": [
"Order_Details"
]
},
{
"qName": "OrderDetailCounter",
"qCardinal": 1,
"qTags": [
"$numeric",
"$integer"
],
"qSrcTables": [
"Order_Details"
]
},
{
"qName": "OrderDate",
"qCardinal": 16,
"qTags": [
"$numeric",
"$integer",
"$timestamp",
"$date"
],
"qSrcTables": [
"Orders"
]
},
{
"qName": "OrderYear",
"qCardinal": 2,
"qTags": [
"$numeric",
"$integer"
],
"qSrcTables": [
"Orders"
]
},
{
"qName": "OrderQuarter",
"qCardinal": 6,
"qTags": [
"$numeric",
"$integer",
"$timestamp",
"$date"
],
"qSrcTables": [
"Orders"
]
},
{
"qName": "OrderMonth",
"qCardinal": 10,
"qTags": [
"$numeric",
"$integer"
],
"qSrcTables": [
"Orders"
]
},
{
"qName": "OrderDay",
"qCardinal": 12,
"qTags": [
"$numeric",
"$integer"
],
"qSrcTables": [
"Orders"
]
},
{
"qName": "ShipperID",
"qCardinal": 3,
"qTags": [
"$key",
"$numeric",
"$integer"
],
"qSrcTables": [
"Orders",
"Shippers"
]
},
{
"qName": "OrderCounter",
"qCardinal": 1,
"qTags": [
"$numeric",
"$integer"
],
"qSrcTables": [
"Orders"
]
},
{
"qName": "ProductName",
"qCardinal": 10,
"qTags": [
"$text"
],
"qSrcTables": [
"Products"
]
},
{
"qName": "SupplierID",
"qCardinal": 9,
"qTags": [
"$key",
"$numeric",
"$integer"
],
"qSrcTables": [
"Products",
"Suppliers"
]
},
{
"qName": "Shipper",
"qCardinal": 3,
"qTags": [
"$ascii",
"$text"
],
"qSrcTables": [
"Shippers"
]
},
{
"qName": "Supplier",
"qCardinal": 9,
"qTags": [
"$text"
],
"qSrcTables": [
"Suppliers"
]
}
]
}
}
}
}
The list of fields is displayed.
- qName specifies the name of the field.
- qCardinal gives the number of distinct field values.
- qSrcTables gives the name of the table the field belongs to.
Information noteFor more information on the output results, see
FieldList.