Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

alan_grn
Contributor

Custom property in Qlik Sense extension

I am trying to create a custom property fro each measure in the extension.

I have created a switch which appears in the accordion for each measure and I can set them separately

I am now trying to read there values in the .qHyperCube object. Should I see this as a property of each measure and if so why do I not see it?

My code is below

measures : {

    uses : "measures",

    min : 0,

                              

    items: {

          MySwitchProp: {

               type: "boolean",

                    component: "switch",

                    label: "Colour using Heatmap",

                    ref: "MySwitchProp",

                                                      options: [{

                                                              value: true,

                                                              label: "On"

                                                      }, {

                                                              value: false,

                                                              label: "Off"

                                                      }],

                                                      defaultValue: false

                                            }

                                    }

2 Replies
edgar_88
Contributor

Re: Custom property in Qlik Sense extension

you find a solution?

ajaykakkar93
Contributor

Re: Custom property in Qlik Sense extension

here is your mistake use qDef or qAttributeExpressions.0.qExpression

  • qAttributeExpressions.0.qExpression - will loop over all the values

measures: {

    uses: "measures",

    min: 1,

    max: 2,

      items: {

          // instead of " MySwitchProp " use " qDef.MySwitchProp "

          MySwitchProp: {

                type: "boolean",

              component: "switch",

              label: "Colour using Heatmap",

              ref: "qDef.MySwitchProp",

              options: [{ value: true, label: "On" }, { value: false, label: "Off" }],

              defaultValue: false

              }

            // end

    }

}


Regards & Thanks,
Ajay Kakkar
ajaykakkar93@gmail.com