<?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 Resetting variables by Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Resetting-variables-by-Macro/m-p/829295#M1018952</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a document that uses a lot of hide/show variables controlled by buttons to display different menus. Initially each button included an if statement such as:&lt;/P&gt;&lt;P&gt;if(vShowMenu01 = 1, 0,1) which would toggle the menu on/off each time the button is pressed.&lt;/P&gt;&lt;P&gt;as well as individual set variable actions to hide any other open menus&lt;/P&gt;&lt;P&gt;vShowMenu02 = 0&lt;/P&gt;&lt;P&gt;vShowMenu03 = 0&lt;/P&gt;&lt;P&gt;and so on...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was looking for a better way to reset all other variables to 0 aside from the one I selected.&lt;/P&gt;&lt;P&gt;I did discover a macro on this forum ( &lt;A _jive_internal="true" href="https://community.qlik.com/thread/8567"&gt;http://community.qlik.com/thread/8567&lt;/A&gt;) which works to set everything 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I assigned the actions for the button to first run the macro (clear/hide everything) and then set only the selected variable linked to that button to 1 it doesn't seem to recognize the second command (the variable remains set to 0).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Mar 2015 17:14:37 GMT</pubDate>
    <dc:creator>hobanwashburne</dc:creator>
    <dc:date>2015-03-31T17:14:37Z</dc:date>
    <item>
      <title>Resetting variables by Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Resetting-variables-by-Macro/m-p/829295#M1018952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a document that uses a lot of hide/show variables controlled by buttons to display different menus. Initially each button included an if statement such as:&lt;/P&gt;&lt;P&gt;if(vShowMenu01 = 1, 0,1) which would toggle the menu on/off each time the button is pressed.&lt;/P&gt;&lt;P&gt;as well as individual set variable actions to hide any other open menus&lt;/P&gt;&lt;P&gt;vShowMenu02 = 0&lt;/P&gt;&lt;P&gt;vShowMenu03 = 0&lt;/P&gt;&lt;P&gt;and so on...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was looking for a better way to reset all other variables to 0 aside from the one I selected.&lt;/P&gt;&lt;P&gt;I did discover a macro on this forum ( &lt;A _jive_internal="true" href="https://community.qlik.com/thread/8567"&gt;http://community.qlik.com/thread/8567&lt;/A&gt;) which works to set everything 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I assigned the actions for the button to first run the macro (clear/hide everything) and then set only the selected variable linked to that button to 1 it doesn't seem to recognize the second command (the variable remains set to 0).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 17:14:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Resetting-variables-by-Macro/m-p/829295#M1018952</guid>
      <dc:creator>hobanwashburne</dc:creator>
      <dc:date>2015-03-31T17:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting variables by Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Resetting-variables-by-Macro/m-p/829296#M1018954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You expect the button actions to be executed in a sequence - but it is not always the case when it comes to variables.&lt;BR /&gt;Can you add that second action into the same macro?&amp;nbsp; Looks like you'll need a separate macro for each button...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 17:35:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Resetting-variables-by-Macro/m-p/829296#M1018954</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-31T17:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting variables by Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Resetting-variables-by-Macro/m-p/829297#M1018956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, because buttons have the promote/demote functionality I assumed that it would execute in sequence. I could add the second command within the macro, but as you stated, I would need a new macro for every button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a test qwd that functions exactly as I would like, however each button contains as many as 8 separate commands (explicitly resetting each variable).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would prefer each had two commands:&lt;/P&gt;&lt;P&gt;1- Show/Hide &lt;EM&gt;this&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;2-Hide everything else&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 18:05:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Resetting-variables-by-Macro/m-p/829297#M1018956</guid>
      <dc:creator>hobanwashburne</dc:creator>
      <dc:date>2015-03-31T18:05:55Z</dc:date>
    </item>
  </channel>
</rss>

