Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Clever_Anjos
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

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

View solution in original post

9 Replies
ErikWetterberg

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

}

Clever_Anjos
Employee
Employee
Author

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

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

Clever_Anjos
Employee
Employee
Author

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

Hmmm, try

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

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

Clever_Anjos
Employee
Employee
Author

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

ErikWetterberg

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

Clever_Anjos
Employee
Employee
Author