<?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: Looping through script based on a field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Looping-through-script-based-on-a-field/m-p/746795#M266506</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Magen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a variable with a concatenated list of your possible languages and then use a for loop to cycle through each.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vAll_languages = 'French','English','Spanish';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Each vlanguage in $(vAll_languages)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;Load xxxxx&lt;/P&gt;&lt;P&gt;From yyyy&lt;/P&gt;&lt;P&gt;Where Language = '$(vlanguage)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Store Table1 Into $(vlanguage).qvd;&lt;/P&gt;&lt;P&gt;Drop Table1;&lt;/P&gt;&lt;P&gt;Next;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something along those lines, if you are doing specific code for each language though, you'd need to incorporate the adjusted code for each value in the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jan 2015 09:00:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-01-22T09:00:24Z</dc:date>
    <item>
      <title>Looping through script based on a field</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-through-script-based-on-a-field/m-p/746793#M266504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table with multiple fields which i use for calculations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example lets say one of the fields were called Language and there were 5 different languages in the Languages field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to perform different calculations for the different languages in the Language field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is - Is there a way to maybe loop through the script for each language in the Lanugauge field and then store as a qvd??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so, then i would then just call each qvd seperately and then perform the necessary calculations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Magen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 08:34:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-through-script-based-on-a-field/m-p/746793#M266504</guid>
      <dc:creator />
      <dc:date>2015-01-22T08:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through script based on a field</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-through-script-based-on-a-field/m-p/746794#M266505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your situation one solution can be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AAA:&lt;/P&gt;&lt;P&gt;Load * resident myTable where Language = 'English';&lt;/P&gt;&lt;P&gt;store * from AAA into English.qvd;&lt;/P&gt;&lt;P&gt;Drop table AAA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AAA:&lt;/P&gt;&lt;P&gt;Load * resident myTable where Language = 'French';&lt;/P&gt;&lt;P&gt;store * from AAA into French.qvd;&lt;/P&gt;&lt;P&gt;Drop table AAA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and so on&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 08:40:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-through-script-based-on-a-field/m-p/746794#M266505</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2015-01-22T08:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through script based on a field</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-through-script-based-on-a-field/m-p/746795#M266506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Magen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a variable with a concatenated list of your possible languages and then use a for loop to cycle through each.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vAll_languages = 'French','English','Spanish';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Each vlanguage in $(vAll_languages)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;Load xxxxx&lt;/P&gt;&lt;P&gt;From yyyy&lt;/P&gt;&lt;P&gt;Where Language = '$(vlanguage)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Store Table1 Into $(vlanguage).qvd;&lt;/P&gt;&lt;P&gt;Drop Table1;&lt;/P&gt;&lt;P&gt;Next;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something along those lines, if you are doing specific code for each language though, you'd need to incorporate the adjusted code for each value in the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 09:00:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-through-script-based-on-a-field/m-p/746795#M266506</guid>
      <dc:creator />
      <dc:date>2015-01-22T09:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through script based on a field</title>
      <link>https://community.qlik.com/t5/QlikView/Looping-through-script-based-on-a-field/m-p/746796#M266507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have fixed number of languages then this is the best approach&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Language1:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load * ,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SomeCalculation&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;resident myTable where Language = '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Language1&lt;/SPAN&gt;';&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;store * from &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Language1&lt;/SPAN&gt; into &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Language1&lt;/SPAN&gt;.qvd;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Drop table &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Language1&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Language2:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load * ,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SomeCalculation&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;resident myTable where Language = '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Language2&lt;/SPAN&gt;';&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;store * from &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Language2&lt;/SPAN&gt; into &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Language2&lt;/SPAN&gt;.qvd;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Drop table &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Language2&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;'&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;'&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;'&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;'&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Or you can use If() to find the language and calculate based on the language and generate a single qvd.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope this helps you.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2015 09:15:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Looping-through-script-based-on-a-field/m-p/746796#M266507</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-01-22T09:15:31Z</dc:date>
    </item>
  </channel>
</rss>

