<?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 Set Variable action not working as expected in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115498#M368305</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wondering if anybody has experience the following before as I haven't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a text box with the following actions with the default of vCustPremium set to "0".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Clear Customer field&lt;/P&gt;&lt;P&gt;2. Set Customers field: Premium Greater than 1000&lt;/P&gt;&lt;P&gt;3. Set Variable vCustPremium to:&amp;nbsp; If(GetSelectedCount(Customers)=0,1,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that the first time I click on the text box even though after the 2nd action there are no fields with Premium greater than 1000, it still keeps vCustPremium = 0. However when I click it a second time it correctly sets the vCustPremium = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do I have to click the button twice to get the variable to set to 1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 May 2016 16:33:03 GMT</pubDate>
    <dc:creator>zagzebski</dc:creator>
    <dc:date>2016-05-20T16:33:03Z</dc:date>
    <item>
      <title>Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115498#M368305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wondering if anybody has experience the following before as I haven't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a text box with the following actions with the default of vCustPremium set to "0".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Clear Customer field&lt;/P&gt;&lt;P&gt;2. Set Customers field: Premium Greater than 1000&lt;/P&gt;&lt;P&gt;3. Set Variable vCustPremium to:&amp;nbsp; If(GetSelectedCount(Customers)=0,1,0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that the first time I click on the text box even though after the 2nd action there are no fields with Premium greater than 1000, it still keeps vCustPremium = 0. However when I click it a second time it correctly sets the vCustPremium = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why do I have to click the button twice to get the variable to set to 1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 16:33:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115498#M368305</guid>
      <dc:creator>zagzebski</dc:creator>
      <dc:date>2016-05-20T16:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115499#M368306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, please attach an .qvw example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 16:50:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115499#M368306</guid>
      <dc:creator>PabloOrtiz</dc:creator>
      <dc:date>2016-05-20T16:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115500#M368307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Zagzebski,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Yes. I too faced the issue once and that happened randomly. I am too curious to know the reason ans solution. If you have example, please post here. It would be helpful to confirm whether this is bug or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 17:45:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115500#M368307</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-05-20T17:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115501#M368308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It might be easier to see the issue with a sample. Can either of you post a document which shows the issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 17:46:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115501#M368308</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-20T17:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115502#M368309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Sorry, I am not supposed to post my application here also the file size is nearly 5 GB. Maybe we can check with&amp;nbsp; &lt;STRONG style="font-size: 11.7px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/zagzebski"&gt;zagzebski&lt;/A&gt;‌. &lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 17:51:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115502#M368309</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-05-20T17:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115503#M368310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was talking about a sample. A new application with just the variables &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 17:52:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115503#M368310</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-20T17:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115504#M368311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I am too lazy for my own job. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; I will try to create a sample one. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 17:55:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115504#M368311</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-05-20T17:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115505#M368312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This happened to me long back and it did happened randomly.&amp;nbsp; if I remember well what I did was I cleared the field twice and then set the field value...&amp;nbsp; I think that fixed the issue. I will see if I can trace that code.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 18:05:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115505#M368312</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2016-05-20T18:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115506#M368313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny, I have tried the same procedure mentioned above in a sample application. But it's working fine in version 12. I have this issue in one of my app and the QV Version was 11.20 SR 9. Lets wait for OP's reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 18:08:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115506#M368313</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-05-20T18:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115507#M368314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds good &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 18:09:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115507#M368314</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-20T18:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115508#M368315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny, I have the issue in specific qvw file and not all the files. So, we need to test the original file.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/plain.png" /&gt;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 18:18:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115508#M368315</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-05-20T18:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115509#M368316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be there are other triggers or actions that have contradicting effect on selections? Not really sure what could be the problem without seeing it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 18:20:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115509#M368316</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-20T18:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115510#M368317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nagaraj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using version 11.20 SR 9 and tested your sample file and everything looks good. As Sunny said, if there are other triggers or actions then they are contradicting... Matter of fact when I had this issue long back I do have handful of triggers and actions on each button and I had half a dozen of buttons on the sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's see if Zag will post a sample file....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 18:32:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115510#M368317</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2016-05-20T18:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115511#M368318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;File attached. Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Zag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 21:40:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115511#M368318</guid>
      <dc:creator>zagzebski</dc:creator>
      <dc:date>2016-05-20T21:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115512#M368319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Step 1: Click on Property and Casualty button&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/125285_Capture.PNG" style="height: 180px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You field %KeyBoBBStratification get nothing selected. Although I see a selection criteria within the button for &lt;SPAN style="font-size: 13.3333px;"&gt;%KeyBoBBStratification but nothing actually gets selected&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2: Financial button&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/125286_Capture.PNG" style="height: 210px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have this variable action&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/125287_Capture.PNG" style="height: 357px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So since we did not have anything selected in &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;%KeyBoBBStratification&lt;/STRONG&gt; when we clicked on Property &amp;amp; Casualty, the &lt;STRONG&gt;GetSelectedCount(&lt;/STRONG&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;%KeyBoBBStratification) = 0 &lt;/STRONG&gt;meaning the variable vCrossSellNoCustomersFilter will be assigned the value 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But also notice that when you clicked Financial for the first time C got selected in &lt;STRONG style="font-size: 13.3333px;"&gt;%KeyBoBBStratification.&lt;/STRONG&gt; So now if you select Financial button one more time, you will see 0 because now the &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;GetSelectedCount(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;%KeyBoBBStratification) = 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if this can be fixed by just fixing the action within &lt;SPAN style="font-size: 13.3333px;"&gt;Property and Casualty button which will make certain selection in &lt;STRONG style="font-size: 13.3333px;"&gt;%KeyBoBBStratification&lt;/STRONG&gt;, but that is where I would start my troubleshooting.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 23:39:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115512#M368319</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-20T23:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable action not working as expected</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115513#M368320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny, Thirumala,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes. I too have many triggers in my application. I'll check and try to find the reason when I get time. Thank you guys for the suggestion. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 13:04:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-action-not-working-as-expected/m-p/1115513#M368320</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-05-23T13:04:12Z</dc:date>
    </item>
  </channel>
</rss>

