<?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 Run a Macro after The Clear Button is clicked in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Run-a-Macro-after-The-Clear-Button-is-clicked/m-p/281282#M499653</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my qvw I have some selections that I realy need to maintain some consistences. However, when I click on the Clear Button, All selection&lt;/P&gt;&lt;P&gt;is gone (including the Locked ones).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to run a macro after I clicked the Clear Button ? Or some other way to force running a macro after that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 May 2011 17:02:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-05-06T17:02:05Z</dc:date>
    <item>
      <title>Run a Macro after The Clear Button is clicked</title>
      <link>https://community.qlik.com/t5/QlikView/Run-a-Macro-after-The-Clear-Button-is-clicked/m-p/281282#M499653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my qvw I have some selections that I realy need to maintain some consistences. However, when I click on the Clear Button, All selection&lt;/P&gt;&lt;P&gt;is gone (including the Locked ones).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to run a macro after I clicked the Clear Button ? Or some other way to force running a macro after that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 17:02:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-a-Macro-after-The-Clear-Button-is-clicked/m-p/281282#M499653</guid>
      <dc:creator />
      <dc:date>2011-05-06T17:02:05Z</dc:date>
    </item>
    <item>
      <title>Run a Macro after The Clear Button is clicked</title>
      <link>https://community.qlik.com/t5/QlikView/Run-a-Macro-after-The-Clear-Button-is-clicked/m-p/281283#M499654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can trigger an Action (including a macro) off "OnAnySelect" event - it's defined in Document Properties, "Triggers". I'm not totally positive, but I think "OnAnySelect" should get triggered when all selections are cleared. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within the macro, you can then validate what selections are made, and build your logic accordingly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 17:07:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-a-Macro-after-The-Clear-Button-is-clicked/m-p/281283#M499654</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2011-05-06T17:07:02Z</dc:date>
    </item>
    <item>
      <title>Run a Macro after The Clear Button is clicked</title>
      <link>https://community.qlik.com/t5/QlikView/Run-a-Macro-after-The-Clear-Button-is-clicked/m-p/281284#M499655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oleg's approach will give you more possibilities. However, depending on you need you could set a clear state to return the selection to a previously determined setting when the user click on clear (instead of clearing everything).&lt;/P&gt;&lt;P&gt;Make your selections, go to the clear button and open a small combo box on the right. &lt;/P&gt;&lt;P&gt;Click set clear state. &lt;/P&gt;&lt;P&gt;After this, the clear button go back to this selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 17:14:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-a-Macro-after-The-Clear-Button-is-clicked/m-p/281284#M499655</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-05-06T17:14:29Z</dc:date>
    </item>
    <item>
      <title>Run a Macro after The Clear Button is clicked</title>
      <link>https://community.qlik.com/t5/QlikView/Run-a-Macro-after-The-Clear-Button-is-clicked/m-p/281285#M499656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The OnAny Select appears to apply when you make any selection, not only with the Clear Button.&lt;/P&gt;&lt;P&gt;I liked the Idea of the Clear State, but there's a problem: it doesn't save the values of the variables. Any idea how to solve that ?&lt;/P&gt;&lt;P&gt;Thanks !!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 17:52:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-a-Macro-after-The-Clear-Button-is-clicked/m-p/281285#M499656</guid>
      <dc:creator />
      <dc:date>2011-05-06T17:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Run a Macro after The Clear Button is clicked</title>
      <link>https://community.qlik.com/t5/QlikView/Run-a-Macro-after-The-Clear-Button-is-clicked/m-p/281286#M499657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I was able to run a macro when all the selections were cleared. &lt;/P&gt;&lt;P&gt;First, I created a variable vClear = isnull(GetCurrentSelections())&lt;/P&gt;&lt;P&gt;It can be true or false. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that, I include a OnChange trigger on this variable to call a macro (message) &lt;/P&gt;&lt;P&gt;with the following code: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub message&lt;/P&gt;&lt;P&gt;set x = ActiveDocument.GetCurrentSelections&lt;/P&gt;&lt;P&gt;s = x.Selections&lt;/P&gt;&lt;P&gt;v = x.VarId&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'msgbox ActiveDocument.ActiveSheet.GetCurrentSelections.count&lt;/P&gt;&lt;P&gt; if ubound(s)&amp;lt;0 then &lt;/P&gt;&lt;P&gt; msgbox ("You cleared all the selections")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of the msgbox you could have any code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I couldn't find a way to dfferenciate a clear button from a one-by-one clear field. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I include my sample app here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 May 2011 18:31:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Run-a-Macro-after-The-Clear-Button-is-clicked/m-p/281286#M499657</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-05-08T18:31:49Z</dc:date>
    </item>
  </channel>
</rss>

