Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

edgar_88
Contributor

Custom properties on measures

Hi, I try to catch a custom propertie value defined in measures, but I can´t  

This is my Code

definition: {

  type: "items",

  component: "accordion",

       items: {

            dimensions: {

                 uses: "dimensions",

                 min: 1,

                 max: 2

            },

            measures: {

                 uses: "measures",

                 min: 1,

                 items: {

                      Eje: {

                           type: "string",

                           component: "dropdown",

                           label: "Eje",

                           ref: "qHyperCubeDef.eje",     // I try with qDef too Smiley Sad

                           options: [{

                                value: "1",

                                label: "Primario"

                                }, {

                                value: "2",

                                label: "Secundario"

                           }],

                           defaultValue: "1"

                      },

                      Formato: {

                           type: "string",

                           component: "dropdown",

                           label: "Formato",

                           ref: "qHyperCubeDef.formato",

                           options: [{

                                value: "1",

                                label: "Número"

                                }, {

                                value: "2",

                                label: "Porcentaje"

                                }, {

                                value: "3",

                                label: "Moneda"

                           }],

                           defaultValue: "1"

                      },

                      Sufijo: {

                           ref: "qHyperCubeDef.sufijo",

                           label: "Sufijo",

                           type: "string",

                           defaultValue: "",

                           expression: "optional"

                      },

                      Color: {

                           ref: "qHyperCubeDef.color",

                           label: "Color",

                           type: "string",

                           defaultValue: "#000",

                           expression: "optional"

                      }

                 }

            },

but in my Hypercube I don't see the properties!

Capture.PNG

thanks for the help

3 Replies
yblake
Contributor II

Re: Custom properties on measures

Solved in this topic : Qliksense custom measure property for extension with expression value

ref should link to qHyperCubeDef.qMeasures.0.qAttributeExpressions.0.qExpression

humesh_sindpure
New Contributor II

Re: Custom properties on measures

colorExpression:{ 

  type: "string", 

  label: "Enter color expression", 

  ref:"qHyperCubeDef.qDimensions.0.qAttributeExpressions.0.qExpression", 

  expression:"optional" 

  }

how do I call   this ref: qHyperCubeDef.qDimensions.0.qAttributeExpressions.0.qExpression",  in function

ajaykakkar93
Contributor

Re: Custom properties on measures

use : qAttributeExpressions.0.qExpression


currentCell.qAttrExps.qValues["0"].qText

Regards & Thanks,
Ajay Kakkar
ajaykakkar93@gmail.com
Community Browser