<?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 Load the Table if the condition is satisfied else exit Script &amp; Generate Log in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-the-Table-if-the-condition-is-satisfied-else-exit-Script/m-p/229847#M81728</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done that..- &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There was a small mistake which we were doing it while calling the Var now i am trying another Req where&lt;/P&gt;&lt;P&gt;if the Condition is statisfied then only load &amp;amp; store the Data.qvd else Exit script&lt;/P&gt;&lt;P&gt;If require i shall come back to you for help.. -:)&lt;/P&gt;&lt;P&gt;Tx again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srini&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Dec 2010 07:11:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-12-22T07:11:55Z</dc:date>
    <item>
      <title>Load the Table if the condition is satisfied else exit Script &amp; Generate Log</title>
      <link>https://community.qlik.com/t5/QlikView/Load-the-Table-if-the-condition-is-satisfied-else-exit-Script/m-p/229843#M81724</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;Can anybody please help me in the follwoing query&lt;/P&gt;&lt;P&gt;I have a excel file as attached, in sheet 1 i have 4 rows with columns as&lt;/P&gt;&lt;P&gt;Prod sales&lt;/P&gt;&lt;P&gt;A 10&lt;/P&gt;&lt;P&gt;B 20&lt;/P&gt;&lt;P&gt;C 30&lt;/P&gt;&lt;P&gt;D 40&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sheet 2&lt;/P&gt;&lt;P&gt;TotalNo_of_Rows Sales1&lt;/P&gt;&lt;P&gt;3 90&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i have another sheet (sheet2) where in i have the total number of rows &amp;amp; the amount for validation purpose&lt;/P&gt;&lt;P&gt;Now the actual Requirement is&lt;/P&gt;&lt;P&gt;&lt;B&gt;Check if&lt;/B&gt; the Total number of rows &lt;STRONG&gt;recno()&lt;/STRONG&gt; in Sheet1 &lt;STRONG&gt;is Equal to the value&lt;/STRONG&gt; given in the sheet2 under field name as &lt;STRONG&gt;TotalNo_of_Rows&lt;/STRONG&gt; &lt;STRONG&gt;or if the sum (sales) is = value of Sales1 in Sheet2&lt;/STRONG&gt; &lt;STRONG&gt;then Load&lt;/STRONG&gt; the Sheet1 Table &amp;amp; store this Data in to a Qvd else Exit the script &amp;amp; generate a Log File.[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/4834.sample.xls:550:0]&lt;/P&gt;&lt;P&gt;Will appreciate if everyone can put some thoughts on this.. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Tx in Advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srini&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 18:21:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-the-Table-if-the-condition-is-satisfied-else-exit-Script/m-p/229843#M81724</guid>
      <dc:creator />
      <dc:date>2010-12-21T18:21:13Z</dc:date>
    </item>
    <item>
      <title>Load the Table if the condition is satisfied else exit Script &amp; Generate Log</title>
      <link>https://community.qlik.com/t5/QlikView/Load-the-Table-if-the-condition-is-satisfied-else-exit-Script/m-p/229844#M81725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;its not a OR condition but its a AND condition.. -:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 18:48:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-the-Table-if-the-condition-is-satisfied-else-exit-Script/m-p/229844#M81725</guid>
      <dc:creator />
      <dc:date>2010-12-21T18:48:09Z</dc:date>
    </item>
    <item>
      <title>Load the Table if the condition is satisfied else exit Script &amp; Generate Log</title>
      <link>https://community.qlik.com/t5/QlikView/Load-the-Table-if-the-condition-is-satisfied-else-exit-Script/m-p/229845#M81726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of a loop load which may take a lot of time, I'd do something like the following (check syntax):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;LOAD rows, amtFROM 4834.sample.xls(biff, embedded labels, table is Sheet2$); LET vRows = Peek('rows', 0); // gets the first record in field "rows"LET vAmt = Peek('amt', 0); // likewise with "amt" TotalRowsInData:LOAD RecNo() AS RowNo, prodFROM 4834.sample.xls(biff, embedded labels, table is Sheet1$); LET vTotalRows = Peek('RowNo', -1); DROP TABLE TotalRowsInData; Data:LOAD prod, sales, RangeSum(sales, Peek('SalesAcum', 0)) AS SalesAcumFROM 4834.sample.xls(biff, embedded labels, table is Sheet1$)WHERE RecNo() &amp;lt;= $(vRows) AND RangeSum(sales, Peek('SalesAcum', 0)) &amp;lt;= $(vAmt); STORE Data INTO Data.qvd; IF NoOfRows('Data') &amp;lt; $(vTotalRows) THEN Error:LOAD ReloadTime() AS Time, 'Error' AS MsgAUTOGENERATE 1; STORE Error INTO Error.qvd; DROP TABLE Error; EXIT SCRIPT; END IF&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 20:06:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-the-Table-if-the-condition-is-satisfied-else-exit-Script/m-p/229845#M81726</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-12-21T20:06:02Z</dc:date>
    </item>
    <item>
      <title>Load the Table if the condition is satisfied else exit Script &amp; Generate Log</title>
      <link>https://community.qlik.com/t5/QlikView/Load-the-Table-if-the-condition-is-satisfied-else-exit-Script/m-p/229846#M81727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Miguel,&lt;/P&gt;&lt;P&gt;Thanks a Ton!!!! -:) for you help&lt;/P&gt;&lt;P&gt;There is a small change which is required in the script&lt;/P&gt;&lt;P&gt;As per your script "in the Last if statement"&lt;/P&gt;&lt;P style="font-weight: bold"&gt;IF NoOfRows('Data') &amp;lt; $(vTotalRows) then&lt;/P&gt;&lt;P&gt;store the error.qvd&lt;/P&gt;&lt;P&gt;but i need to have this as &amp;lt;&amp;gt; because the no of rows in either the first sheet of the noofrows value in the scond sheet will change on a daily basis based on the xls dump given to us.&lt;/P&gt;&lt;P&gt;I did tried doing this by placing a &amp;lt;&amp;gt; symbol but it dosent execute a error file.&lt;/P&gt;&lt;P&gt;" &lt;B&gt;IF NoOfRows('Data') &amp;lt;&amp;gt; $(vTotalRows) then&lt;/B&gt; "&lt;/P&gt;&lt;P&gt;as i have to generate the Error File in either of these conditions&lt;/P&gt;&lt;P&gt;Can you please put some more light on this &amp;amp; will be of GR8 Help.. -:)&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srini&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 06:53:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-the-Table-if-the-condition-is-satisfied-else-exit-Script/m-p/229846#M81727</guid>
      <dc:creator />
      <dc:date>2010-12-22T06:53:22Z</dc:date>
    </item>
    <item>
      <title>Load the Table if the condition is satisfied else exit Script &amp; Generate Log</title>
      <link>https://community.qlik.com/t5/QlikView/Load-the-Table-if-the-condition-is-satisfied-else-exit-Script/m-p/229847#M81728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done that..- &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There was a small mistake which we were doing it while calling the Var now i am trying another Req where&lt;/P&gt;&lt;P&gt;if the Condition is statisfied then only load &amp;amp; store the Data.qvd else Exit script&lt;/P&gt;&lt;P&gt;If require i shall come back to you for help.. -:)&lt;/P&gt;&lt;P&gt;Tx again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srini&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 07:11:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-the-Table-if-the-condition-is-satisfied-else-exit-Script/m-p/229847#M81728</guid>
      <dc:creator />
      <dc:date>2010-12-22T07:11:55Z</dc:date>
    </item>
    <item>
      <title>Load the Table if the condition is satisfied else exit Script &amp; Generate Log</title>
      <link>https://community.qlik.com/t5/QlikView/Load-the-Table-if-the-condition-is-satisfied-else-exit-Script/m-p/229848#M81729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Miguel,&lt;/P&gt;&lt;P&gt;It is also done.. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srini&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 07:48:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-the-Table-if-the-condition-is-satisfied-else-exit-Script/m-p/229848#M81729</guid>
      <dc:creator />
      <dc:date>2010-12-22T07:48:42Z</dc:date>
    </item>
  </channel>
</rss>

