0 Replies Latest reply: Sep 15, 2017 12:59 PM by Ilya Komlyakov RSS

    Strange behavior of qAttributeExpressions

    Ilya Komlyakov

      Hi,

      I've got an extension that uses qAttributeExpressions for dimension. The strange behavior is the following:

      When i define expression in qAttributeExpressions  like this and then type some expression there

       

      var dimensions = {

             uses: "dimensions",

             min: 1,

             max: 1,

             items: {

                  color: {

                       type: "string",

                       label: "Color",

                       ref: "qAttributeExpressions.0.qExpression",

                       expression: 'always',

                       defaultValue: ''

                  }

             }

        };

       

      qlik give me the following error

      Error from Engine without an RPCSession request, RPC ID: 122

      Error from Engine: {jsonrpc: "2.0", id: 122, error: {…}}

           error: {code: -32602, parameter: "JSON type error", message: "Invalid method parameter(s)"}

           id: 122

           jsonrpc: "2.0"

       

      But when i set  'expression' field to empty :

      var dimensions = {

             uses: "dimensions",

             min: 1,

             max: 1,

             items: {

                  color: {

                       type: "string",

                       label: "Color",

                       ref: "qAttributeExpressions.0.qExpression",

                       expression: '',

                       defaultValue: ''

                  }

             }

        };

       

      and type some expression here. Then qlik gives me the right answer even if it's an expression in qAttributeExpressions field.

       

      I'm using Qlik Sense June 2017 Patch 2