<?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 Select &amp; Lock selection in the script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217105#M70354</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove from OnPostReload, only OnOpen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Feb 2011 18:08:51 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-15T18:08:51Z</dc:date>
    <item>
      <title>Select &amp; Lock selection in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217097#M70346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I've developed a QV file with information based on the last 5 years and organised by region/market/...&lt;/P&gt;&lt;P&gt;I would like the year to be selected and locked when I reload the data.&lt;/P&gt;&lt;P&gt;Is there a simple way to have this integrated in the script. I tried the following but (of course) it didn't work.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;ActiveDocument.Fields("PERIOD_ID").Select "2010";&lt;/P&gt;&lt;P style="font-weight: bold"&gt;ActiveDocument.Fields("PERIOD_ID").Lock;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 14:57:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217097#M70346</guid>
      <dc:creator />
      <dc:date>2011-02-15T14:57:53Z</dc:date>
    </item>
    <item>
      <title>Select &amp; Lock selection in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217098#M70347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;Access Tools &amp;gt; Edit Module copy and past this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Sub SelectAndLock&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt; ActiveDocument.Fields("PERIOD_ID").Select "2010"&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt; ActiveDocument.Fields("PERIOD_ID").Lock&lt;/P&gt;&lt;P style="font-weight: bold"&gt;End Sub&lt;/P&gt;&lt;P&gt;Click in Check and OK.&lt;/P&gt;&lt;P&gt;After, Access Settings &amp;gt; Document Properties &amp;gt; Triggers &amp;gt; OnPostReload add action External for Run the Macro.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 15:19:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217098#M70347</guid>
      <dc:creator />
      <dc:date>2011-02-15T15:19:09Z</dc:date>
    </item>
    <item>
      <title>Select &amp; Lock selection in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217099#M70348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fernando&lt;/P&gt;&lt;P&gt;Thanks a lot for the quick reply.&lt;/P&gt;&lt;P&gt;It looks OK. And what if I want to have a multiple selection (e.g 2009 AND 2010).&lt;/P&gt;&lt;P&gt;Should I write select (2010, 2009) ? It seems that it is not recognised as a value list.&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 15:32:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217099#M70348</guid>
      <dc:creator />
      <dc:date>2011-02-15T15:32:18Z</dc:date>
    </item>
    <item>
      <title>Select &amp; Lock selection in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217100#M70349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can trys this.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;ActiveDocument.Fields("PERIOD_ID").Select "(2010|2009)"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 15:39:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217100#M70349</guid>
      <dc:creator />
      <dc:date>2011-02-15T15:39:13Z</dc:date>
    </item>
    <item>
      <title>Select &amp; Lock selection in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217101#M70350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it is working. Except when there is a partial reload triggered from a macro.&lt;/P&gt;&lt;P&gt;Thanks again for your reactivity&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 16:09:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217101#M70350</guid>
      <dc:creator />
      <dc:date>2011-02-15T16:09:53Z</dc:date>
    </item>
    <item>
      <title>Select &amp; Lock selection in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217102#M70351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fernando,&lt;/P&gt;&lt;P&gt;Is there a simple way to execute the macro (Selectandlock) after the partial reload.&lt;/P&gt;&lt;P&gt;On my file the macro (Selectandlock) is working properly after a full reload but not the partial reload.&lt;/P&gt;&lt;P&gt;And the partial reload is deselecting my field even when locked.&lt;/P&gt;&lt;P&gt;Any idea to solve this problem?&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 16:56:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217102#M70351</guid>
      <dc:creator />
      <dc:date>2011-02-15T16:56:05Z</dc:date>
    </item>
    <item>
      <title>Select &amp; Lock selection in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217103#M70352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don´t know.&lt;/P&gt;&lt;P&gt;You try put in OnOpen the Run Marcro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 17:50:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217103#M70352</guid>
      <dc:creator />
      <dc:date>2011-02-15T17:50:24Z</dc:date>
    </item>
    <item>
      <title>Select &amp; Lock selection in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217104#M70353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I put them on OnOpen and OnPostReload but no result....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 18:06:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217104#M70353</guid>
      <dc:creator />
      <dc:date>2011-02-15T18:06:04Z</dc:date>
    </item>
    <item>
      <title>Select &amp; Lock selection in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217105#M70354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove from OnPostReload, only OnOpen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Feb 2011 18:08:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217105#M70354</guid>
      <dc:creator />
      <dc:date>2011-02-15T18:08:51Z</dc:date>
    </item>
    <item>
      <title>Select &amp; Lock selection in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217106#M70355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tony,&lt;/P&gt;&lt;P&gt;I don't want to waste your time. But just to inform you that even with OnOpen I have the same result, i.e. selection is lost and I'm not able to select Years anymore, I have to go for a full reload.&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 14:04:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217106#M70355</guid>
      <dc:creator />
      <dc:date>2011-02-16T14:04:22Z</dc:date>
    </item>
    <item>
      <title>Select &amp; Lock selection in the script</title>
      <link>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217107#M70356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand correctly, you have a macro that does a partial load.&lt;/P&gt;&lt;P&gt;You can Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub PartialReload&lt;BR /&gt;ActiveDocument.GetApplication.WaitForIdle&lt;BR /&gt;ActiveDocument.Fields("PERIOD_ID").Unlock&lt;BR /&gt;ActiveDocument.Fields("PERIOD_ID").Clear&lt;BR /&gt;ActiveDocument.PartialReload&lt;BR /&gt;ActiveDocument.GetApplication.WaitForIdle&lt;BR /&gt;ActiveDocument.Fields("PERIOD_ID").Select "(2010|2009)"&lt;BR /&gt;ActiveDocument.Fields("PERIOD_ID").Lock&lt;BR /&gt;ActiveDocument.GetApplication.MsgBox("Partial Reload")&lt;BR /&gt;End Sub&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Feb 2011 16:40:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-Lock-selection-in-the-script/m-p/217107#M70356</guid>
      <dc:creator />
      <dc:date>2011-02-16T16:40:26Z</dc:date>
    </item>
  </channel>
</rss>

