Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Quick question on AlwaysOneSelected for List boxes - How does Qlikview decide which value to use as a 'default' when the 'clear all' button is used? I am experiencing some unwanted dashboard behavior where when 'clear' is hit, values in list boxes marked 'always one selected' are reverting back to previously selected values, whereas I would like their selected value not to change at all (or to change to the most recent month, whereas the month is stored as a three-part text field.).
I've read about the OnActivateSheet trick, and that seems like it could help, but it wouldn't solve users' confusion when their time period is being changed every time they hit 'Clear'.
Aha! I found it - all of the programmatic methods were very interesting, but a little bit unnecessary for what I wanted. I eventually poked around in the toolbar. The "clear" button has a drop-down underneath that has an option called 'Set Clear State' as well as a corresponding 'Reset Clear State'. Apparently, what 'Set Clear State' does is memorize the default values that you want it to clear to, so you can have it clear to a given set of selections rather than clear everything. Unfortunately, there's no way of telling if a coworker has done this, and then left on vacation... With the Clear State reset, everything is working as intended. Thanks for your help!
Google QlikShare.com and search
Customer OnClearAll Document Event in QlikView
Interesting video. Unfortunately, it seems to rely on setting up a bookmark to be used as a 'home' state to undo the changes imposed by the clear. I would prefer to use a solution that does not cause me to have to go in and manually save a new default state every month. If the default state were not changing every month, then this would be a perfect solution.
Trying with Trigger Action on "On Any Select" Doc Properties.
Hmm. Wouldn't that just reset the field any time someone tried to change it (or any other field)? I don't think that would be ideal, because I do want it to be changeable, just to change to where I want it to change when "Clear" is hit.
Hi Kevin,
You can try to create a new table with single field value with max(month(required_date)) and use this field to create a hidden list box with property set as 'Always one selected value'.
Let this field join the main data model's month field, since there will be only one value in this field,
data associated to recent month will be available.
MAX_Month:
LOAD MAX(Month([Required Date])) as Month // this field can be joined to Month in main data model
Resident Fact;
Else
As dathu has suggested you can add a trigger "On Any Select" for the required field to set the interested value.
Hope this helps...
That should be doable on Action. Try Your expression on Select Filed action:
IF(getselectedCount(FieldName) , Fieldname), Only({<$1>}FieldName)
Aha! I found it - all of the programmatic methods were very interesting, but a little bit unnecessary for what I wanted. I eventually poked around in the toolbar. The "clear" button has a drop-down underneath that has an option called 'Set Clear State' as well as a corresponding 'Reset Clear State'. Apparently, what 'Set Clear State' does is memorize the default values that you want it to clear to, so you can have it clear to a given set of selections rather than clear everything. Unfortunately, there's no way of telling if a coworker has done this, and then left on vacation... With the Clear State reset, everything is working as intended. Thanks for your help!