Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have few charts/tables that are hidden until user selects the specific item in a List Box.
I need to setup a flag which would be set when chart becomes visible or if the List Box selection has been made, but I was not able to find an option to do so.
There is no "On Activate/On Show" action for the chart and there is no "On Select" action for List Box.
I can check if the List Box item value is not null: Analysis='Analysis 1' (where "Analysis" is the field used to populate a List Box), but my problem is that a user might clear the list box before I am checking for the flag (before leaving the page in my case).
Basically I need to setup a flag once user sees the chart and keep this flag intact before page or application is closed.
Any suggestions will be greatly appreciated.
Best Regards,
Vladimir
Vladimir,
Slightly crazy solution attached.
The image will only appear when 'Pie' has been selected in the listbox, even when Pie is then unselected the image will remain. Until Pie has been selected the image will not appear.
Apologies for the random picture.
In my testing this doesn't work everytime as the OnChange Trigger associated with the 'v_Selected_Control' variable doesn't always fire - this may be a bug with my version of QV - if I go into Variable Overview then start clicking in the listbox it works as expected??
Components are:
OnOpen trigger to reset the v_Amends variable to 0
A variable (v_Selected_Control) with the expression: =if(GetSelectedCount(Item)>0,if(index(concat(Item,', '),'Pie'),1,0),0) so if 'Pie' is selected the result is 1 if not 0 and if nothing is selected it's also 0.
An OnChange Trigger looking at the v_Selected_Control variable that sets v_Amend to be v_Amend+1 each time v_Selected_Control changes.
the Image is conditionally displayed when the expression v_Amends>0
Basically v_Selected_Control only changes from 0 when 'Pie' is first selected and will only increase from there so you're image is displayed until the document is re-opened.
Hope that helps - apologies for the confusing explanation.
All the best,
Matt - Visual Analytics Ltd
Qlikview Design Blog: http://QVdesign.wordpress.com
@QlikviewBI
Vladimir,
Slightly crazy solution attached.
The image will only appear when 'Pie' has been selected in the listbox, even when Pie is then unselected the image will remain. Until Pie has been selected the image will not appear.
Apologies for the random picture.
In my testing this doesn't work everytime as the OnChange Trigger associated with the 'v_Selected_Control' variable doesn't always fire - this may be a bug with my version of QV - if I go into Variable Overview then start clicking in the listbox it works as expected??
Components are:
OnOpen trigger to reset the v_Amends variable to 0
A variable (v_Selected_Control) with the expression: =if(GetSelectedCount(Item)>0,if(index(concat(Item,', '),'Pie'),1,0),0) so if 'Pie' is selected the result is 1 if not 0 and if nothing is selected it's also 0.
An OnChange Trigger looking at the v_Selected_Control variable that sets v_Amend to be v_Amend+1 each time v_Selected_Control changes.
the Image is conditionally displayed when the expression v_Amends>0
Basically v_Selected_Control only changes from 0 when 'Pie' is first selected and will only increase from there so you're image is displayed until the document is re-opened.
Hope that helps - apologies for the confusing explanation.
All the best,
Matt - Visual Analytics Ltd
Qlikview Design Blog: http://QVdesign.wordpress.com
@QlikviewBI
Matt,
Interesting solution and it seems to be working fine in my case.
Thanks for the suggestion.
Best regards,
Vladimir