Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My dashboard has hidden sheets for debugging and validation. However, I notice that if I forget to re-hide the objects and publish the dashboard, they are visible to end users. Can I do something in the load script/onload trigger to ensure that when the document reloads, the hidden objects remain hidden?
Yes, in your Load script you can persistently set a vShowDebugStuff variable to 0 (name it as you wish) likee this:
SET vShowDebugStuff = 0; // Disabled by default
Every conditional show expression of all Debug objects should now carry an expression as simple as
=vShowDebugStuff
If you ever want to inspect your debugging stuff in QV Desktop, use the Variable Overview to set that particular variable to a non-zero value. The next reload (probably on your server) will reset it to 0 before publishing the document.
Best,
Peter
Can you share a sample with an example ?
so this would replace the control-shift-S functionality with the practice of "go to variable overview and set value to 1"? Every reload would then reset which could be a bit annoying for developer, but preferable to the current behavior of accidentally deploying debug sheets to production.
upon further reflection...this is not really a viable solution. Every time the developer hits reload, they will have to re-enable the variable. It won't take too long before they just change the load script. That's what I would do.
I would then either (and in that order):
I've attached an example of the last option. Hidden script password is <supersecret>.
I did. It's attached to the post.
Another solution could be to keep using this trick, but only activate it in your production environment. Developers can still mess with whatever they don't like, but your published documents are forced to behave or - and this is a safety extension that you can add - they will be denied a reload/update.
How to do this in the simplest manner possible? Use an include file with general setttings at the start of every script. The include file in your production environment contains at least one line more than the other copies, e.g.
SET vShowDebugStuff = 0;
Failure to include this script file comes with a developer-oriented penalty (ranging from "no coffee/pizza for the next 24 hrs" to pulling out fingernails, or something inbetween ). Or more sensibly: some critical settings for a particular environment will be missing (data paths, connection strings ,whatever) or the document will simply refuse to reload. The latter works best if combined with Ronald's 2nd suggestion here (Hidden Script)
thanks for the suggestions; unfortunately, none of these really fits. My solution is to color the tabs of the hidden sheets red so they are more obvious and I will be less likely to forget to save qlikview while they are still visible.
Why not link to the developer's name?
Show/Hide subject to =WILDMATCH(OSUSER(), '*ATKINS*', ....) should do.
Typically we do add an "*" to the sheetname in order to mark that this sheet is not visible to the public.
Peter