1 Reply Latest reply: Jan 11, 2018 5:10 AM by Elia Dal Santo RSS

    Attribute expression in custom extension not working

    Elia Dal Santo

      Hi everyone

       

      I'm writing a Visualization Extension for QlikSense, and I'm trying to add a custom expression to a measure so it will be evaluated for each row. As a guide, I'm using the example from the accepted answer here: Qliksense custom measure property for extension with expression value


      Here's my definition:

      definition : {
          type : "items",
          component : "accordion",
          items : {
              dimensions : {
                  uses : "dimensions",
                  min : 1
              },
              measures : {
                  uses : "measures",
                  min : 1,
                  items: {
                      VisibilityExpressionProperty : {
                          type: "string",
                          label: "Column visibility condition",
                          ref: "qAttributeExpressions.0.qExpression",
                          component: 'expression',
                          defaultValue: ""
                      }
                  }
              },
              sorting : {
                  uses : "sorting"
              },
              settings : {
                  uses : "settings",
                  items : {
                      initFetchRows : {
                          ref : "qHyperCubeDef.qInitialDataFetch.0.qHeight",
                          label : "Initial fetch rows",
                          type : "number",
                          defaultValue : 50
                      }
                  }
              }
          }
      }
      

       

      In the example I linked above, the author says that this should result in having the expression available in the hypercube, like this:

      qHypercube.qDataPages[0].qMatrix[i].qAttrExps
      

       

      However, this is not the case. As you can see, my matrix only contains the objects, but not the extra attribute:

      Image 2.png

       

      Can anyone tell me why?

      Also, is this stuff documented anywhere in the official documentation? I only found it by google searching....