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: 
rbecher
MVP
MVP

Backend Api getProperties / setProperties

Hi,

I'm looking for examples how to use this.backendApi.getProperties() / setProperties() methods. Anything on this?

- Ralf

Astrato.io Head of R&D
16 Replies
rbecher
MVP
MVP
Author

Hi Erik,

how do I set a property of an extension property panel (eg. settings/items/myprop) from inside the paint function? Any example?

Best,

Ralf

Astrato.io Head of R&D
ErikWetterberg

Hi,

In your properties panel definition you have a value called 'ref' that points to the position in the properties structure where your property is stored. Use this either in your setProperties call or in applyPatch. Note that the ref notion is with dots, but applypatch wants it with slashes.

Erik

rbecher
MVP
MVP
Author

Thanks! So, is the path the just "/myRef" ? I cannot find any example.

Astrato.io Head of R&D
ErikWetterberg

Hi,

That depends on what you have written in 'ref' in the property panel definition.

In the definition:

myProperty : {

     ref : "myProperty",

     label : "My Property",

......

Would give you a path of "/myProperty" if you use applyPatch.

Erik

rbecher
MVP
MVP
Author

Thanks, this works for the actual value, how about "/myProperty/defaultValue" ? Seems not to work..

Astrato.io Head of R&D
ErikWetterberg

No, it only works for the values actually in the property object, and the default value is in the property panel.

Erik

rbecher
MVP
MVP
Author

Ok, thanks.

Astrato.io Head of R&D