<?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: Error in arithmetic operation in script load editor in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2117935#M12809</link>
    <description>&lt;P&gt;hello. Thanks for your reply. Unfortuntely, I already tried some different names on the right of the AS, such as [Nuova Data Documento] (which means new document date), but I got the same problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Sep 2023 14:26:59 GMT</pubDate>
    <dc:creator>LeonardoB25</dc:creator>
    <dc:date>2023-09-18T14:26:59Z</dc:date>
    <item>
      <title>Error in arithmetic operation in script load editor</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2117885#M12805</link>
      <description>&lt;P&gt;Hello, this is a snippet of my script load editor:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeonardoB25_0-1695042758699.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116501i0770639EB2E94142/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeonardoB25_0-1695042758699.png" alt="LeonardoB25_0-1695042758699.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I have the error "unexpected token" at line 68, the [Data Documento] on the right is the problem. Compiler expects an operator, a ':' or a ','. I really don't understand why it's wrong, since syntax seems correct from what i saw online.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here the error log:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeonardoB25_1-1695042875529.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116502iEC20B702234B029A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeonardoB25_1-1695042875529.png" alt="LeonardoB25_1-1695042875529.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 13:15:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2117885#M12805</guid>
      <dc:creator>LeonardoB25</dc:creator>
      <dc:date>2023-09-18T13:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error in arithmetic operation in script load editor</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2117895#M12806</link>
      <description>&lt;P&gt;Hi , you can't define [Data Documento] twice.&lt;/P&gt;
&lt;P&gt;[Data Documento], $(AgeofMostRecentDate) AS&amp;nbsp;[Data Documento2]&amp;nbsp; should work&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 13:38:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2117895#M12806</guid>
      <dc:creator>fachto76</dc:creator>
      <dc:date>2023-09-18T13:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Error in arithmetic operation in script load editor</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2117906#M12808</link>
      <description>&lt;P&gt;Your age-variable assignment is wrong and results in NULL which removed the variable. Reason is your attempt to access maxdata. In general no values could be accessed on the outside of load-statements unless using functions like peek() or fieldvalue() and so your variable-creation may look like:&lt;/P&gt;
&lt;P&gt;let var = fieldvalue('fieldname', 1);&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 13:50:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2117906#M12808</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-09-18T13:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error in arithmetic operation in script load editor</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2117935#M12809</link>
      <description>&lt;P&gt;hello. Thanks for your reply. Unfortuntely, I already tried some different names on the right of the AS, such as [Nuova Data Documento] (which means new document date), but I got the same problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 14:26:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2117935#M12809</guid>
      <dc:creator>LeonardoB25</dc:creator>
      <dc:date>2023-09-18T14:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error in arithmetic operation in script load editor</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2117940#M12810</link>
      <description>&lt;P&gt;Hello, thanks for your reply. From what I can see from documentation, it appears that fieldvalue with 1 accesses the first element in the loading order of that field. I don't understand how can this solve a problem. Does it fetch the biggest (most recent) date in that field even from outside the load statement?&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 14:31:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2117940#M12810</guid>
      <dc:creator>LeonardoB25</dc:creator>
      <dc:date>2023-09-18T14:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error in arithmetic operation in script load editor</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2117956#M12811</link>
      <description>&lt;P&gt;The field-value access per peek() and fieldvalue() is only on a defined index - but the table-records and/or field-values could be loaded in a certain order which makes a sensible access possible - especially if the first and/or last values are the wanted ones.&lt;/P&gt;
&lt;P&gt;In regard to your case I referred to maxdata which you creates the step before and this table has just a single record and therefore the access per:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;let var = fieldvalue('fieldname', 1);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;or alternatively&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;let var = peek('fieldname', 0, 'tablename');&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;will work.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 14:58:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2117956#M12811</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-09-18T14:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error in arithmetic operation in script load editor</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2118336#M12812</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeonardoB25_0-1695056282111.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116517i3ADBDC16F8947510/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeonardoB25_0-1695056282111.png" alt="LeonardoB25_0-1695056282111.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thanks for your reply. Unfortunately, the error persists the same even after i changed the variable declaration as you said. ("unexpected token: [Nuova Data Documento]")&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2023 17:00:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2118336#M12812</guid>
      <dc:creator>LeonardoB25</dc:creator>
      <dc:date>2023-09-18T17:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Error in arithmetic operation in script load editor</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2119802#M12813</link>
      <description>&lt;P&gt;My examples were with var/fieldname/tablename just generic - you need to apply the existing ones.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 05:48:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2119802#M12813</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-09-19T05:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Error in arithmetic operation in script load editor</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2119940#M12815</link>
      <description>&lt;P&gt;sorry I'm stupid as hell. Will try now.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 10:57:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2119940#M12815</guid>
      <dc:creator>LeonardoB25</dc:creator>
      <dc:date>2023-09-19T10:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error in arithmetic operation in script load editor</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2119946#M12816</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LeonardoB25_0-1695121341809.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116586iF7C3356D01A1AC13/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LeonardoB25_0-1695121341809.png" alt="LeonardoB25_0-1695121341809.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;unfortunately, the exactly same error persists even after your suggestions. I really don't know what could be the problem at this point&lt;BR /&gt;&lt;BR /&gt;thank you anyway&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 11:03:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2119946#M12816</guid>
      <dc:creator>LeonardoB25</dc:creator>
      <dc:date>2023-09-19T11:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Error in arithmetic operation in script load editor</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2119950#M12817</link>
      <description>&lt;P&gt;It's the syntax - "normal" fields and tables will be specified with: Fieldname respective wrapped with certain quotes like "" or [] if the field-names contain any spaces or special chars. But by using field-functions it's different because they require a string-representation for the field and therefore single-quotes, like (above already shown):&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;let var = fieldvalue(&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/FONT&gt;fieldname&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/FONT&gt;, 1);&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 11:12:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2119950#M12817</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-09-19T11:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error in arithmetic operation in script load editor</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2120015#M12818</link>
      <description>&lt;P&gt;you're right, it was my fault from the beginning. Thanks again!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2023 13:32:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Error-in-arithmetic-operation-in-script-load-editor/m-p/2120015#M12818</guid>
      <dc:creator>LeonardoB25</dc:creator>
      <dc:date>2023-09-19T13:32:58Z</dc:date>
    </item>
  </channel>
</rss>

