Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
alan_grn
Creator II
Creator II

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
Anonymous
Not applicable

you find a solution?

ajaykakkar93
Specialist III
Specialist III

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

    }

}


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