<?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 Error in the QlikSense Load Editor Script. Please help! in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Error-in-the-QlikSense-Load-Editor-Script-Please-help/m-p/1613048#M45637</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried running the below script in the qliksense load editor which involves connecting to qlik web connectors. It is constantly throwing the below error. Could someone please help.&lt;/P&gt;&lt;DIV class="headline edc_error"&gt;&lt;EM&gt;The following error occurred:&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="empty undefined"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="headline edc_error"&gt;&lt;EM&gt;The error occurred here:&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&lt;EM&gt;For n=1 To NoOfRows('tmp2')&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&lt;U&gt;&lt;STRONG&gt;&lt;EM&gt;My Script:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&lt;P&gt;tmp2:&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;[Brand_Name]&lt;BR /&gt;,[Name]&lt;BR /&gt;,[First_Name]&lt;BR /&gt;,[Email_ID]&lt;BR /&gt;,Avg([Past_Forecast]) as [Past_Forecast]&lt;BR /&gt;,Avg([Curr_Forecast]) as [Curr_Forecast]&lt;BR /&gt;,Avg([Variation]) as [Variation]&lt;BR /&gt;,Avg([Target_Diff]) as [Target_Diff]&lt;BR /&gt;Resident tmp1&lt;/P&gt;&lt;P&gt;Group By [Brand_Name],[Email_ID],[Name],[First_Name];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SUB SetCursor (SetCursor.table, SetCursor.record)&lt;BR /&gt;// LET SetCursor.n=1; // don't need this&lt;/P&gt;&lt;P&gt;FOR SetCursor.n = 1 TO NoOfFields('$(SetCursor.table)') // dollar sign expansion + quotes&lt;BR /&gt;LET SetCursor.col = FieldName($(SetCursor.n), '$(SetCursor.table)'); // dollar sign expansion + quotes&lt;BR /&gt;LET [$(SetCursor.col)] = Peek('$(SetCursor.col)', $(SetCursor.record) - 1, '$(SetCursor.table)'); // dollar sign expansion + quotes where needed&lt;BR /&gt;NEXT&lt;/P&gt;&lt;P&gt;LET SetCursor.n = Null();&lt;BR /&gt;LET SetCursor.table = Null();&lt;BR /&gt;LET SetCursor.col = Null();&lt;BR /&gt;END SUB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For n=1 To NoOfRows('tmp2')&lt;/P&gt;&lt;P&gt;CALL SetCursor('tmp2',n);&lt;/P&gt;&lt;P&gt;IF $(Variation)&amp;gt;$(Target_Diff) then&lt;/P&gt;&lt;P&gt;LIB CONNECT TO 'SendEmail';&lt;/P&gt;&lt;P&gt;SendStatus:&lt;BR /&gt;SQL SELECT "status", "result", "filesattached"&lt;BR /&gt;FROM CSV (header on, delimiter ",", quote """") "CSV_source"&lt;BR /&gt;WITH CONNECTION (&lt;BR /&gt;QUERY "to" "lakshmi18021994@gmail.com"&lt;BR /&gt;,QUERY "cc" "lakshmi18021994@gmail.com"&lt;BR /&gt;,QUERY "subject" "Urgent Action Required"&lt;BR /&gt;,QUERY "message" "Huge variation in current forecast and last month's forecast has been observed. Please take the necessary steps"&lt;BR /&gt;,QUERY "fromName" "Donot Reply"&lt;BR /&gt;,QUERY "fromEmail" "lakshmisushmitha.tallapudi@gmail.com"&lt;BR /&gt;,QUERY "format" "csv"&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;EndIf&lt;BR /&gt;NEXT&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 15 Aug 2019 20:26:12 GMT</pubDate>
    <dc:creator>Sushmitha_tallapudi</dc:creator>
    <dc:date>2019-08-15T20:26:12Z</dc:date>
    <item>
      <title>Error in the QlikSense Load Editor Script. Please help!</title>
      <link>https://community.qlik.com/t5/App-Development/Error-in-the-QlikSense-Load-Editor-Script-Please-help/m-p/1613048#M45637</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried running the below script in the qliksense load editor which involves connecting to qlik web connectors. It is constantly throwing the below error. Could someone please help.&lt;/P&gt;&lt;DIV class="headline edc_error"&gt;&lt;EM&gt;The following error occurred:&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="empty undefined"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="headline edc_error"&gt;&lt;EM&gt;The error occurred here:&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&lt;EM&gt;For n=1 To NoOfRows('tmp2')&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&lt;U&gt;&lt;STRONG&gt;&lt;EM&gt;My Script:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&lt;P&gt;tmp2:&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;[Brand_Name]&lt;BR /&gt;,[Name]&lt;BR /&gt;,[First_Name]&lt;BR /&gt;,[Email_ID]&lt;BR /&gt;,Avg([Past_Forecast]) as [Past_Forecast]&lt;BR /&gt;,Avg([Curr_Forecast]) as [Curr_Forecast]&lt;BR /&gt;,Avg([Variation]) as [Variation]&lt;BR /&gt;,Avg([Target_Diff]) as [Target_Diff]&lt;BR /&gt;Resident tmp1&lt;/P&gt;&lt;P&gt;Group By [Brand_Name],[Email_ID],[Name],[First_Name];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SUB SetCursor (SetCursor.table, SetCursor.record)&lt;BR /&gt;// LET SetCursor.n=1; // don't need this&lt;/P&gt;&lt;P&gt;FOR SetCursor.n = 1 TO NoOfFields('$(SetCursor.table)') // dollar sign expansion + quotes&lt;BR /&gt;LET SetCursor.col = FieldName($(SetCursor.n), '$(SetCursor.table)'); // dollar sign expansion + quotes&lt;BR /&gt;LET [$(SetCursor.col)] = Peek('$(SetCursor.col)', $(SetCursor.record) - 1, '$(SetCursor.table)'); // dollar sign expansion + quotes where needed&lt;BR /&gt;NEXT&lt;/P&gt;&lt;P&gt;LET SetCursor.n = Null();&lt;BR /&gt;LET SetCursor.table = Null();&lt;BR /&gt;LET SetCursor.col = Null();&lt;BR /&gt;END SUB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For n=1 To NoOfRows('tmp2')&lt;/P&gt;&lt;P&gt;CALL SetCursor('tmp2',n);&lt;/P&gt;&lt;P&gt;IF $(Variation)&amp;gt;$(Target_Diff) then&lt;/P&gt;&lt;P&gt;LIB CONNECT TO 'SendEmail';&lt;/P&gt;&lt;P&gt;SendStatus:&lt;BR /&gt;SQL SELECT "status", "result", "filesattached"&lt;BR /&gt;FROM CSV (header on, delimiter ",", quote """") "CSV_source"&lt;BR /&gt;WITH CONNECTION (&lt;BR /&gt;QUERY "to" "lakshmi18021994@gmail.com"&lt;BR /&gt;,QUERY "cc" "lakshmi18021994@gmail.com"&lt;BR /&gt;,QUERY "subject" "Urgent Action Required"&lt;BR /&gt;,QUERY "message" "Huge variation in current forecast and last month's forecast has been observed. Please take the necessary steps"&lt;BR /&gt;,QUERY "fromName" "Donot Reply"&lt;BR /&gt;,QUERY "fromEmail" "lakshmisushmitha.tallapudi@gmail.com"&lt;BR /&gt;,QUERY "format" "csv"&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;EndIf&lt;BR /&gt;NEXT&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 15 Aug 2019 20:26:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-in-the-QlikSense-Load-Editor-Script-Please-help/m-p/1613048#M45637</guid>
      <dc:creator>Sushmitha_tallapudi</dc:creator>
      <dc:date>2019-08-15T20:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error in the QlikSense Load Editor Script. Please help!</title>
      <link>https://community.qlik.com/t5/App-Development/Error-in-the-QlikSense-Load-Editor-Script-Please-help/m-p/1613056#M45638</link>
      <description>&lt;P&gt;whats is the error you are getting?&lt;/P&gt;&lt;P&gt;nothing seems wrong with&amp;nbsp;&lt;EM&gt;For n=1 To NoOfRows('tmp2')&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 20:57:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-in-the-QlikSense-Load-Editor-Script-Please-help/m-p/1613056#M45638</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-08-15T20:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Error in the QlikSense Load Editor Script. Please help!</title>
      <link>https://community.qlik.com/t5/App-Development/Error-in-the-QlikSense-Load-Editor-Script-Please-help/m-p/1613429#M45678</link>
      <description>&lt;P&gt;Technically the table called tmp2 does not exist in memory.&lt;BR /&gt;&lt;BR /&gt;If I had to guess, tmp1 and tmp2 both have the same field names, so Qlik is auto-concatenating the result to tmp1.&lt;BR /&gt;&lt;BR /&gt;To fix this you should do :&lt;BR /&gt;&lt;BR /&gt;tmp2:&lt;BR /&gt;NOCONCATENATE LOAD&lt;BR /&gt;[Brand_Name]&lt;BR /&gt;,[Name]&lt;BR /&gt;,[First_Name]&lt;BR /&gt;,[Email_ID]&lt;BR /&gt;,Avg([Past_Forecast]) as [Past_Forecast]&lt;BR /&gt;,Avg([Curr_Forecast]) as [Curr_Forecast]&lt;BR /&gt;,Avg([Variation]) as [Variation]&lt;BR /&gt;,Avg([Target_Diff]) as [Target_Diff]&lt;BR /&gt;Resident tmp1&lt;BR /&gt;Group By [Brand_Name],[Email_ID],[Name],[First_Name];&lt;BR /&gt;&lt;BR /&gt;drop tmp1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;It is throwing an error because NoOfRows('tmp2') -&amp;gt; tmp2 table does not exist&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 22:19:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-in-the-QlikSense-Load-Editor-Script-Please-help/m-p/1613429#M45678</guid>
      <dc:creator>Sazabi</dc:creator>
      <dc:date>2019-08-16T22:19:54Z</dc:date>
    </item>
  </channel>
</rss>

