<?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: Why are all dates selected by my date picker? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Why-are-all-dates-selected-by-my-date-picker/m-p/543472#M482664</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I managed to fix this myself. The problem seems to be that even though the Set Variable-trigger is before the Select in Field-trigger, the Select in Field-trigger still uses the old variable value. I solved it by adding an IF-condition to the Select in Field-trigger, see below (note new variable names):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13753391107739900" jivemacro_uid="_13753391107739900"&gt;&lt;P&gt;=if(vDateTaskCreatedStart &amp;gt; vDateTaskCreatedEnd, '&amp;gt;=' &amp;amp; date(vDateTaskCreatedEnd) &amp;amp;'&amp;lt;=' &amp;amp; date(vDateTaskCreatedEnd),'&amp;gt;=' &amp;amp; date(vDateTaskCreatedStart) &amp;amp;'&amp;lt;=' &amp;amp; date(vDateTaskCreatedEnd))&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Aug 2013 06:38:34 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-08-01T06:38:34Z</dc:date>
    <item>
      <title>Why are all dates selected by my date picker?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-are-all-dates-selected-by-my-date-picker/m-p/543471#M482663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have constructed a date picker by having two calendar objects. The first sets &lt;EM&gt;vSearchDateStart &lt;/EM&gt;and the other &lt;EM&gt;vSearchDateEnd&lt;/EM&gt;. These two date pickers then do selections to the field &lt;EM&gt;Created1_TASK&lt;/EM&gt;. This is done by triggers as such (showing triggers for the datepicker for &lt;EM&gt;vSearchDateEnd)&lt;/EM&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Set Variable &lt;EM&gt;vSearchDateStart&lt;/EM&gt;: (this is a check to see that the end-date is not before the start-date)&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13752585836934985" jivemacro_uid="_13752585836934985"&gt;&lt;P&gt;=If(vSearchDateStart &amp;gt; vSearchDateEnd, vSearchDateEnd, vSearchDateStart)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 2. Select in Field &lt;EM&gt;Created1_TASK&lt;/EM&gt;:&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13752586835818106" jivemacro_uid="_13752586835818106"&gt;&lt;P&gt;='&amp;lt;=' &amp;amp; date(vSearchDateEnd) &amp;amp; '&amp;gt;=' &amp;amp; date(vSearchDateStart) &lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All works very well except when I select a date that is earlier than &lt;EM&gt;vSearchDateStart&lt;/EM&gt;. If I do so then all dates in &lt;EM&gt;Created1_TASK&lt;/EM&gt; are selected. This does not occur if I select the same value as in &lt;EM&gt;vSearchDateStart&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess there is something wrong with the logic in the Set variable but I can't figure out what.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone spot the problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jul 2013 08:21:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-are-all-dates-selected-by-my-date-picker/m-p/543471#M482663</guid>
      <dc:creator />
      <dc:date>2013-07-31T08:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Why are all dates selected by my date picker?</title>
      <link>https://community.qlik.com/t5/QlikView/Why-are-all-dates-selected-by-my-date-picker/m-p/543472#M482664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I managed to fix this myself. The problem seems to be that even though the Set Variable-trigger is before the Select in Field-trigger, the Select in Field-trigger still uses the old variable value. I solved it by adding an IF-condition to the Select in Field-trigger, see below (note new variable names):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13753391107739900" jivemacro_uid="_13753391107739900"&gt;&lt;P&gt;=if(vDateTaskCreatedStart &amp;gt; vDateTaskCreatedEnd, '&amp;gt;=' &amp;amp; date(vDateTaskCreatedEnd) &amp;amp;'&amp;lt;=' &amp;amp; date(vDateTaskCreatedEnd),'&amp;gt;=' &amp;amp; date(vDateTaskCreatedStart) &amp;amp;'&amp;lt;=' &amp;amp; date(vDateTaskCreatedEnd))&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 06:38:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Why-are-all-dates-selected-by-my-date-picker/m-p/543472#M482664</guid>
      <dc:creator />
      <dc:date>2013-08-01T06:38:34Z</dc:date>
    </item>
  </channel>
</rss>

