Is there a way to check that the section access properties are set on a QVW within the load script? If this is possible, I wanted to use this as an additional check before distribution
So to answer fully, yes you can test the checkboxes.
You need to create the -prj folder
Then read in the docproperties.xml
%Key_DocProperties_A4A6ED072BE66637 // Key for this table: DocProperties
FROM [.\test-prj\DocProperties.xml] (XmlSimple, Table is [DocProperties]);
Now that I think about it: this is never a fail-safe approach. I can easily forget to enable these two checkboxes (Data Reduction & Strict Exclusion), and decide to distribute my document without a reload to all Authorized Users (Publisher only). Worst case everyone gets to see all data that was already present in my document.
Maybe you're trying to implement a partial technical fix for something that is already wrong in the publishing process...
This is exactly where I was going! Part of our reloading and environment promotion process involves the use of prj folders so this will work perfect! It will just have to be part of our best practices to include this check in any application requiring data reduction. Thank you very much for everyone's assistance!
No worries, the ONLY caveat I have thought of is that obviously this file won't get updated until the document is saved so as long as you
change >save> reload
change > reload > save
you'll be fine!
The same properties that Adam posted a couple of minutes ago, are also available through the API. Meaning that you can write a macro function (not a sub) the returns the current Data reduction state, and call it in a dummy LOAD statement.
The properties are:
ActiveDocument.GetPtoperties.DynamicReduceData (true or fales), &
ActiveDocument.GetPtoperties.StrictDynamicReduction (true or false)
Based on these booelan values, we can make the function (let's call it GetReducitonProperties) return a value between 0 and 2 (0=No Data Reduction, 1=Data Reduction, no Strict Exclusion, 2 = Data Reduction and Strict Exclusion) and call it in a script like this :
LOAD GetReductionProperties() AS ReductionProperties AUTOGENERATE 1;
Should work. Untested however.
This is perfect!! Some of our enviornments do not allow for applications to have macros but for those that allow it this is certainly a great option. Thank you again for your assistance.
Most certainly. Understood. I am almost 100% that in our current process we must pass through these steps before applications are moved up. Thank you again for the information.
These are not user-visible macros, but server-side only macros. Moreover, they will not be used by QVS (the QlikView server service), only by QVB.exe (the reload engine). No need to tell anyone.