<?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: For loop id should be as null or zero in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2415747#M95105</link>
    <description>&lt;P&gt;if you want continue reload with error then try below logic&lt;/P&gt;
&lt;P&gt;before loop start ------------&amp;gt;&amp;gt;&lt;/P&gt;
&lt;P&gt;set errormode=0;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-------------------------&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;
&lt;P&gt;after loop end then again&lt;/P&gt;
&lt;P&gt;set errormode = 1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Prashant Sangle&lt;/P&gt;</description>
    <pubDate>Wed, 07 Feb 2024 06:07:53 GMT</pubDate>
    <dc:creator>PrashantSangle</dc:creator>
    <dc:date>2024-02-07T06:07:53Z</dc:date>
    <item>
      <title>For loop id should be as null or zero</title>
      <link>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2415744#M95104</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;
&lt;P&gt;Load * Inline [&lt;/P&gt;
&lt;P&gt;Id&lt;/P&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;P&gt;3&lt;/P&gt;
&lt;P&gt;4&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;M passing these ids in another table through for loop, but if these ids does not exist in another table it throws an error, id does not exist.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to continue the for loop and if the id does not exist it should save as null or zero.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help me with this logic.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5533"&gt;@Anil_Babu_Samineni&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kavita&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 06:04:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2415744#M95104</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2024-02-07T06:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: For loop id should be as null or zero</title>
      <link>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2415747#M95105</link>
      <description>&lt;P&gt;if you want continue reload with error then try below logic&lt;/P&gt;
&lt;P&gt;before loop start ------------&amp;gt;&amp;gt;&lt;/P&gt;
&lt;P&gt;set errormode=0;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-------------------------&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;
&lt;P&gt;after loop end then again&lt;/P&gt;
&lt;P&gt;set errormode = 1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Prashant Sangle&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 06:07:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2415747#M95105</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2024-02-07T06:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: For loop id should be as null or zero</title>
      <link>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2415755#M95106</link>
      <description>&lt;P&gt;You could do a check before performing your load if the data expect to exist exsists, and I'd not then skip your load statement.&lt;/P&gt;
&lt;P&gt;&amp;lt;your loop on vValue&amp;gt;&lt;/P&gt;
&lt;P&gt;IF &amp;lt;logical test&amp;gt; THEN&lt;/P&gt;
&lt;P&gt;&amp;lt;your load statement using vValue&amp;gt;&lt;/P&gt;
&lt;P&gt;ELSE&lt;/P&gt;
&lt;P&gt;Trace WARNING: $(vValue) was skipped in loop;&lt;/P&gt;
&lt;P&gt;ENDIF&lt;/P&gt;
&lt;P&gt;&amp;lt;trigger next vValue in your loop&amp;gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 06:35:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2415755#M95106</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2024-02-07T06:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: For loop id should be as null or zero</title>
      <link>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2415787#M95113</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41370"&gt;@kavita25&lt;/a&gt;&amp;nbsp;I suggest the same way what&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/42758"&gt;@PrashantSangle&lt;/a&gt;&amp;nbsp;shared, But I would recommend inside the loop rather before and after to avoid the genuine errors.&lt;/P&gt;
&lt;P&gt;But, I am curious why you are comparing with ID that is not available in second table?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 07:17:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2415787#M95113</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2024-02-07T07:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: For loop id should be as null or zero</title>
      <link>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2416647#M95193</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/5533"&gt;@Anil_Babu_Samineni&lt;/a&gt;&amp;nbsp;I tried that but I am also storing the data in qvd. But in the qvd the data is stored only the data before the error.&lt;/P&gt;
&lt;P&gt;I am doing this to get Worklog data from JIRA connector.&lt;/P&gt;
&lt;P&gt;Also, I am doing this, because I want Ids from Issues table and get those ids only from the Worklog table.&lt;/P&gt;
&lt;P&gt;Please suggest me.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Kavita&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 13:19:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2416647#M95193</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2024-02-08T13:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: For loop id should be as null or zero</title>
      <link>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2416649#M95194</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/42758"&gt;@PrashantSangle&lt;/a&gt;&amp;nbsp;I tried the code. Yes its skipping those errors. But its not saving the whole data except for those issues which does not exist. It saves only the data before error occurs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank You for the suggestion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 13:23:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2416649#M95194</guid>
      <dc:creator>kavita25</dc:creator>
      <dc:date>2024-02-08T13:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: For loop id should be as null or zero</title>
      <link>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2416877#M95214</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;try with below logic.&lt;/P&gt;
&lt;DIV&gt;Test1:&lt;/DIV&gt;
&lt;DIV&gt;Load * Inline [&lt;/DIV&gt;
&lt;DIV&gt;Region&lt;/DIV&gt;
&lt;DIV&gt;A&lt;/DIV&gt;
&lt;DIV&gt;B&lt;/DIV&gt;
&lt;DIV&gt;];&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;NoConcatenate&lt;/DIV&gt;
&lt;DIV&gt;Test2:&lt;/DIV&gt;
&lt;DIV&gt;Load * Inline [&lt;/DIV&gt;
&lt;DIV&gt;Region&lt;/DIV&gt;
&lt;DIV&gt;B&lt;/DIV&gt;
&lt;DIV&gt;C&lt;/DIV&gt;
&lt;DIV&gt;];&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;NoConcatenate&lt;/DIV&gt;
&lt;DIV&gt;Test3:&lt;/DIV&gt;
&lt;DIV&gt;Load * Inline [&lt;/DIV&gt;
&lt;DIV&gt;Region&lt;/DIV&gt;
&lt;DIV&gt;C&lt;/DIV&gt;
&lt;DIV&gt;D&lt;/DIV&gt;
&lt;DIV&gt;];&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;NoConcatenate&lt;/DIV&gt;
&lt;DIV&gt;Final:&lt;/DIV&gt;
&lt;DIV&gt;Load * Inline [&lt;/DIV&gt;
&lt;DIV&gt;Region&lt;/DIV&gt;
&lt;DIV&gt;];&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Set errormode=0;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;for each a in 1,7,2,4,3,5&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Concatenate(Final)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; LOAD * Resident Test$(a);&lt;/DIV&gt;
&lt;DIV&gt;next;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Set errormode=1;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Drop table Test1,Test2,Test3;&lt;/DIV&gt;
&lt;DIV&gt;Exit Script;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Regards,&lt;/DIV&gt;
&lt;DIV&gt;Prashant Sangle&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 Feb 2024 04:41:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2416877#M95214</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2024-02-09T04:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: For loop id should be as null or zero</title>
      <link>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2417194#M95321</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41370"&gt;@kavita25&lt;/a&gt;&amp;nbsp;are you expecting something like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;InlineTable:&lt;BR /&gt;LOAD * Inline [&lt;BR /&gt;Id&lt;BR /&gt;1&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;4&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;OtherTable:&lt;BR /&gt;LOAD * Inline [&lt;BR /&gt;Id, DIM&lt;BR /&gt;1, A&lt;BR /&gt;2, B&lt;BR /&gt;4, C&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;// Create a mapping table for IDs present in OtherTable&lt;BR /&gt;Map_IdExists:&lt;BR /&gt;MAPPING LOAD&lt;BR /&gt;Id,&lt;BR /&gt;Id as Exists&lt;BR /&gt;RESIDENT OtherTable;&lt;/P&gt;
&lt;P&gt;// Initialize a temporary table to store results&lt;BR /&gt;NoConcatenate&lt;BR /&gt;TempResultTable:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Id, DIM&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;FOR i = 0 TO NoOfRows('InlineTable') - 1&lt;BR /&gt;LET vId = Peek('Id', i, 'InlineTable');&lt;BR /&gt;LET vExists = ApplyMap('Map_IdExists', vId, 'NotFound');&lt;/P&gt;
&lt;P&gt;IF vExists = 'NotFound' THEN&lt;BR /&gt;// If ID does not exist in OtherTable, add it with NULL or 0 for DIM&lt;BR /&gt;CONCATENATE (TempResultTable)&lt;BR /&gt;LOAD&lt;BR /&gt;NULL() AS Id, // Replace NULL() with 0 if you prefer 0 over NULL&lt;BR /&gt;NULL() AS DIM // Replace NULL() with 0 if you prefer 0 over NULL&lt;BR /&gt;AUTOGENERATE 1&lt;BR /&gt;;&lt;BR /&gt;ELSE&lt;BR /&gt;// If ID exists, fetch and add its corresponding row from OtherTable&lt;BR /&gt;CONCATENATE (TempResultTable)&lt;BR /&gt;LOAD&lt;BR /&gt;Id,&lt;BR /&gt;DIM&lt;BR /&gt;RESIDENT OtherTable&lt;BR /&gt;WHERE Id = $(vId)&lt;BR /&gt;;&lt;BR /&gt;ENDIF&lt;BR /&gt;NEXT&lt;/P&gt;
&lt;P&gt;// Load the final results into ResultTable&lt;BR /&gt;NoConcatenate&lt;BR /&gt;ResultTable:&lt;BR /&gt;LOAD DISTINCT&lt;BR /&gt;Id,&lt;BR /&gt;DIM&lt;BR /&gt;RESIDENT TempResultTable;&lt;/P&gt;
&lt;P&gt;// Cleanup&lt;BR /&gt;DROP TABLES TempResultTable, InlineTable, OtherTable;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 12:49:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/For-loop-id-should-be-as-null-or-zero/m-p/2417194#M95321</guid>
      <dc:creator>rajuamet</dc:creator>
      <dc:date>2024-02-09T12:49:13Z</dc:date>
    </item>
  </channel>
</rss>

