Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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 😞

                           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

4 Replies
yblake
Partner - Creator II
Partner - Creator II

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
Partner - Contributor III
Partner - Contributor III

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
Specialist III
Specialist III

use : qAttributeExpressions.0.qExpression


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

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting

aldrinrayen
Partner - Contributor II
Partner - Contributor II

Hi Ajay , but for me its shows NaN and  if i pass number its showing but when i pass astring its showing NaN