Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
My aim is to evaluate a number of expressions, hopefully as a single call, using the Engine API and Web socket requests from a web browser. I have a couple of questions.
Referring to this:
I see that the aim is to evaluate the expression =Count(CategoryName)
So why does the example's request parameter contain a reference to qFieldDefs (country) and so on? I've managed to reduce the parameter to:
{
"jsonrpc": "2.0",
"id": 1,
"method": "CreateSessionObject",
"handle": 1,
"params": [
{
"meta": {
"data": "this is the data",
"qValueExpression": "=COUNT(CategoryName)"
},
"qInfo": {
"qId": "",
"qType": "Listbox"
},
"qListObjectDef": {
"qInitialDataFetch": [
{
"qTop": 0,
"qLeft": 1,
"qHeight": 1,
"qWidth": 1
}
]
}
}
]
}
and get the result I want. Can anyone explain why the additional parameters are present in the example? They seem to me to be extraneous.
Also, can I evaluate multiple expressions with a single call?
Thanks for your help.
Cheers,
Shane.
Message was edited by: Shane Porter Changed request since it wasn't valid.
The relevant part of your request parameters are
"countOfCategory": {
"qValueExpression": "=COUNT(CategoryName)"
},
This will result in a layout looking something like
"countOfCategory": 243,
The relevant part of your request parameters are
"countOfCategory": {
"qValueExpression": "=COUNT(CategoryName)"
},
This will result in a layout looking something like
"countOfCategory": 243,
Thanks,
any way I can 'ask' for multiple expressions with a single request?
Yes, just append them all in the same manner.
"countOfCategory1": {
"qValueExpression": "=COUNT(CategoryName)"
},
"countOfCategory2": {
"qValueExpression": "=COUNT(CategoryName)"
},
"countOfCategory3": {
"qValueExpression": "=COUNT(CategoryName)"
},
This will result in a layout looking something like
"countOfCategory1": 243,
"countOfCategory2": 243,
"countOfCategory3": 243,
Great. I thought I'd tried that, but obviously not