Qlik Community

Qlik Sense Integration, Extensions, & APIs

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

Employee
Employee

Recovering Custom Properties Values

I´m sorry about the näive question

I´ve searched the doc http://help.qlik.com/sense/en-us/developer/#../Subsystems/Workbench/Content/BuildingExtensions/HowTo...

where I can read "You then find the selected values in the layout parameter."

I´ve been debugging the layout object for the last two hours and I can´t find my custom properties,

I´ve created them as below,

How could I get the value of RadEnd for example?

items : {

  dimensions : {

  uses : "dimensions",

  min : 1,

  max : 1

  },

  measures : {

  uses : "measures",

  min : 1,

  max : 1

  },

  sorting : {

  uses : "sorting"

  },

  addons : {

  uses : "addons",

  items : {

  RadStart : {

  ref : "RadStart",

  label : "Start Angle",

  type : "number",

  defaultValue : "-90",

  min : "-90",

  max : "90"

  },

  RadEnd : {

  ref : "RadEnd",

  label : "End Angle",

  type : "number",

  defaultValue : "90",

  min : "-90",

  max : "90"

  },

1 Solution

Accepted Solutions
Not applicable

Re: Recovering Custom Properties Values

Have you tried to console out the layout variable from the paint function?

paint: function($element, layout) {

            console.log(layout);

Also you can try to delete the visualisation from the Qlik Sense app and add it again, so it gets instantiated properly.

Hope it helps

Karl

9 Replies
erik_wetterberg
Honored Contributor

Re: Recovering Custom Properties Values

Hi,

Not sure if this is the reason, but you set the type to "number" and your default value is a string. Try this instead:

radEnd:{

     ref: "radEnd",

     type: "number",

     label: "End Angle",

     defaultValue: 90,

     min: -90,

     max: 90

}

Erik Wetterberg
https://extendingqlik.upper88.com/
Employee
Employee

Re: Recovering Custom Properties Values

Thank you ewg, tried this as you suggested, but still not working.

Where inside "layout" object (as help says) I would search for my properties?

Capturar.PNG

My Sense is showing my parameters as expected

Capturar2.PNG

Not applicable

Re: Recovering Custom Properties Values

Have you tried to console out the layout variable from the paint function?

paint: function($element, layout) {

            console.log(layout);

Also you can try to delete the visualisation from the Qlik Sense app and add it again, so it gets instantiated properly.

Hope it helps

Karl

Employee
Employee

Re: Recovering Custom Properties Values

Yes, I´m doing the way you suggested.

Capturar2.PNG

I have deleted my visualization, added again and nothing changed under layout. Am I right? My properties would be part of "layout" object?

Capturar.PNG

Not applicable

Re: Recovering Custom Properties Values

Hmmm, try

  1. radEnd:{ 
  2.      ref: "properties.radEnd", 
  3.      type: "number", 
  4.      label: "End Angle", 
  5.      defaultValue: 90, 
  6.      min: -90, 
  7.      max: 90 
Employee
Employee

Re: Recovering Custom Properties Values

ewg, thank you so much for your valuable time,

found error here when I´ve used JSlint,

There was an "," at this line after "use: settings", it was not generating an error at console, but caused this issue

Capturar.PNG

Employee
Employee

Re: Recovering Custom Properties Values

Marking your answer as correct because you put me on right path to find my mistake

erik_wetterberg
Honored Contributor

Re: Recovering Custom Properties Values

Good you solved it! Good habit to lint your code, can help you with these kind of mistakes that are so easy to make.

Erik

Erik Wetterberg
https://extendingqlik.upper88.com/
Employee
Employee

Re: Recovering Custom Properties Values

Community Browser