<?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 Macro randomly does not set variable? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-randomly-does-not-set-variable/m-p/201677#M500134</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did the following:&lt;/P&gt;&lt;P&gt;ActiveDocument.GetApplication.WaitForIdle 3000&lt;BR /&gt; ActiveDocument.Variables("vAgeEnd").SetContent "1", true&lt;BR /&gt; ActiveDocument.GetApplication.WaitForIdle 3000&lt;BR /&gt; ActiveDocument.Variables("vAgeStart").SetContent "1", true&lt;BR /&gt; ActiveDocument.GetApplication.WaitForIdle 3000&lt;/P&gt;&lt;P&gt;And vAgeEnd remained the 999 it was before executing these statements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Apr 2011 17:37:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-07T17:37:38Z</dc:date>
    <item>
      <title>Macro randomly does not set variable?</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-randomly-does-not-set-variable/m-p/201674#M500131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings.&lt;/P&gt;&lt;P&gt;I have a macro that sets variables that is setting a start and end age:&lt;/P&gt;&lt;P&gt;ActiveDocument.Variables("vAgeEnd").SetContent "63", true&lt;BR /&gt;ActiveDocument.Variables("vAgeStart").SetContent "23", true&lt;/P&gt;&lt;P&gt;There are all sorts of age ranges that it sets, based on a number of things in the system. Occasionally, it will set one age, and not the other. I found that if I changed the order of the settings (Usually I set vAgeStart first, then the vAgeEnd) it "fixes" the problem, but then later on, if I happen to be coming from a particular selection, it won't work. In some cases, in the one macro, I set these two variables more than once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone ever seen anything like this? Is it a known problem? Its killing me, because I'm constantly rechecking my code, thinking I've programmed something wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2011 19:08:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-randomly-does-not-set-variable/m-p/201674#M500131</guid>
      <dc:creator />
      <dc:date>2011-04-06T19:08:51Z</dc:date>
    </item>
    <item>
      <title>Macro randomly does not set variable?</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-randomly-does-not-set-variable/m-p/201675#M500132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sally,&lt;BR /&gt;Try to insert WaitForIdle or Sleep before each variable setting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2011 20:20:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-randomly-does-not-set-variable/m-p/201675#M500132</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-04-06T20:20:13Z</dc:date>
    </item>
    <item>
      <title>Macro randomly does not set variable?</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-randomly-does-not-set-variable/m-p/201676#M500133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried with WaitForIdle, but didn't seem to make a difference (other than generally slowing down the screen). But I may have not tried it before each setting. I'll give that a try and see what happens.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2011 21:00:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-randomly-does-not-set-variable/m-p/201676#M500133</guid>
      <dc:creator />
      <dc:date>2011-04-06T21:00:53Z</dc:date>
    </item>
    <item>
      <title>Macro randomly does not set variable?</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-randomly-does-not-set-variable/m-p/201677#M500134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did the following:&lt;/P&gt;&lt;P&gt;ActiveDocument.GetApplication.WaitForIdle 3000&lt;BR /&gt; ActiveDocument.Variables("vAgeEnd").SetContent "1", true&lt;BR /&gt; ActiveDocument.GetApplication.WaitForIdle 3000&lt;BR /&gt; ActiveDocument.Variables("vAgeStart").SetContent "1", true&lt;BR /&gt; ActiveDocument.GetApplication.WaitForIdle 3000&lt;/P&gt;&lt;P&gt;And vAgeEnd remained the 999 it was before executing these statements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2011 17:37:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-randomly-does-not-set-variable/m-p/201677#M500134</guid>
      <dc:creator />
      <dc:date>2011-04-07T17:37:38Z</dc:date>
    </item>
    <item>
      <title>Macro randomly does not set variable?</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-randomly-does-not-set-variable/m-p/201678#M500135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DUH.&lt;/P&gt;&lt;P&gt;I forgot I had constraints on these. If the new vAgeStart date was greater than the current vAgeEnd, it wouldn't update the variable (but I got no warning message like if I tried to do it manually). So. I check for the old values before adding the new values and it all works file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2011 21:04:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-randomly-does-not-set-variable/m-p/201678#M500135</guid>
      <dc:creator />
      <dc:date>2011-04-07T21:04:21Z</dc:date>
    </item>
  </channel>
</rss>

