<?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 Selection by default in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143005#M22381</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Sorry for my bad english&lt;/P&gt;&lt;P&gt;I want to have a selection by default when I open qlik file...&lt;/P&gt;&lt;P&gt;I want to select data of the "d" day&lt;/P&gt;&lt;P&gt;How I can do this...&lt;/P&gt;&lt;P&gt;Thanks for your help &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Apr 2009 16:38:22 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-04-30T16:38:22Z</dc:date>
    <item>
      <title>Selection by default</title>
      <link>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143005#M22381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Sorry for my bad english&lt;/P&gt;&lt;P&gt;I want to have a selection by default when I open qlik file...&lt;/P&gt;&lt;P&gt;I want to select data of the "d" day&lt;/P&gt;&lt;P&gt;How I can do this...&lt;/P&gt;&lt;P&gt;Thanks for your help &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 16:38:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143005#M22381</guid>
      <dc:creator />
      <dc:date>2009-04-30T16:38:22Z</dc:date>
    </item>
    <item>
      <title>Selection by default</title>
      <link>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143006#M22382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i have understood from your requirement to select today`s date form the date field &lt;IMG alt="Ick!" src="http://community.qlik.com/emoticons/emotion-41.gif" /&gt;&lt;/P&gt;&lt;P&gt;If my understanding is correct, following code will help you to do the same.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;sub Select_Date()&lt;BR /&gt;Dim vDate&lt;BR /&gt;vDate = day(date) &amp;amp;"/"&amp;amp; month(date) &amp;amp;"/"&amp;amp; year(date)&lt;BR /&gt; ActiveDocument.Fields("Date").Select vDate&lt;BR /&gt;End sub&lt;/P&gt;&lt;P&gt;Map this function to &lt;B&gt;onopen&lt;/B&gt; in Document event trigger in document settings &lt;B&gt;.&lt;BR /&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Check the attached application.&lt;/P&gt;&lt;P&gt;Good Luck &lt;IMG alt="Yes" src="http://community.qlik.com/emoticons/emotion-21.gif" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Sridhar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 17:07:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143006#M22382</guid>
      <dc:creator />
      <dc:date>2009-04-30T17:07:57Z</dc:date>
    </item>
    <item>
      <title>Selection by default</title>
      <link>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143007#M22383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using the document in server environment, 'onopen' has no meaning. You can have the macro fire by passing the name in the URL though:&lt;/P&gt;&lt;P&gt;qvp://servername/documentname.qvw?MACRO=Select_Date()&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 17:24:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143007#M22383</guid>
      <dc:creator />
      <dc:date>2009-04-30T17:24:35Z</dc:date>
    </item>
    <item>
      <title>Selection by default</title>
      <link>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143008#M22384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tks gordon.savage and sridhar24784&lt;/P&gt;&lt;P&gt;It's working but I want the last day... &lt;IMG alt="Huh?" src="http://community.qlik.com/emoticons/emotion-18.gif" /&gt;&lt;/P&gt;&lt;P&gt;I don't know how calculate the last day with the function day()&lt;/P&gt;&lt;P&gt;I have do this :&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;sub Select_Date()&lt;BR /&gt;Dim vYear ,vMonth,vDay&lt;BR /&gt;vYear = year(date)&lt;BR /&gt;ActiveDocument.Fields("CALENDAR.annee").Select vYear&lt;BR /&gt;vMonth= month(date)&lt;BR /&gt;ActiveDocument.Fields("CALENDAR.month").Select vMonth&lt;BR /&gt;vDay= day(date)&lt;BR /&gt;ActiveDocument.Fields("CALENDAR.day").Select vDay&lt;BR /&gt;End sub&lt;/P&gt;&lt;P&gt;And if i do vDay=day(date)&lt;B&gt;-1&lt;/B&gt; it's not work for the first day of month (01/05/2009 -&amp;gt; 00/05/2009 &lt;IMG alt="Sad" src="http://community.qlik.com/emoticons/emotion-6.gif" /&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 18:43:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143008#M22384</guid>
      <dc:creator />
      <dc:date>2009-04-30T18:43:55Z</dc:date>
    </item>
    <item>
      <title>Selection by default</title>
      <link>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143009#M22385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Last day in the sense...?&lt;/P&gt;&lt;P&gt;you mean to say the maximum of the date field...? &lt;IMG alt="Confused" src="http://community.qlik.com/emoticons/emotion-43.gif" /&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sridhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 18:47:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143009#M22385</guid>
      <dc:creator />
      <dc:date>2009-04-30T18:47:03Z</dc:date>
    </item>
    <item>
      <title>Selection by default</title>
      <link>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143010#M22386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes it's a possible solution but it's the maximum of date of another table...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 19:04:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143010#M22386</guid>
      <dc:creator />
      <dc:date>2009-04-30T19:04:07Z</dc:date>
    </item>
    <item>
      <title>Selection by default</title>
      <link>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143011#M22387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use the below code for that scenario.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;sub test()&lt;BR /&gt;set f = ActiveDocument.GetField ("Date")&lt;BR /&gt; f.TopSelect "max (Date)", 1&lt;BR /&gt;End sub&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;check the attached application.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Regards&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Sridhar&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 19:18:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143011#M22387</guid>
      <dc:creator />
      <dc:date>2009-04-30T19:18:52Z</dc:date>
    </item>
    <item>
      <title>Selection by default</title>
      <link>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143012#M22388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's OK&lt;/P&gt;&lt;P&gt;Tks for all your help &lt;IMG alt="Yes" src="http://community.qlik.com/emoticons/emotion-21.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 19:57:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143012#M22388</guid>
      <dc:creator />
      <dc:date>2009-04-30T19:57:00Z</dc:date>
    </item>
    <item>
      <title>Selection by default</title>
      <link>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143013#M22389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;gordon.savage wrote:If you are using the document in server environment, 'onopen' has no meaning&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I know the doc says not to use OnOpen in the server environment. But...I always do use it for initial selections. I'll bet many others do, and it works.&lt;/P&gt;&lt;P&gt;Does anyone have thoughts about using OnOpen in QVS to make initial selections? (I'm only talking doing Selects - not properiy changes). Is it really possible that it won't work some day?&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 May 2009 03:42:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143013#M22389</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-05-01T03:42:36Z</dc:date>
    </item>
    <item>
      <title>Selection by default</title>
      <link>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143014#M22390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using initial selections on open in most apps, including on server, and it never fails. Well, unless user blocks the macros, of course...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 May 2009 04:33:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143014#M22390</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-01T04:33:19Z</dc:date>
    </item>
    <item>
      <title>Selection by default</title>
      <link>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143015#M22391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;I hope you are not suggesting the manual may be wrong? &lt;IMG alt="Smile" src="http://community.qlik.com/emoticons/emotion-1.gif" /&gt; As I mentioned, I pass an initial macro to call to set initial selections just in case the rug ever gets pulled out from the 'OnOpen' trigger.&lt;/P&gt;&lt;P&gt;Incidentally, is it me or do the QT techies not seem very responsive on the forum these days?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 May 2009 15:30:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143015#M22391</guid>
      <dc:creator />
      <dc:date>2009-05-01T15:30:31Z</dc:date>
    </item>
    <item>
      <title>Selection by default</title>
      <link>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143016#M22392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gordon,&lt;/P&gt;&lt;P&gt;Where is this set up?&lt;/P&gt;&lt;P&gt;Stuart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2009 23:07:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selection-by-default/m-p/143016#M22392</guid>
      <dc:creator />
      <dc:date>2009-08-21T23:07:24Z</dc:date>
    </item>
  </channel>
</rss>

