<?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 Using sheet trigger to set default selections in multi box in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-sheet-trigger-to-set-default-selections-in-multi-box/m-p/277577#M103451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Is it possible to make the same combination of selections manually?&amp;nbsp; If not, the macro/actions will not help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Feb 2012 14:42:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-02-13T14:42:59Z</dc:date>
    <item>
      <title>Using sheet trigger to set default selections in multi box</title>
      <link>https://community.qlik.com/t5/QlikView/Using-sheet-trigger-to-set-default-selections-in-multi-box/m-p/277575#M103449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to set default selections in a multi box when a user first clicks a tab.&amp;nbsp; The first option that came to mind is using a sheet trigger (OnActivateSheet) in order to set selections on multiple fields.&amp;nbsp; When I attempt this there are some selections that are set properly and others that are not.&amp;nbsp; I have tried both action type 'Select in Field' as well as invoking a macro to do the work, both with the same results.&amp;nbsp; I am using QV11.&amp;nbsp; Are there known issues with this approach?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example of the macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub initselect&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Set var1 = ActiveDocument.Variables("v1")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Set var2 = ActiveDocument.Variables("v2")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x = var1.GetContent.String&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;y = var2.GetContent.String&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ActiveDocument.GetField("Field1").Select ActiveDocument.Evaluate(x + y)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ActiveDocument.GetField("Field2").Select ActiveDocument.Evaluate("'XYZ'") &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ActiveDocument.GetField("Field3").Select ActiveDocument.Evaluate("'ABC'")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When this executes only Field2 and Field3 have selections set.&amp;nbsp; If I comment out the line where Field2 is set, Field1 and Field3 will have selections set.&amp;nbsp; Not certain what the cause of this inconsistent behavior could be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any input would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 14:12:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-sheet-trigger-to-set-default-selections-in-multi-box/m-p/277575#M103449</guid>
      <dc:creator />
      <dc:date>2012-02-13T14:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using sheet trigger to set default selections in multi box</title>
      <link>https://community.qlik.com/t5/QlikView/Using-sheet-trigger-to-set-default-selections-in-multi-box/m-p/277576#M103450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would recommend you use the built-in trigger for making the field selections instead of the macro, but that's just my two cents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without seeing your document, I'm guessing that the 2nd or 3rd selection is &lt;STRONG&gt;in&lt;/STRONG&gt;compatible with the first (in your data model.)&amp;nbsp; Try the selections in the UI manually in the same order they are in your macro and see if you don't get the same result.&amp;nbsp; If you do, please post a sample.&amp;nbsp; -Isaiah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 14:16:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-sheet-trigger-to-set-default-selections-in-multi-box/m-p/277576#M103450</guid>
      <dc:creator>isaiah82</dc:creator>
      <dc:date>2012-02-13T14:16:31Z</dc:date>
    </item>
    <item>
      <title>Using sheet trigger to set default selections in multi box</title>
      <link>https://community.qlik.com/t5/QlikView/Using-sheet-trigger-to-set-default-selections-in-multi-box/m-p/277577#M103451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Is it possible to make the same combination of selections manually?&amp;nbsp; If not, the macro/actions will not help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 14:42:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-sheet-trigger-to-set-default-selections-in-multi-box/m-p/277577#M103451</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-02-13T14:42:59Z</dc:date>
    </item>
    <item>
      <title>Using sheet trigger to set default selections in multi box</title>
      <link>https://community.qlik.com/t5/QlikView/Using-sheet-trigger-to-set-default-selections-in-multi-box/m-p/277578#M103452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I would prefer to use the built-in trigger as well.&amp;nbsp; The issue was with the data available per the data model.&amp;nbsp; So... the selections will not set if there are no instances of the value in the filtered results.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your feedback!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 15:26:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-sheet-trigger-to-set-default-selections-in-multi-box/m-p/277578#M103452</guid>
      <dc:creator />
      <dc:date>2012-02-13T15:26:20Z</dc:date>
    </item>
  </channel>
</rss>

