<?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: Load Data with the help of a List in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Load-Data-with-the-help-of-a-List/m-p/2011437#M83639</link>
    <description>&lt;P&gt;Thank you very much for your reply. &lt;/P&gt;
&lt;P&gt;My code now :&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;DB:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NoConcatenate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Load&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Distinct&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Projectnr ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Name,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Status,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Resident DB_2 Where Match(Status, 'R')and Wildmatch(Name,'*US*')&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Let vNoOfRows = NoOfRows('&lt;/SPAN&gt;&lt;SPAN&gt;DB&lt;/SPAN&gt;&lt;SPAN&gt;');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for i=0 to vNoOfRows;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Let &lt;/SPAN&gt;&lt;SPAN&gt;vProjectnr &lt;/SPAN&gt;&lt;SPAN&gt;= Peek('&lt;/SPAN&gt;&lt;SPAN&gt;Projectnr&lt;/SPAN&gt;&lt;SPAN&gt;', $(i),&lt;/SPAN&gt;&lt;SPAN&gt;DB&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Final_DB:&lt;BR /&gt;Load&lt;BR /&gt;1 as dummy_field,&lt;BR /&gt;*&lt;BR /&gt;RResident DB_2 Where not WildMatch(Projectnr ,'$(vProjectnr )')&lt;/SPAN&gt; and WildMatch(Status, '*A*')&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;next i;&lt;BR /&gt;Drop Table Freigabe_DB;&lt;BR /&gt;&lt;BR /&gt;However this code gives me not the desired output, in the final_db are still ProjectNr with the status R.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Thu, 01 Dec 2022 12:30:48 GMT</pubDate>
    <dc:creator>Loeckli</dc:creator>
    <dc:date>2022-12-01T12:30:48Z</dc:date>
    <item>
      <title>Load Data with the help of a List</title>
      <link>https://community.qlik.com/t5/App-Development/Load-Data-with-the-help-of-a-List/m-p/2011357#M83629</link>
      <description>&lt;P&gt;Hello Everybody&lt;/P&gt;
&lt;P&gt;I am trying to load a table with the data that does not appear in the list.&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;// In this section I load all data that have the status R. This is because the projects can have several statuses, ultimately I only want to load the projects that have only one entry with A.&lt;/P&gt;
&lt;P&gt;DB:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;Load&lt;BR /&gt;Distinct&lt;BR /&gt;Projectnr ,&lt;BR /&gt;Name, &lt;BR /&gt;Status,&lt;BR /&gt;Resident DB_2 Where Match(Status, 'R')and Wildmatch(Name,'*US*');&lt;BR /&gt;&lt;BR /&gt;// Then saving all the Projectnr. which have an entry as a list&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;let vProjectnr = Projectnr;&lt;/P&gt;
&lt;P&gt;// Final DB where projects only have entrys as status A&lt;/P&gt;
&lt;P&gt;Final_DB:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;Load&lt;BR /&gt;Projectnr ,&lt;BR /&gt;Resident DB_2 Where not WildMatch(Projectnr ,'vProjectname');&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;My code does not work, if there are better approaches I'm open to hear about them.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 09:49:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-Data-with-the-help-of-a-List/m-p/2011357#M83629</guid>
      <dc:creator>Loeckli</dc:creator>
      <dc:date>2022-12-01T09:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: Load Data with the help of a List</title>
      <link>https://community.qlik.com/t5/App-Development/Load-Data-with-the-help-of-a-List/m-p/2011368#M83632</link>
      <description>&lt;P&gt;HI &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/161274"&gt;@Loeckli&lt;/a&gt; &lt;/P&gt;
&lt;P&gt;i guess that you are trying to get &lt;SPAN&gt;&lt;STRONG&gt;Projectnr&lt;/STRONG&gt; from the first table by&lt;BR /&gt;&lt;EM&gt;let vProjectnr = Projectnr;&lt;/EM&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;but this will not work&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;you will need to use a &lt;STRONG&gt;while&lt;/STRONG&gt; or &lt;STRONG&gt;For &lt;/STRONG&gt;statement in order to read the first table row by row, and then use it in the next load.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;you can try this&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Let vNoOfRows = NoOfRows('&lt;SPAN&gt;DB&lt;/SPAN&gt;');&lt;BR /&gt;for i=0 to vNoOfRows;&lt;BR /&gt;     Let &lt;SPAN&gt;vProjectnr &lt;/SPAN&gt;= Peek('&lt;SPAN&gt;Projectnr&lt;/SPAN&gt;', $(i),&lt;SPAN&gt;DB&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P&gt;     &lt;SPAN&gt;Final_DB:&lt;BR /&gt;     //NoConcatenate      &lt;STRONG&gt;You need to concatenate&lt;/STRONG&gt;, to avoid concatenating with previous one, create a dummy field&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;     Load&lt;BR /&gt;&lt;/SPAN&gt;         1 as dummy_field,&lt;BR /&gt;&lt;SPAN&gt;         *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;     Resident DB_2 Where not WildMatch(Projectnr ,'$(vProjectname)');&lt;/SPAN&gt;&lt;BR /&gt;next i;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;another approach would be to use Join and keep so the iteration is not needed.&lt;/P&gt;
&lt;P&gt;hope this helps.&lt;/P&gt;
&lt;P&gt;best.&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;help users find answers! Don't forget to mark a solution that worked for you &amp;amp; to smash the like button! &lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 10:14:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-Data-with-the-help-of-a-List/m-p/2011368#M83632</guid>
      <dc:creator>RafaelBarrios</dc:creator>
      <dc:date>2022-12-01T10:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: Load Data with the help of a List</title>
      <link>https://community.qlik.com/t5/App-Development/Load-Data-with-the-help-of-a-List/m-p/2011437#M83639</link>
      <description>&lt;P&gt;Thank you very much for your reply. &lt;/P&gt;
&lt;P&gt;My code now :&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;DB:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NoConcatenate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Load&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Distinct&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Projectnr ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Name,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Status,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Resident DB_2 Where Match(Status, 'R')and Wildmatch(Name,'*US*')&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Let vNoOfRows = NoOfRows('&lt;/SPAN&gt;&lt;SPAN&gt;DB&lt;/SPAN&gt;&lt;SPAN&gt;');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for i=0 to vNoOfRows;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Let &lt;/SPAN&gt;&lt;SPAN&gt;vProjectnr &lt;/SPAN&gt;&lt;SPAN&gt;= Peek('&lt;/SPAN&gt;&lt;SPAN&gt;Projectnr&lt;/SPAN&gt;&lt;SPAN&gt;', $(i),&lt;/SPAN&gt;&lt;SPAN&gt;DB&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Final_DB:&lt;BR /&gt;Load&lt;BR /&gt;1 as dummy_field,&lt;BR /&gt;*&lt;BR /&gt;RResident DB_2 Where not WildMatch(Projectnr ,'$(vProjectnr )')&lt;/SPAN&gt; and WildMatch(Status, '*A*')&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;next i;&lt;BR /&gt;Drop Table Freigabe_DB;&lt;BR /&gt;&lt;BR /&gt;However this code gives me not the desired output, in the final_db are still ProjectNr with the status R.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 12:30:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-Data-with-the-help-of-a-List/m-p/2011437#M83639</guid>
      <dc:creator>Loeckli</dc:creator>
      <dc:date>2022-12-01T12:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Load Data with the help of a List</title>
      <link>https://community.qlik.com/t5/App-Development/Load-Data-with-the-help-of-a-List/m-p/2011744#M83654</link>
      <description>&lt;P&gt;G'day &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/161274"&gt;@Loeckli&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I think that 'where not exists( ... )' might be what you're looking for:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DB:
NoConcatenate
Load Distinct
    Projectnr,
    Projectnr as Projectnr_R,
    Name,
    Status
Resident DB_2 Where Match(Status, 'R')and Wildmatch(Name,'*US*');

// Final DB where projects only have entrys as status A
Final_DB:
NoConcatenate
Load
    Projectnr
Resident DB_2 Where not exists( Projectnr_R, Projectnr );&lt;/LI-CODE&gt;
&lt;P&gt;You need to give Projectnr a different name where status is 'R', otherwise the not exists will exclude everything in the DB_2 table as well.&lt;/P&gt;
&lt;P&gt;Cheers, Barnaby.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 21:21:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Load-Data-with-the-help-of-a-List/m-p/2011744#M83654</guid>
      <dc:creator>barnabyd</dc:creator>
      <dc:date>2022-12-01T21:21:46Z</dc:date>
    </item>
  </channel>
</rss>

