Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
stevelord
Specialist
Specialist

How to make the default clear all button clear variables; without using macros

Hi, I'm slogging around mostly not answered or half-related posts looking for a way to make the Clear All button itself clear variable input boxes and not just the list boxes.  Because Qlikview Management Console on the Qlikview server doesn't let us schedule automated reloads on qlikviews containing Macros, I need an angle to add something to the list of default Document Event Triggers listed under Settings->Document Properties: Triggers..

The default document event triggers are the four items:

OnAnySelect

OnOpen

OnPostReduceData

OnReload

I want Document Event Trigger that says OnClearAll that then lets me Add Action->External->Set Variable and maybe write a bunch of these actions to have it set each variable to blank (or '' or Null()).

If I must, I'll go with a textbox button or maybe check with people whether OnOpen or some other document/sheet event like that would be good to clear the variables.  Really hoping I can get the Clear All button we already have to Clear All though.  Making a clear variables button feels eerily like making a virtual backspace key...

22 Replies
vgutkovsky
Master II
Master II

Ah, well I'm pretty sure that's not possible. You can't tell Windows (and Internet Explorer) to sometimes pass a user's logged-on credentials but not always.

Vlad

stevelord
Specialist
Specialist
Author

I'd just need the logout button to cause a situation where, once pressed, whoever is on that computer needs to log back in before they can access the qlikviews.  (Versus just hitting the back button, or just navigating back to the qlikview without being challenged by a login screen.)  I had a theory that the a real logout button might force a timeout, or fool qlikview into thinking you'd closed all your windows when you hadn't really (maybe delete whatever tracking cookie would make that happen).  Run off topic, but fun conversation.

vgutkovsky
Master II
Master II

The best conversations come from tangents 🙂 I think maybe there's a fundamental misunderstanding. If you have the default QlikView authentication enabled, the reason you don't have to log on manually is because some browsers (IE, for example) will automatically pass logged-on Windows credentials to any site on your company's intranet that requests it, such as the QV AccessPoint. Even if you were to somehow force a "log off" it wouldn't work because the browser would immediately re-pass the same credentials. What you're looking for is a blended authentication system that would first use automatic authentication from a browser and then, after some sort of "log off" event is triggered, would switch to a manual login system. I've never heard of anything like that. It might be possible to create something like that with some guru-level .NET programming, but it really has nothing to do with QlikView.

Vlad

stevelord
Specialist
Specialist
Author

If someone in our company is logged in as domain\teamname, and I go onto accesspoint and want to log myself in as domain\steamname from my machine, I have to enter the login and password.

Granted, this would kick the other person off if it was a document cal and we try to access the same document with that, and maybe they could reconnect and kick me off without re-authenticating, but Qlikview itself is doing a fine job observing logins either by raw count or by machine.  Either way, my browser isn't tracking the fact the other person is logged in and clearing me through, it's just holding on to the fact I'm logged in.  It doesn't hold onto the fact I'm logged in if I push 'log out' on say, a Bank's website (or Amazon's either I think, if I push sign out), and I always have to re-authenticate there.  This happens from either the company intranet, or my home wifi.  People just wanting qlikview to do that.

stevelord
Specialist
Specialist
Author

Anyway, even with the intranet or same computer, having a logout that forces a timeout of the sort that requires re-authentication to get back in might do the trick.  People who made Qlikview are the Gurus as evidenced by the existence of Qlikview, and should be able to figure something out on this front.

stigchel
Partner - Master
Partner - Master

I think I have made some kind of working example of this (see attached), all be it that you need to add each clear variable action

What I do is:

-load a seperate field Clear with value Clear

-This field has a trigger to clear a variable and set the value of Clear to Clear again

The Clear all from the toolbar triggers the trigger on Clear, which in turn clears the variable

stevelord
Specialist
Specialist
Author

Granted, that's a variation of the text-box button approach, but it's _a_ clear button that does what I want, so happy to give away the last of the credit and close this thing out now.   (I think I gave helpful credit to a level 10 person for suggesting I hide the main toolbar and make my own that does what I want it too- similar to your clear field/button approach idea but without the qvw attached. )  Another person says a builtinmacro of this sort may not interfere with qvmc scheduled reloads, so I may try that too.  Higher priority stuff crowding my day today, so will leave this string alone now.  We accumulated a few nice approaches for others to try in one string now.

vgutkovsky
Master II
Master II

Steve, in case you're interested, a more sophisticated version of the logout file is now available here: http://www.infinityinsight.com/blog/?p=275

Vlad

anothergreg
Contributor III
Contributor III

stigchel‌ I tried incorporating the elements here into my own workspace, but for some reason it's not working on mine where your provided example works flawlessly.  I've modified the script to include the Clear table, I changed the Field Event Trigger for Clear to be an OnSelect action.  The action does a Set Variable and Select in Field exactly as is in your example.  When I hit clear, though, my Clear Listbox deselects the value.  Is there another step I need to take to make this work properly?  I've modified my workspace even down to the exact spelling as in your example in an effort to get it to work, but to no avail.

stigchel
Partner - Master
Partner - Master

I don't know, I tried recreating this in a new document and it worked again. Can you share your qvw?