13.3: Trick: Using Clear Button

Vertechs .IO
A free video tutorial from Vertechs .IO
4.4 instructor rating • 6 courses • 7,909 students

Learn more from the full course

The Advanced QlikView Developer Bootcamp

Master Advanced QlikView developer and designer concepts with challenges

11:57:51 of on-demand video • Updated July 2018

  • Master advanced QlikView developer concepts with challenges
English [Auto] It will come back in this video. I'll show you how to set default values after using the clear button. So what I mean by that is for example if I'm making selections here right or making selections and I'm looking at something so I've selected a director actor and then title I hit the clear button everything resets. Just great. Which is the expected behavior. That is fun but in some exceptional cases where when you hit the button you wanted the application to be in a default state. That must be some value where you're whenever the users hit the clear button. You want your application state to go into that default state. For example let's say that then also like this director right you always wanted to show your dashboard for this director. And from there you can make any selections. So let me go back and then this is a bookmark saying that before selection. Right I'll include the lay out state and then say OK. So if I clear right now you wanted the bookmark to be applied. Right. So you can probably do this using field riggers or using variables which is a very very long winded way. So instead what you want is if you hit clear you wanted either the bookmark to be applied or you want to add that selection in the bookmark to be present. So what you can do is you can set your default state to a bookmark. Right. So what you can do is you can make a selection on your bookmark the font selection and then you have this button here right. So you have a dropdown button here and if you click on this is nice and you might have most probably not seen this. So you have to click on the struck down button and then here you have Secretary of State. That is interesting. And then if you select that. So now click registered you are before listed as a key rock rules. That's that's the director's name. And then that's the default selection. So if I go ahead and make further selections and then I'll change this and then I go into different directors and then select different doctors. I can do all sorts of things here. And then once I do that right I make those selections and I have all these selections. So if I go ahead and hit the clear button here it takes me to the director. So that's what we wanted. However if I go ahead and hit clear all this would disappear as well because Clear all will always clear everything out and clear. We'll set the state. It's like an interim state. So there is difference between clear all and clear. So if I hit clear all now everything goes back. So it depends upon what you want to do. So if you want it in the form state in your application you can use the clear steede to your advantage. So if you wanted to use this functionality just by using the clear button on the toolbar you can use that. But make sure remember that clear all still will reset everything. So it's a simple technique but very useful in terms of setting States an interim state and you can also go ahead and change and reset the state. So I can say reset and then you make some selections and then I hit the clear button doesn't do anything but I can go ahead and reset the state OK. So you can set the state and you can clear the state. So very simple technique are very very useful to know and understand the difference between how states work and click you. Thank you for watching.