<?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 all Tables in existing Data Model in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Looping-Through-all-Tables-in-existing-Data-Model/m-p/1819633#M67192</link>
    <description>&lt;P&gt;Two years later and glad that you documented your outcome&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 04 Jul 2021 18:34:35 GMT</pubDate>
    <dc:creator>steasy</dc:creator>
    <dc:date>2021-07-04T18:34:35Z</dc:date>
    <item>
      <title>Looping Through all Tables in existing Data Model</title>
      <link>https://community.qlik.com/t5/App-Development/Looping-Through-all-Tables-in-existing-Data-Model/m-p/1591838#M43480</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I want to loop through all of the tables in my data model and store them down into QVDs. I have created the below script to test but it keeps failing.&amp;nbsp; For whatever reason once it gets to the third table the Tables variable returns null().&amp;nbsp; Any idea why this isnt working.&amp;nbsp; I know I could just write store statements after each load but I have a use case for this and cant understand why its not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A:&lt;BR /&gt;Load * Inline&lt;BR /&gt;[A];&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;B:&lt;BR /&gt;Load * Inline&lt;BR /&gt;[B];&lt;BR /&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;C:&lt;BR /&gt;Load * Inline&lt;BR /&gt;[C];&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;[D]:&lt;BR /&gt;Load * Inline&lt;BR /&gt;[D];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let vTables = NoOfTables();&lt;/P&gt;&lt;P&gt;Let i = 0;&lt;/P&gt;&lt;P&gt;Do While i &amp;lt; vTables&lt;/P&gt;&lt;P&gt;Let Table = TableName(i);&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;[Temp]:&lt;BR /&gt;Load *&lt;BR /&gt;Resident [$(Table)];&lt;/P&gt;&lt;P&gt;Store Temp into [lib://Test\$(Table).txt](txt);&lt;BR /&gt;Drop Table $(Table);&lt;BR /&gt;Drop Table Temp;&lt;BR /&gt;i = i + 1;&lt;/P&gt;&lt;P&gt;Loop;&lt;/P&gt;&lt;P&gt;Exit script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:35:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Looping-Through-all-Tables-in-existing-Data-Model/m-p/1591838#M43480</guid>
      <dc:creator>m_perreault</dc:creator>
      <dc:date>2024-11-16T05:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through all Tables in existing Data Model</title>
      <link>https://community.qlik.com/t5/App-Development/Looping-Through-all-Tables-in-existing-Data-Model/m-p/1591840#M43481</link>
      <description>&lt;P&gt;Ah I got it.&lt;/P&gt;&lt;P&gt;Since I was dropping tables in the Loop by doing i + 1 I was skipping tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the below works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let i = 0;&lt;/P&gt;&lt;P&gt;Do While i &amp;lt; NoOfTables()&lt;/P&gt;&lt;P&gt;Let Table = TableName(i);&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;[Temp]:&lt;BR /&gt;Load *&lt;BR /&gt;Resident [$(Table)];&lt;/P&gt;&lt;P&gt;Store Temp into [lib://Test\$(Table).txt](txt);&lt;BR /&gt;Drop Table [$(Table)];&lt;BR /&gt;Drop Table Temp;&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Loop;&lt;/P&gt;&lt;P&gt;Exit script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 22:22:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Looping-Through-all-Tables-in-existing-Data-Model/m-p/1591840#M43481</guid>
      <dc:creator>m_perreault</dc:creator>
      <dc:date>2019-06-13T22:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through all Tables in existing Data Model</title>
      <link>https://community.qlik.com/t5/App-Development/Looping-Through-all-Tables-in-existing-Data-Model/m-p/1591844#M43482</link>
      <description>&lt;P&gt;Further more there is no reason to Load the tables again just the below is sufficient&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let i = 0;&lt;/P&gt;&lt;P&gt;Do While i &amp;lt; NoOfTables()&lt;/P&gt;&lt;P&gt;Let Table = TableName(i);&lt;/P&gt;&lt;P&gt;Store [$(Table)] into [lib://Test\$(Table).txt](txt);&lt;BR /&gt;Drop Table [$(Table)];&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Loop;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 22:27:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Looping-Through-all-Tables-in-existing-Data-Model/m-p/1591844#M43482</guid>
      <dc:creator>m_perreault</dc:creator>
      <dc:date>2019-06-13T22:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Looping Through all Tables in existing Data Model</title>
      <link>https://community.qlik.com/t5/App-Development/Looping-Through-all-Tables-in-existing-Data-Model/m-p/1819633#M67192</link>
      <description>&lt;P&gt;Two years later and glad that you documented your outcome&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jul 2021 18:34:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Looping-Through-all-Tables-in-existing-Data-Model/m-p/1819633#M67192</guid>
      <dc:creator>steasy</dc:creator>
      <dc:date>2021-07-04T18:34:35Z</dc:date>
    </item>
  </channel>
</rss>

