<?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 Changing value of variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Changing-value-of-variable/m-p/211979#M504676</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent. .Number didn't work but I found that .String did and now the button works perfectly.&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jan 2010 17:12:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-01-14T17:12:55Z</dc:date>
    <item>
      <title>Changing value of variable</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-value-of-variable/m-p/211977#M504674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wonder if someone can help.&lt;/P&gt;&lt;P&gt;I set up a variable in script: LET vZoom=0;&lt;/P&gt;&lt;P&gt;I'm trying to create a button that will toggle the value of the variable between 0 and 1 every time I press it by running the following macro:&lt;/P&gt;&lt;P&gt;SUB Zoom_Toggle()&lt;BR /&gt; Select Case vZoom&lt;BR /&gt; Case 1&lt;BR /&gt; vTest=0&lt;BR /&gt; Case 0&lt;BR /&gt; vTest=1&lt;BR /&gt; End Select&lt;BR /&gt; ActiveDocument.Variables("vZoom").SetContent vTest, true&lt;BR /&gt;END SUB&lt;/P&gt;&lt;P&gt;However, the button only seems to change the value the first time I press it and stops working.&lt;/P&gt;&lt;P&gt;Am I missing something?&lt;/P&gt;&lt;P&gt;Thanks for helping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2010 13:59:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-value-of-variable/m-p/211977#M504674</guid>
      <dc:creator />
      <dc:date>2010-01-14T13:59:10Z</dc:date>
    </item>
    <item>
      <title>Changing value of variable</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-value-of-variable/m-p/211978#M504675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're not referencing the variable correctly in your Case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;SUB Zoom_Toggle()&lt;BR /&gt; Select Case ActiveDocument.Variables("vZoom").GetContent.Number&lt;BR /&gt; Case 1&lt;BR /&gt; vTest=0&lt;BR /&gt; Case 0&lt;BR /&gt; vTest=1&lt;BR /&gt; End Select&lt;BR /&gt; ActiveDocument.Variables("vZoom").SetContent vTest, true&lt;BR /&gt;END SUB&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I think it is .Number there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2010 15:59:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-value-of-variable/m-p/211978#M504675</guid>
      <dc:creator />
      <dc:date>2010-01-14T15:59:47Z</dc:date>
    </item>
    <item>
      <title>Changing value of variable</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-value-of-variable/m-p/211979#M504676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent. .Number didn't work but I found that .String did and now the button works perfectly.&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2010 17:12:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-value-of-variable/m-p/211979#M504676</guid>
      <dc:creator />
      <dc:date>2010-01-14T17:12:55Z</dc:date>
    </item>
  </channel>
</rss>

