Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
All,
I would like to initiate a macro after user clicks on default clear all button. I need to select a value from a field after user clicks on clear all button. We can't use the always one selected value on the list box properties since user do has to clear that every time they need to select some other value. Any ideas on how to capture clear all action in a macro and to select a value from one of the fields.
Thanks in advance.
Works for me. The attached example selects product A on a clear by using the OnAnySelect trigger in the document properties. Now, it does the same thing if you clear all selections one at a time, because it isn't detecting the button press, but just that selections have changed and nothing is selected. But it's probably what we'd want in most applications.
There is a solution proposed in this post: http://community.qlik.com/message/114240#114240
However, if macro is just needed to make selection then you could get away with pure actions instead of macro.
Tanel,
Thanks for your response. But the post you mentioned is not working for me. I tired this before posting this message. Not sure why. Appreciate if some one can make it little bit clear. I need to select a value after user does clear all using default clear all button.
Works for me. The attached example selects product A on a clear by using the OnAnySelect trigger in the document properties. Now, it does the same thing if you clear all selections one at a time, because it isn't detecting the button press, but just that selections have changed and nothing is selected. But it's probably what we'd want in most applications.
Thanks John. This works.
Hello.
It's possible to get the same result without use any macro? using only triggers?
Thanks in advance.
You could check selections and also the missing of selections in a variable global per getcurrentselections() or in detail per getfieldselections() or getselectedcount() - simply: if(len(getcurrentselections()) < 1, 'no selections', 'any selections') - and then put an OnChange-Trigger on these variable.
- Marcus