Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm trying to copy the behavior of the Clear button of the QV document someone else has developed.
The Clear button certainly has a Clear State set but I don't know how to see what the set is.
When I hit on "Clear" - actually nothing happens, it doesn't clear or change anything.
This is exactly what I want to achieve in my development.
Please assist me in creating the Clear State that will not clear anything.
By the way, there are no triggers, bookmarks or macro applied.
Thanks in advance!
u can take another sheen and copy that object and chk wheather it hve anythng?
You can use your own clear set, but I think that is all you can do. Set a single clear state. May be what you were seeing was the cleared state and if you made any further selections, it would have taken to the previous selections before you made the most recent selections?
To set clear state, make your selections and when you have your desired selections, click the drop down arrow to select Set Clear State:
you can define your own clear state manually (see Sunnys answer) or define it automatically what I often use
todo so, the following macro is necessary:
sub DefineClearState
ActiveDocument.SetClearState
end Sub
now you define on each sheet several set field conditions (Trigger on activate sheet) on and you want that pressing clear button goes back to same state when you enter sheet
then define your set fields etc. and as last Trigger Action define run macro "DefineClearState"
when you do that on every sheet you get individual clear states,
Advantage: whenever user is lost with selections he just presses clear button (alternatively Switch to other tab and back)
I suppose that you will not be able to see what the current clear state is defined
That's the thing that there is a Clear State set somewhere and I don't know how to find out what's set in that state.
The behavior of the Clear button (it's not the developer button but the default document built-in button on the top of the screen - see attached screenshot) is that it doesn't influence on the selections! - it doesn't clear anything or change anything in the current selections.
Please assist me how to achieve the same behavior.
Yes, in the screenshot you have attached the application has set a non-default clear state. To do that, make selections that you want to have as default and then click on 'Set Clear State' option.
Hi Rudolf, that's not what I see in my sample document in which the behavior is that Clear button doesn't change anything at all in the current selections, and that's exactly what I want to achieve.
As I understand, in your case I'll have to define a Clear State for every tab with specific selections for that tab that when a user will press on Clear, it will return to that selections, meaning that it will change current selections... Did I understand you correctly?
Anyway, could you maybe provide me a sample document with your Clear State implementation?
Thanks
Hi Sunny,
I understand but the problem is that if I make certain selections and press on Set Clear State, then the Clear will always return to that specific selections, and I don't want it to happen cause I want the Clear button to not change anything in the current selections box...
It's not an object but the default document Clear button in the menu on the top of the screen...
see the following Picture. that's all what you Need todo (you Need the macro from my first answer)
you define the fields as required and use last Action run macro
then, pressing dlear button will goback to those Settings (Attention: doesnot work not when user button with Action clear all is pressed). Only the Default Qlikview clear button is supported
post a small sample app and write which Settings you want to achieve and I can make the changes
(unfortunately I am not allowed to upload anything, I would Need to be in Office or home)