Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Working in QlikView, I realizaed there is no trigger on clear button.. For example if you want to give variable, specific value, on clear, it isn't possbile.. The only way is to create button that will do clear through macro..
Am I right or wrong?
Tnx.
See enclosed.
Rakesh wrote:
See enclosed. <div></div>
Hi Rakesh,
I have tried your solution (in QlikView 9) ...
Unfotunately it does not work and I do not understand your idea to solve this issue ...
Best regards
Stefan
I wonder if this is an 8.5 solution. You can fix Rakesh's solution to work with version 9 by changing the OnChange trigger for field "a" to be an OnSelect trigger instead.
It seems that on a Clear, the OnChange isn't fired, but the onSelect is.
I think in order for this to work in a real application (more than one field to clear), then the trigger would need to be placed on the OnAnySelect event and every field would need to be checked to have 0 selections. I'm guessing you could use a loop to loop through all fields in the document and check for selections rather than hardcoding it for each.
Unfortunately, this is the best we have until we get some more trigger events.
I'd say: clear is a special form of Select ("Select NOTHING"), and there ARE triggers for OnSelect and OnAnySelect. But perhaps I'm misunderstanding something.
Rgds,
Joachim
Yes, unfortunately I only have 8.2 installed on the machine I have right now. I can make one example in v9 tonight when I get home.
The idea is to have a field (in this case field "a") with more than one records (in this case I loaded 2 records). Then a macro on "On Open" will select one record. Then a macro on "On Change" for this field will check if no records are selected, this will only happen if user presses clear button. Then the message pops-up and next line in the macro selects one record again. Same cycle....
Hope this makes sense.
Oh, now I see. That's a pretty clever way to do it.
I just figured "a" was a dummy field and ignored that part. This is a great example of taking what the program gives you and adding functionality that wouldn't otherwise be available.
In order to make this work in version 9, add the IsClear macro to the OnSelect for "a" (it can be removed from the OnChange).
biester wrote:
I'd say: clear is a special form of Select ("Select NOTHING"), and there ARE triggers for OnSelect and OnAnySelect. But perhaps I'm misunderstanding something.
Rgds,
Joachim<div></div>
Oh, I've not seen the trigger ... so nice idea and it works!! Thanks for your "additional" explanation ... 🙂
Best regards
Stefan
Glad to see that I have added some value here 🙂
Hi Vrbcic, Were you able to make it work for you?
It is realy funny, when I posted this question to forum, I alredy tried to connect clear macro with OnChange trigger, and this solution didn't work for my case. But now I tried in a simple application and it is working..
So it is a problem with my application, and I don't know why.. Some bug is around 🙂