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: 
villegasi03
Creator
Creator

Section Access Property

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

Thank you

21 Replies
adamdavi3s
Master
Master

Yes I can confirm that it is those two

adamdavi3s
Master
Master

So to answer fully, yes you can test the checkboxes.

You need to create the -prj folder

Creating prj Folder

Then read in the docproperties.xml

DocProperties:

LOAD

DynamicReduceData,

StrictDynamicReduction,

  InitialSelection,

    %Key_DocProperties_A4A6ED072BE66637    // Key for this table: DocProperties

FROM [.\test-prj\DocProperties.xml] (XmlSimple, Table is [DocProperties]);

Capture.PNG

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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...

villegasi03
Creator
Creator
Author

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!

adamdavi3s
Master
Master

If you read these properties in via XML then you could abort the reload if either are not set to true (if that is what you want)

adamdavi3s
Master
Master

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

and not

change > reload > save

you'll be fine!

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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 :


TmpTable:

LOAD GetReductionProperties() AS ReductionProperties AUTOGENERATE 1;


Should work. Untested however.

villegasi03
Creator
Creator
Author

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.

villegasi03
Creator
Creator
Author

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.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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.