1 Reply Latest reply: Apr 30, 2013 8:22 AM by Patrik Seger RSS

    Save data from Extension Object...

    Patrik Seger



      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

        • Re: Save data from Extension Object...
          Patrik Seger



          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