4 Replies Latest reply: Oct 15, 2014 2:42 PM by Shane Porter RSS

    Engine API - ValueExpression

      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:

      https://help.qlik.com/sense/en-us/developer/index.html#../Subsystems/Qlik_Engine_API/Content/GenericObject/PropertyLevel…

       

      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.