<?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 Loading data based on user selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loading-data-based-on-user-selection/m-p/226420#M78625</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for your replies&lt;/P&gt;&lt;P&gt;shlomo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Oct 2010 20:34:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-10-03T20:34:12Z</dc:date>
    <item>
      <title>Loading data based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-based-on-user-selection/m-p/226417#M78622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;i have a qlikview file with 2 tables, CustomerGroups and Customers,&lt;/P&gt;&lt;P&gt;since customers data are very large, i want the user should select a group from the CustomersGroups table,&lt;/P&gt;&lt;P&gt;and then the reload will import only for the customers for the selected group.&lt;/P&gt;&lt;P&gt;1. i imported the 2 tables with different column names for the GroupCode in order relationships should not created&lt;/P&gt;&lt;P&gt;2. i have a list box bounded to the groupcode field and a variable refering to it: =&lt;B&gt;ONLY&lt;/B&gt;(&lt;B&gt;GroupCode&lt;/B&gt;)&lt;/P&gt;&lt;P&gt;3. on load script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;I&gt;&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;select&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;I&gt;when reloading data OCRD doesnt return any data, it looks like the variable doesnt contain the selection on this stage.&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-style: italic; font-weight: bold"&gt;any ideas,&lt;/P&gt;&lt;P style="font-style: italic; font-weight: bold"&gt;thanks&lt;/P&gt;&lt;P style="font-style: italic; font-weight: bold"&gt;shlomo&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;* &lt;B&gt;from&lt;/B&gt; OCRG; &lt;B&gt;&lt;/B&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;CardName &lt;B&gt;FROM&lt;/B&gt; OCRD where GroupCode=&lt;B&gt;&lt;I&gt;'$(a)';&lt;/I&gt;&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Oct 2010 12:50:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-based-on-user-selection/m-p/226417#M78622</guid>
      <dc:creator />
      <dc:date>2010-10-03T12:50:38Z</dc:date>
    </item>
    <item>
      <title>Loading data based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-based-on-user-selection/m-p/226418#M78623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shlomo,&lt;/P&gt;&lt;P&gt;The problem is that you can't access a variable defined in that way during script execution. In the QV Help file, look up the Input() function which you might find helpful.&lt;/P&gt;&lt;P&gt;Otherwise, you could write out the variable to a text file when a user presses a button. The button press would write out to a text file and trigger a reload. The script would then use this text file as an "include" file.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Oct 2010 15:28:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-based-on-user-selection/m-p/226418#M78623</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2010-10-03T15:28:15Z</dc:date>
    </item>
    <item>
      <title>Loading data based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-based-on-user-selection/m-p/226419#M78624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use a variable in the script if it is a value and not an expression. My co-worker Ivan Cruz has another method that I'm going to ask him about tomorrow, but you can as do a macro that populates the variable with the value of a listbox so that you can then use it in the script. Here's an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;sub make_list&lt;BR /&gt; '========== Copia periodo(s) seleccionado(s) a variable =================&lt;BR /&gt;'vFieldVariableList is defined previously as a document variable&lt;BR /&gt; set v = ActiveDocument.Variables("vFieldVariableList")&lt;BR /&gt; set mySelections =ActiveDocument.fields("Field").GetSelectedValues&lt;BR /&gt; vTemp = chr(39) &amp;amp; mySelections.Item(0).text &amp;amp; chr(39)&lt;BR /&gt; for i = 1 to mySelections.Count - 1&lt;BR /&gt; vTemp = vTemp &amp;amp; chr(44) &amp;amp; chr(39) &amp;amp; mySelections.Item(i).text &amp;amp;chr(39)&lt;BR /&gt; next&lt;BR /&gt; v.SetContent vTemp,true&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;sub clear_list&lt;BR /&gt; set v = ActiveDocument.Variables("vFieldVariableList")&lt;BR /&gt; v.SetContent "",true&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;You can run this macro with a button or with a trigger every time the user selects a value in the customer group list.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Oct 2010 16:59:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-based-on-user-selection/m-p/226419#M78624</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-10-03T16:59:37Z</dc:date>
    </item>
    <item>
      <title>Loading data based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-based-on-user-selection/m-p/226420#M78625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for your replies&lt;/P&gt;&lt;P&gt;shlomo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Oct 2010 20:34:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-based-on-user-selection/m-p/226420#M78625</guid>
      <dc:creator />
      <dc:date>2010-10-03T20:34:12Z</dc:date>
    </item>
    <item>
      <title>Loading data based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-based-on-user-selection/m-p/226421#M78626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shlomo,&lt;BR /&gt;It works if you assign variable value in trigger instead of variable definiton. See attached test.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Oct 2010 21:01:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-based-on-user-selection/m-p/226421#M78626</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-10-03T21:01:18Z</dc:date>
    </item>
    <item>
      <title>Loading data based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-based-on-user-selection/m-p/226422#M78627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Go with Michael's solution. Actions are always better than macros and in case you ever need to assign multiple values to the variable use the function =concat(chr(39)&amp;amp;Field1&amp;amp;chr(39),',') that is triggered OnSelect of Field1.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Oct 2010 21:20:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-based-on-user-selection/m-p/226422#M78627</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-10-03T21:20:20Z</dc:date>
    </item>
    <item>
      <title>Loading data based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-data-based-on-user-selection/m-p/226423#M78628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thanks for your help.&lt;/P&gt;&lt;P&gt;shlomo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Oct 2010 09:18:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-data-based-on-user-selection/m-p/226423#M78628</guid>
      <dc:creator />
      <dc:date>2010-10-04T09:18:56Z</dc:date>
    </item>
  </channel>
</rss>

