<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Trigger the flag when item is selected in ListBox in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Trigger-the-flag-when-item-is-selected-in-ListBox/m-p/329540#M121291</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vladimir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Slightly crazy solution attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies for the random picture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Components are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OnOpen trigger to reset the v_Amends variable to 0&lt;/P&gt;&lt;P&gt;A variable (v_Selected_Control) with the expression: =if(GetSelectedCount(Item)&amp;gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;the Image is conditionally displayed when the expression v_Amends&amp;gt;0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps - apologies for the confusing explanation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt - Visual Analytics Ltd&lt;/P&gt;&lt;P&gt;Qlikview Design Blog: &lt;A href="http://QVdesign.wordpress.com"&gt;http://QVdesign.wordpress.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;@QlikviewBI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jul 2012 15:54:05 GMT</pubDate>
    <dc:creator>matt_crowther</dc:creator>
    <dc:date>2012-07-31T15:54:05Z</dc:date>
    <item>
      <title>Trigger the flag when item is selected in ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-the-flag-when-item-is-selected-in-ListBox/m-p/329539#M121290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;I have few charts/tables that are hidden until user selects the specific item in a List Box.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;There is no "On Activate/On Show" action for the chart and there is no "On Select" action for List Box.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;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).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Basically I need to setup a flag once user sees the chart and keep this flag intact before page or application is closed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Any suggestions will be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Best Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;Vladimir &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 15:22:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-the-flag-when-item-is-selected-in-ListBox/m-p/329539#M121290</guid>
      <dc:creator>vlad_komarov</dc:creator>
      <dc:date>2012-07-31T15:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger the flag when item is selected in ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-the-flag-when-item-is-selected-in-ListBox/m-p/329540#M121291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vladimir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Slightly crazy solution attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies for the random picture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Components are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OnOpen trigger to reset the v_Amends variable to 0&lt;/P&gt;&lt;P&gt;A variable (v_Selected_Control) with the expression: =if(GetSelectedCount(Item)&amp;gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;the Image is conditionally displayed when the expression v_Amends&amp;gt;0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps - apologies for the confusing explanation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt - Visual Analytics Ltd&lt;/P&gt;&lt;P&gt;Qlikview Design Blog: &lt;A href="http://QVdesign.wordpress.com"&gt;http://QVdesign.wordpress.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;@QlikviewBI&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 15:54:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-the-flag-when-item-is-selected-in-ListBox/m-p/329540#M121291</guid>
      <dc:creator>matt_crowther</dc:creator>
      <dc:date>2012-07-31T15:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger the flag when item is selected in ListBox</title>
      <link>https://community.qlik.com/t5/QlikView/Trigger-the-flag-when-item-is-selected-in-ListBox/m-p/329541#M121292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interesting solution and it seems to be working fine in my case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Vladimir &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2012 04:14:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trigger-the-flag-when-item-is-selected-in-ListBox/m-p/329541#M121292</guid>
      <dc:creator>vlad_komarov</dc:creator>
      <dc:date>2012-08-01T04:14:55Z</dc:date>
    </item>
  </channel>
</rss>

