<?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 Re: Set Variable and Select in Field Actions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Variable-and-Select-in-Field-Actions/m-p/1340669#M413048</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have a sample app?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You shouldn't have to have the set variable action in your button press.&amp;nbsp; The variables should get updated automatically when the user uses the calendar object.&lt;/P&gt;&lt;P&gt;The button should only have the Select in Field action.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 May 2017 21:23:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-05-25T21:23:00Z</dc:date>
    <item>
      <title>Set Variable and Select in Field Actions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-and-Select-in-Field-Actions/m-p/1340667#M413046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Set Variable does not take effect until all actions completed. Is this expected behaviour?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Whilst developing I have three text objects which show the three variables &lt;SPAN style="color: #999999;"&gt;vReportDateM1&lt;/SPAN&gt;, &lt;SPAN style="color: #999999;"&gt;vReportDate&lt;/SPAN&gt; and &lt;SPAN style="color: #999999;"&gt;vReportDateP1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I have a calendar object which linked to &lt;SPAN style="color: #999999; font-size: 10pt;"&gt;vReportDate&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;And I have a button with four actions:&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; border-image: none;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Action&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Variable&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Set Variable&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;vReportDateM1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;Date&lt;/SPAN&gt;(&lt;SPAN style="color: #999999;"&gt;&lt;EM&gt;$(vReportDate)&lt;/EM&gt;&lt;/SPAN&gt;)-1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Set Variable&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;vReportDateP1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;=&lt;SPAN style="color: #0000ff;"&gt;Date&lt;/SPAN&gt;(&lt;SPAN style="color: #999999;"&gt;&lt;EM&gt;$(vReportDate)&lt;/EM&gt;&lt;/SPAN&gt;)+1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD colspan="1" style="text-align: center; background-color: #6690bc; color: #ffffff;"&gt;&lt;/TD&gt;&lt;TD style="text-align: center; background-color: #6690bc; color: #ffffff;"&gt;&lt;STRONG&gt;Action&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD colspan="1" style="text-align: center; background-color: #6690bc; color: #ffffff;"&gt;&lt;STRONG&gt;Field&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD colspan="1" style="text-align: center; background-color: #6690bc; color: #ffffff;"&gt;&lt;STRONG&gt;Search String&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Select In Field&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;StartDate&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;= '(' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Date&lt;/SPAN&gt;(&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vReportDateM1)&lt;/EM&gt;&lt;/STRONG&gt;) &amp;amp; '|' &amp;amp; &lt;SPAN style="color: #0000ff;"&gt;Date&lt;/SPAN&gt;(&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vReportDate)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) &amp;amp;')' &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Select In Field&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;EndDate&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;= '(' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Date&lt;/SPAN&gt;(&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vReportDate)&lt;/EM&gt;&lt;/STRONG&gt;) &amp;amp; '|' &amp;amp; &lt;SPAN style="color: #0000ff;"&gt;Date&lt;/SPAN&gt;(&lt;STRONG&gt;&lt;EM style=": ; color: #808080;"&gt;$(vReportDateP1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) &amp;amp;')' &lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;The user should use the calendar object to select a desired date and then click the button to apply the filters.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;What happens is the three text objects show the updated variables but the Current Selections box shows that the vReportDateM1 and vReportDateP1 still hold their previous value. Clicking the button a second time then the Current Selections box shows the newly updated variables.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;This suggests to me that as actions 3 and 4 are being applied the change of the variable specified during actions 1 and 2 have not taken place until after all actions have completed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Is this expected behaviour (I hope not) or is this because I am on an old version (- QlikView 11.20.12904.0 SR12)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2017 18:02:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-and-Select-in-Field-Actions/m-p/1340667#M413046</guid>
      <dc:creator>lawrenceiow</dc:creator>
      <dc:date>2017-05-25T18:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable and Select in Field Actions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-and-Select-in-Field-Actions/m-p/1340668#M413047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, this is expected behavior. Multiple actions are multi-threaded. The second action does not wait for the first to finish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use macros, if that is an acceptable solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2017 18:24:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-and-Select-in-Field-Actions/m-p/1340668#M413047</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2017-05-25T18:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable and Select in Field Actions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-and-Select-in-Field-Actions/m-p/1340669#M413048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have a sample app?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You shouldn't have to have the set variable action in your button press.&amp;nbsp; The variables should get updated automatically when the user uses the calendar object.&lt;/P&gt;&lt;P&gt;The button should only have the Select in Field action.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2017 21:23:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-and-Select-in-Field-Actions/m-p/1340669#M413048</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-25T21:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable and Select in Field Actions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-and-Select-in-Field-Actions/m-p/1340670#M413049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply &lt;A href="https://community.qlik.com/qlik-users/208667"&gt;atkinsow&lt;/A&gt;‌, I am setting three variables and, as far as I know, the calendar object will only set one variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2017 09:01:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-and-Select-in-Field-Actions/m-p/1340670#M413049</guid>
      <dc:creator>lawrenceiow</dc:creator>
      <dc:date>2017-05-26T09:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable and Select in Field Actions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-and-Select-in-Field-Actions/m-p/1340671#M413050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply &lt;A href="https://community.qlik.com/qlik-users/6142"&gt;mwoolf&lt;/A&gt;‌ -&amp;nbsp; multi-threaded! I hadn't considered that, are you sure about that as that would then mean the order of the actions are not significant? What is the purpose of the Promote and Demote buttons if it is multi-threaded? I guess a newer version of QlikView could be multi-threaded?&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/164840_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2017 09:13:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-and-Select-in-Field-Actions/m-p/1340671#M413050</guid>
      <dc:creator>lawrenceiow</dc:creator>
      <dc:date>2017-05-26T09:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable and Select in Field Actions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-and-Select-in-Field-Actions/m-p/1340672#M413051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your other variables are referencing the calendar variable.&amp;nbsp; So when the calendar variable gets updated, the other variables should auto update as well.&amp;nbsp;&amp;nbsp;&amp;nbsp; You shouldn't need to declare the variables in the button actions.&lt;/P&gt;&lt;P&gt;Do you have an app to share?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See is this helps.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/36922"&gt;The use of variables to filter a date range&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2017 14:33:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-and-Select-in-Field-Actions/m-p/1340672#M413051</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-26T14:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variable and Select in Field Actions</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variable-and-Select-in-Field-Actions/m-p/1340673#M413052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;It was my fault for following bad practice as my variables &lt;SPAN style="color: #999999;"&gt;&lt;EM&gt;vReportDateP1&lt;/EM&gt;&lt;/SPAN&gt; and &lt;SPAN style="color: #999999;"&gt;&lt;EM&gt;vReportDateM1&lt;/EM&gt;&lt;/SPAN&gt; were simply dates, if I'd set them up as expressions then I could see how they would update when the calendar object changed &lt;SPAN style="color: #999999;"&gt;&lt;EM&gt;vReportDate&lt;/EM&gt;&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;In actual fact I didn't need to have those two extra variables at all, I should have simply done the calculation directly in the Search String:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000;"&gt;= '(' &amp;amp; &lt;SPAN style="color: #3366ff;"&gt;Date&lt;/SPAN&gt;(&lt;SPAN style="color: #999999;"&gt;&lt;EM&gt;$(vReportDate)&lt;/EM&gt;&lt;/SPAN&gt;-1) &amp;amp; '|' &amp;amp; &lt;SPAN style="color: #3366ff;"&gt;Date&lt;/SPAN&gt;(&lt;SPAN style="color: #999999;"&gt;&lt;EM&gt;$(vReportDate)&lt;/EM&gt;&lt;/SPAN&gt;) &amp;amp;')'&lt;/P&gt;&lt;P style="color: #000000;"&gt;= '(' &amp;amp; &lt;SPAN style="color: #3366ff;"&gt;Date&lt;/SPAN&gt;(&lt;SPAN style="color: #999999;"&gt;&lt;EM&gt;$(vReportDate)&lt;/EM&gt;&lt;/SPAN&gt;) &amp;amp; '|' &amp;amp; &lt;SPAN style="color: #3366ff;"&gt;Date&lt;/SPAN&gt;(&lt;SPAN style="color: #999999;"&gt;&lt;EM&gt;$(vReportDate)&lt;/EM&gt;&lt;/SPAN&gt;+1) &amp;amp;')'&lt;/P&gt;&lt;P style="color: #000000;"&gt;&lt;/P&gt;&lt;P style="color: #000000;"&gt;I just wish I had thought of that on Thursday when I had the problem. instead of as I drove in to work on Friday morning.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 11:55:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variable-and-Select-in-Field-Actions/m-p/1340673#M413052</guid>
      <dc:creator>lawrenceiow</dc:creator>
      <dc:date>2017-05-30T11:55:23Z</dc:date>
    </item>
  </channel>
</rss>

