Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm using Qlikview 11.2 SR12. It's not the greatest version and maybe I will have to upgrade because I think I have a bug about actions and variables.
I want a button to remove all filters except 1 if it is already selected.
So my idea is to make a button with
The problem is that it seems Qlikview only update the variable value when all the actions have been completed.
In my selection of Company,
If I select the Company1, it will end with everything cleared and Company1 in the variable.
But after that, if I select Company2 and press the button, it will clear all, select Company1 (because it was in the variable) and then put Company2 in the variable, even if the Set Variable was the first action.
Look at the example provided.
Is there an error in my code ? is there a walkaround or do you know if another SP of 11.2 fixes that ?
Thanks
If the objective is to clear everything except a particular field (which I call "preservefield"):
If you must also preserve the already-locked fields, add this in the script:
Set HiddenPrefix = '_'; // or whatever you like
Preservation_Island:
NoConcatenate
LOAD Distinct
preservefield,
preservefield as _shadowfield
Resident Table_With_Preservefield;
In the button actions:
Let me know if that works for you!
The actions in qlikview won't be executed seriell. This meant you couldn't get a stable solution with a chain of actions if they are depending on eachother in any way. Perhaps you need another usability with multiple buttons and/or back/forward-buttons or bookmark-actions or something similar. Maybe also this is helpful for you: Tracking the historical selections.
- Marcus
hi
some of the actions in Qlikview take time to update and there for when applying several actions
you'll need to include a macro that do a sleep function
but the good news you don't need this sequence , just use the action clear other fields
that clears all the fields except to the field you set
I still take that as a bug : a succession of Clear and Select always work fine. But setting a variable seem to happen only when the action list is over. Too bad.
Clear other fields is nice but if you have selected nothing, it will select All .. I don't like that .. I want to clear other, not clear other and select all !! Again I would say it's a bug.
Thanks for your very interesting link.
I still think my problem could be easily fixed (and is some kind of a bug) : all actions of selecting and clearing are sequential. Too bad the Set Variable is not and only occurs when the actions are over.
I have fixed my issue with the tip of another article : locking the Company field, clearing everything and unlocking the Company. It adds a lock/unlock to the history of filters but it's the better way to do I think
If the objective is to clear everything except a particular field (which I call "preservefield"):
If you must also preserve the already-locked fields, add this in the script:
Set HiddenPrefix = '_'; // or whatever you like
Preservation_Island:
NoConcatenate
LOAD Distinct
preservefield,
preservefield as _shadowfield
Resident Table_With_Preservefield;
In the button actions:
Let me know if that works for you!
Thanks, yes I have done this way (without the code to preserve the locked fields but it is ok for me)
I'm just unhappy about the fact Actions and triggers are not really sequential in Qlikview but I'll do with it
Thanks
Hi Frederic Villemin,
Do Actions work on Ajax browser when published.
I have a few Red Green Amber Text objects and have Actions on them to " select in fields Action " to filter out a table beneath it. Will these Select In field Actions of these text boxes work in Ajax browser. Basically will Actions work in Ajax browser. Please kindly let me know. This would be really helpful! Thanks in advance!
Hi Marcus Sommer,
How are you? I have a question.
Do Actions work on Ajax browser when published.
I have a few Red Green Amber Text objects and have Actions on them to " select in fields Action " to filter out a table beneath it. Will these Select In field Actions of these text boxes work in Ajax browser. Basically will Actions work in Ajax browser. Please kindly let me know. This would be really helpful! Thanks in advance!
Hi Brian Schiefen, I have a Question on Actions :
Do Actions work on Ajax browser when published.
I have a few Red Green Amber Text objects and have Actions on them to " select in fields Action " to filter out a table beneath it. Will these Select In field Actions of these text boxes work in Ajax browser. Basically will Actions work in Ajax browser. Please kindly let me know. This would be really helpful! Thanks in advance!