<?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 Re: Only consider fields from reference list in script run in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Only-consider-fields-from-reference-list-in-script-run/m-p/593110#M219873</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try maybe something like this, creating the field list for the LOAD using a variable expansion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Reference_Products_to_Include:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductsInclude&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product_B&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product_D&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TMP:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD concat(DISTINCT ProductsInclude,',') as TmpProducts Resident Reference_Products_to_Include;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let vProducts = peek('TmpProducts',0);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Data:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD OrderID, $(vProducts);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OrderID, Product_A, Product_B, Product_C, Product_D&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 1, 0, 0, 1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, 1, 1, 0, 0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, 0, 0, 1, 1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4, 1, 1, 1, 1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5, 0, 1, 0, 0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 04 May 2014 22:59:07 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2014-05-04T22:59:07Z</dc:date>
    <item>
      <title>Only consider fields from reference list in script run</title>
      <link>https://community.qlik.com/t5/QlikView/Only-consider-fields-from-reference-list-in-script-run/m-p/593109#M219872</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;&lt;/P&gt;&lt;P&gt;Please have a look at the following issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)&amp;nbsp; I have a dataset with a range of about 300 Product-fields: e.g. OrderID, Product_A, Product_B, Product_C, Product_D.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Before the script run, the user saves an Excel file with a reference list of which product fields should be included in the script run&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) The script loads the excel file (in attached example as an inline load) and the Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the problem:&lt;/P&gt;&lt;P&gt;4) Intended result: QlikView should only consider fields mentioned in the reference list. The reference list could be either a field list (multiple columns but with no value) or a list of values (one column and multiple rows) as it comes from a field export function from a previous QlikView app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note, that it must be this way/sequence as the script runs a complex statistical calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think, I have to set variables for each product to check whether the product is found in the reference list or not and then let the variable be either 0 or 1&amp;nbsp; - to multiply with the field, but I didnt manage to do so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See qvw example attached and screenshot below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="58338" alt="Capture2.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/58338_Capture2.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note: its not about making selections or set analysis on the dashboard! Its all about the script run.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Thanks a lot for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the best&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 May 2014 22:44:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-consider-fields-from-reference-list-in-script-run/m-p/593109#M219872</guid>
      <dc:creator>danieloberbilli</dc:creator>
      <dc:date>2014-05-04T22:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Only consider fields from reference list in script run</title>
      <link>https://community.qlik.com/t5/QlikView/Only-consider-fields-from-reference-list-in-script-run/m-p/593110#M219873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try maybe something like this, creating the field list for the LOAD using a variable expansion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Reference_Products_to_Include:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductsInclude&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product_B&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product_D&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TMP:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD concat(DISTINCT ProductsInclude,',') as TmpProducts Resident Reference_Products_to_Include;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let vProducts = peek('TmpProducts',0);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Data:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD OrderID, $(vProducts);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OrderID, Product_A, Product_B, Product_C, Product_D&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, 1, 0, 0, 1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, 1, 1, 0, 0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, 0, 0, 1, 1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4, 1, 1, 1, 1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5, 0, 1, 0, 0&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 May 2014 22:59:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-consider-fields-from-reference-list-in-script-run/m-p/593110#M219873</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-05-04T22:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Only consider fields from reference list in script run</title>
      <link>https://community.qlik.com/t5/QlikView/Only-consider-fields-from-reference-list-in-script-run/m-p/593111#M219874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great! Thanks a lot!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 May 2014 23:06:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-consider-fields-from-reference-list-in-script-run/m-p/593111#M219874</guid>
      <dc:creator>danieloberbilli</dc:creator>
      <dc:date>2014-05-04T23:06:18Z</dc:date>
    </item>
  </channel>
</rss>

