<?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 Current week/year Default Selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-week-year-Default-Selection/m-p/400935#M559616</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 am looking to set current week as a default selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have created a trigger&amp;nbsp; (based on object name week) as following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; weekyear(today(week)) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However this is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attached is a sample file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Bradley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Apr 2013 14:49:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-04-25T14:49:02Z</dc:date>
    <item>
      <title>Current week/year Default Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Current-week-year-Default-Selection/m-p/400935#M559616</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 am looking to set current week as a default selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have created a trigger&amp;nbsp; (based on object name week) as following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; weekyear(today(week)) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However this is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attached is a sample file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Bradley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 14:49:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-week-year-Default-Selection/m-p/400935#M559616</guid>
      <dc:creator />
      <dc:date>2013-04-25T14:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Current week/year Default Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Current-week-year-Default-Selection/m-p/400936#M559617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The weekyear function returns an integer value representing a year. For example &lt;SPAN class="Code"&gt;weekyear( '1996-12-30' )&lt;/SPAN&gt; returns &lt;SPAN class="Italic"&gt;1997&lt;/SPAN&gt;. The today() function can make use of 0,1 or 2 as parameter. Anything else won't do anything. So weekyear(today(week)) won't do what you want. At best it returns the current year. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending on what kind of data type week_year has you need either a date, in which case today() should suffice, or you need to construct a string:&amp;nbsp; year(today()) &amp;amp; '/' &amp;amp; week(today())&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 18:41:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-week-year-Default-Selection/m-p/400936#M559617</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-04-25T18:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Current week/year Default Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Current-week-year-Default-Selection/m-p/400937#M559618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works great,thanks for the advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it possible to change the value once default selection is on?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 19:50:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-week-year-Default-Selection/m-p/400937#M559618</guid>
      <dc:creator />
      <dc:date>2013-04-25T19:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Current week/year Default Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Current-week-year-Default-Selection/m-p/400938#M559619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A default selection is just a selection. So you can make new selection if you want. Just click on another value to select that. Pressing the Clear button would also remove it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 09:16:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-week-year-Default-Selection/m-p/400938#M559619</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-04-26T09:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Current week/year Default Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Current-week-year-Default-Selection/m-p/400939#M559620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for all the advise. However, in my case i have the problem that when the action is set on the field, it is impossible to remove the default selection value.&lt;/P&gt;&lt;P&gt;i have attached the qvw to the original message for further clarity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i suppose there is a parameter setting i have missed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Bradley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Apr 2013 19:03:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-week-year-Default-Selection/m-p/400939#M559620</guid>
      <dc:creator />
      <dc:date>2013-04-27T19:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Current week/year Default Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Current-week-year-Default-Selection/m-p/400940#M559621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This Problem is now Solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To ensure Default selection and the ability to change the default you need to set a trigger on on the field event with the selection OnSelect (Edit Action) and OnChange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help once again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OnChange&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Week &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OnSelect&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;week&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;today&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Apr 2013 09:02:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-week-year-Default-Selection/m-p/400940#M559621</guid>
      <dc:creator />
      <dc:date>2013-04-28T09:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Current week/year Default Selection</title>
      <link>https://community.qlik.com/t5/QlikView/Current-week-year-Default-Selection/m-p/400941#M559622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, that's because you added it to the field trigger. What happens now is that any time the selection in Week changes the selection is set to the week of today(). So if you choose week 2 the trigger fires and value 17 is selected. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just remove it from the field trigger and leave the action on the sheet trigger. You can also add the same action to the OnOpen document trigger so the right week is set when you open the document. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Apr 2013 13:56:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-week-year-Default-Selection/m-p/400941#M559622</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-04-28T13:56:46Z</dc:date>
    </item>
  </channel>
</rss>

