Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
patrik_seger
Partner - Creator
Partner - Creator

Save data from Extension Object...

Hi

I would like to save data from my Extension Object. The data must be persistent, and saved in the QVW file, so that the Extension object can access the same data the next time the document is opened. The data is of type String and should not be possible to view by the user or QV developer.

My initial idea was to use a field in the Defintion.xml file that is not adressed in the Properties.qvpp file, though hidden. I tried to use the RefValue fields but in order to save a value from the object, I did not manage to use the SetProperty() method (in Qv.Document.Object.Layout), but I did not manage to save any value in that property. I do not know if I used the wrong naming convention or if this method does not support setting of RefValue property.

Any one else that has an idea how to accomplish saving data from an Extension Object?

Br Patrik

1 Solution

Accepted Solutions
patrik_seger
Partner - Creator
Partner - Creator
Author

Hi

Since I found out, I can share as well.

Use the RefValue or Text property in the definiton file, let QV generate a property page for you (QV 11 that is), copy, rename and modify this qvpp file and point towards this modified qvpp file in your definition file.

This is though (at least in 11 SR1) buggy so I got it working using this syntax:

    <PropertiesPage Version="11" File="DynProp.qvpp" />

first in the defintions file. Do not skip Version="11" even though documentation says its not mandatory.

From JavaScript, use SetProperty(<source>, <value>, true) to save. Pls note that <source> does not match the same object structure as the Layout itself.

Read by using Layout.Text0.text but write to Chart.Text.0.Content...

I would like to see this in the documentation QlikTech

Pls also note that SetProperty does not work really good in 11 SR1, better in 11 SR2.

Br Patrik

View solution in original post

1 Reply
patrik_seger
Partner - Creator
Partner - Creator
Author

Hi

Since I found out, I can share as well.

Use the RefValue or Text property in the definiton file, let QV generate a property page for you (QV 11 that is), copy, rename and modify this qvpp file and point towards this modified qvpp file in your definition file.

This is though (at least in 11 SR1) buggy so I got it working using this syntax:

    <PropertiesPage Version="11" File="DynProp.qvpp" />

first in the defintions file. Do not skip Version="11" even though documentation says its not mandatory.

From JavaScript, use SetProperty(<source>, <value>, true) to save. Pls note that <source> does not match the same object structure as the Layout itself.

Read by using Layout.Text0.text but write to Chart.Text.0.Content...

I would like to see this in the documentation QlikTech

Pls also note that SetProperty does not work really good in 11 SR1, better in 11 SR2.

Br Patrik