<?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 how to use mapping table if there is a loop? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/how-to-use-mapping-table-if-there-is-a-loop/m-p/221965#M74714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Is the mapping load statement outside or within your for-loop?&lt;BR /&gt;If it's inside the loop I guess it could mean trouble since you will be creating the same table over and over again. Not sure really what the result of such on operation would be.&lt;BR /&gt;If this is your case, try adding a variable counter to the mapping table name.&lt;BR /&gt;Something like this maybe (untested):&lt;BR /&gt;&lt;BR /&gt;set counter = 0;&lt;BR /&gt;for x = 0 to 10&lt;BR /&gt;set counter = counter + 1;&lt;BR /&gt;map$(counter):&lt;BR /&gt;mapping load ....&lt;BR /&gt;load applymap('map$(counter)', field, defaultvalue) as mapField ....&lt;BR /&gt;next&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jan 2010 20:33:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-01-26T20:33:03Z</dc:date>
    <item>
      <title>how to use mapping table if there is a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-use-mapping-table-if-there-is-a-loop/m-p/221964#M74713</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'm not sure if this is a product limitation or bug.&lt;/P&gt;&lt;P&gt;i have a for loop to reload data for next database which will store qvd in another folder.within this for loop, i'm using a mapping table and applymap function.&lt;/P&gt;&lt;P&gt;When i use applymap, the value is not map as it supposed to be when i loop 2 databases. if i just use 1 db at a time, it's ok.&lt;/P&gt;&lt;P&gt;i can't drop a mapping table before the next command. is there a workaround for this? Doing a left join will be slow.&lt;/P&gt;&lt;P&gt;Any idea is very appreciated. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2010 07:00:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-use-mapping-table-if-there-is-a-loop/m-p/221964#M74713</guid>
      <dc:creator />
      <dc:date>2010-01-26T07:00:50Z</dc:date>
    </item>
    <item>
      <title>how to use mapping table if there is a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-use-mapping-table-if-there-is-a-loop/m-p/221965#M74714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Is the mapping load statement outside or within your for-loop?&lt;BR /&gt;If it's inside the loop I guess it could mean trouble since you will be creating the same table over and over again. Not sure really what the result of such on operation would be.&lt;BR /&gt;If this is your case, try adding a variable counter to the mapping table name.&lt;BR /&gt;Something like this maybe (untested):&lt;BR /&gt;&lt;BR /&gt;set counter = 0;&lt;BR /&gt;for x = 0 to 10&lt;BR /&gt;set counter = counter + 1;&lt;BR /&gt;map$(counter):&lt;BR /&gt;mapping load ....&lt;BR /&gt;load applymap('map$(counter)', field, defaultvalue) as mapField ....&lt;BR /&gt;next&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2010 20:33:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-use-mapping-table-if-there-is-a-loop/m-p/221965#M74714</guid>
      <dc:creator />
      <dc:date>2010-01-26T20:33:03Z</dc:date>
    </item>
    <item>
      <title>how to use mapping table if there is a loop?</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-use-mapping-table-if-there-is-a-loop/m-p/221966#M74715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks fredrik! it works!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jan 2010 12:57:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-use-mapping-table-if-there-is-a-loop/m-p/221966#M74715</guid>
      <dc:creator />
      <dc:date>2010-01-30T12:57:58Z</dc:date>
    </item>
  </channel>
</rss>

