<?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 inconsistent variable behaviour in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/inconsistent-variable-behaviour/m-p/515663#M192564</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts, &lt;/P&gt;&lt;P&gt;This is an interesting one that I can't work out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I add a new variable, lets call it ShowSettings and I set it to 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set ShowSettings = 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I add a button and I add an action:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="44443" class="jive-image-thumbnail jive-image" onclick="" alt="CapturFiles_46.png" src="https://community.qlik.com/legacyfs/online/44443_CapturFiles_46.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I click on the button, nothing happens.&lt;/P&gt;&lt;P&gt;If I add the following code:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="44447" class="jive-image" alt="CapturFiles_48.png" src="https://community.qlik.com/legacyfs/online/44447_CapturFiles_48.png" /&gt;&lt;/P&gt;&lt;P&gt;still nothing happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I add:&lt;/P&gt;&lt;P&gt;=num(ShowSettings +1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get 1111 etc each time I add it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The interesting thing is that it is&lt;STRONG&gt; very inconsistent. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On some documents it works fine; for example, if I create a brand new document, then it will work OK. &lt;/P&gt;&lt;P&gt;I have tried it on the V11 IR, SR1 and SR2 versions. IR is the worse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is almost like the variable is being cast as a character. &lt;/P&gt;&lt;P&gt;I can work around it, but it is a pain, as I wanted to copy a whole lot of sheets which use that logic and work OK in another document. I suppose I could start again and copy everything over..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Jul 2013 22:00:12 GMT</pubDate>
    <dc:creator>johnpaul</dc:creator>
    <dc:date>2013-07-23T22:00:12Z</dc:date>
    <item>
      <title>inconsistent variable behaviour</title>
      <link>https://community.qlik.com/t5/QlikView/inconsistent-variable-behaviour/m-p/515663#M192564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts, &lt;/P&gt;&lt;P&gt;This is an interesting one that I can't work out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I add a new variable, lets call it ShowSettings and I set it to 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set ShowSettings = 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I add a button and I add an action:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="44443" class="jive-image-thumbnail jive-image" onclick="" alt="CapturFiles_46.png" src="https://community.qlik.com/legacyfs/online/44443_CapturFiles_46.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I click on the button, nothing happens.&lt;/P&gt;&lt;P&gt;If I add the following code:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="44447" class="jive-image" alt="CapturFiles_48.png" src="https://community.qlik.com/legacyfs/online/44447_CapturFiles_48.png" /&gt;&lt;/P&gt;&lt;P&gt;still nothing happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I add:&lt;/P&gt;&lt;P&gt;=num(ShowSettings +1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get 1111 etc each time I add it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The interesting thing is that it is&lt;STRONG&gt; very inconsistent. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On some documents it works fine; for example, if I create a brand new document, then it will work OK. &lt;/P&gt;&lt;P&gt;I have tried it on the V11 IR, SR1 and SR2 versions. IR is the worse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is almost like the variable is being cast as a character. &lt;/P&gt;&lt;P&gt;I can work around it, but it is a pain, as I wanted to copy a whole lot of sheets which use that logic and work OK in another document. I suppose I could start again and copy everything over..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2013 22:00:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/inconsistent-variable-behaviour/m-p/515663#M192564</guid>
      <dc:creator>johnpaul</dc:creator>
      <dc:date>2013-07-23T22:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: inconsistent variable behaviour</title>
      <link>https://community.qlik.com/t5/QlikView/inconsistent-variable-behaviour/m-p/515664#M192565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you should state the variable name under 'Variable' in your action dialog without the equal sign, just&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ShowSettings&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Value' with expression&lt;/P&gt;&lt;P&gt;=ShowSettings *-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should work then.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2013 22:16:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/inconsistent-variable-behaviour/m-p/515664#M192565</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-07-23T22:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: inconsistent variable behaviour</title>
      <link>https://community.qlik.com/t5/QlikView/inconsistent-variable-behaviour/m-p/515665#M192566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are 100% right.&lt;/P&gt;&lt;P&gt;I normally use the =variable to ensure that I don't mis type it.&lt;/P&gt;&lt;P&gt;Then I remove the = sign.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I took the screenshot, it was before I removed the = sign.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happens is the following when the action fires:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when it first is multiplied 1 * -1 the result is -0, then the second time it is 0 and it remains at 0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2013 23:24:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/inconsistent-variable-behaviour/m-p/515665#M192566</guid>
      <dc:creator>johnpaul</dc:creator>
      <dc:date>2013-07-23T23:24:13Z</dc:date>
    </item>
  </channel>
</rss>

