<?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: Array and loops in Qlik Sense in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Array-and-loops-in-Qlik-Sense/m-p/2152113#M93312</link>
    <description>&lt;P&gt;Hi &lt;SPAN&gt;kaushiknsolanki&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P&gt;Thank you very much for your help. It has worked to 100% and i have learned something new.&lt;/P&gt;
&lt;P&gt;Thank you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2023 15:23:21 GMT</pubDate>
    <dc:creator>americanetsMD</dc:creator>
    <dc:date>2023-12-12T15:23:21Z</dc:date>
    <item>
      <title>Array and loops in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Array-and-loops-in-Qlik-Sense/m-p/2146391#M93283</link>
      <description>&lt;P&gt;My task is to create a Qlik Sense script to check whether a given set of EAN (European Article Numbers) numbers have the correct check digit.&lt;BR /&gt;If the given EAN Number has more or less than 13 digits is to be considered invalid.&lt;BR /&gt;The check digit is calculated based on the following set of rules.&lt;/P&gt;
&lt;P&gt;1. Sum all the digits in even positions and multiply by 3.&lt;BR /&gt;2. Add all the digits in odd positions (except for the last one, which is the check digit) to the number you’ve got in the first step.&lt;BR /&gt;3. Divide that number, received in the second step, by 10 and take the remainder.&lt;BR /&gt;4. If the remainder is not 0, subtract it from 10.&lt;/P&gt;
&lt;P&gt;EAN Number List:&lt;BR /&gt;123456789012&lt;BR /&gt;1234567890123&lt;BR /&gt;9999999999999&lt;BR /&gt;9999999999998&lt;BR /&gt;4045012019462&lt;BR /&gt;4045012020147&lt;BR /&gt;4045012001375&lt;/P&gt;
&lt;P&gt;An Example of how it's done:&lt;BR /&gt;the check digit calculation for EAN Number 4045012020147:&lt;/P&gt;
&lt;P&gt;The digits in even positions are: 0, 5, 1, 0, 0, 4, their sum is 10, multiplied by 3 it is 30;&lt;BR /&gt;The digits in odd positions (except the last one) are: 4, 4, 0, 2, 2, 1, their sum is 13, added to the number above it is 43;&lt;BR /&gt;Dividing 43 by 10 gives us 3 as a remainder;&lt;BR /&gt;It is not zero, so subtracting it from 10 to get the check digit: 7.&lt;BR /&gt;The check digit is "7".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could anyone please guide me in how to achieve my goal.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 17:18:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Array-and-loops-in-Qlik-Sense/m-p/2146391#M93283</guid>
      <dc:creator>americanetsMD</dc:creator>
      <dc:date>2023-12-11T17:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Array and loops in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Array-and-loops-in-Qlik-Sense/m-p/2146403#M93284</link>
      <description>&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;Data:&lt;/DIV&gt;
&lt;DIV&gt;Load Len(EANNumberList) as Length,* inline [&lt;/DIV&gt;
&lt;DIV&gt;EANNumberList&lt;/DIV&gt;
&lt;DIV&gt;123456789012&lt;/DIV&gt;
&lt;DIV&gt;1234567890123&lt;/DIV&gt;
&lt;DIV&gt;9999999999999&lt;/DIV&gt;
&lt;DIV&gt;9999999999998&lt;/DIV&gt;
&lt;DIV&gt;4045012019462&lt;/DIV&gt;
&lt;DIV&gt;4045012020147&lt;/DIV&gt;
&lt;DIV&gt;4045012001375&lt;/DIV&gt;
&lt;DIV&gt;];&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Data1:&lt;/DIV&gt;
&lt;DIV&gt;NoConcatenate&lt;/DIV&gt;
&lt;DIV&gt;Load * Resident Data&lt;/DIV&gt;
&lt;DIV&gt;Where Length = 13;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Drop table Data;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Data2:&lt;/DIV&gt;
&lt;DIV&gt;Load *, If(Mod(((EvenAdd*3)+OddAdd),10)&amp;lt;&amp;gt;0,10-Mod(((EvenAdd*3)+OddAdd),10),0) as CheckNum;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Load *,&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Rangesum(Mid(EANNumberList,2,1),Mid(EANNumberList,4,1),Mid(EANNumberList,6,1),Mid(EANNumberList,8,1),Mid(EANNumberList,10,1),Mid(EANNumberList,12,1)) as EvenAdd,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Rangesum(Mid(EANNumberList,1,1),Mid(EANNumberList,3,1),Mid(EANNumberList,5,1),Mid(EANNumberList,7,1),Mid(EANNumberList,9,1),Mid(EANNumberList,11,1)) as OddAdd&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;Resident Data1;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Drop table Data1;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 11 Dec 2023 18:09:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Array-and-loops-in-Qlik-Sense/m-p/2146403#M93284</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2023-12-11T18:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Array and loops in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Array-and-loops-in-Qlik-Sense/m-p/2152113#M93312</link>
      <description>&lt;P&gt;Hi &lt;SPAN&gt;kaushiknsolanki&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P&gt;Thank you very much for your help. It has worked to 100% and i have learned something new.&lt;/P&gt;
&lt;P&gt;Thank you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 15:23:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Array-and-loops-in-Qlik-Sense/m-p/2152113#M93312</guid>
      <dc:creator>americanetsMD</dc:creator>
      <dc:date>2023-12-12T15:23:21Z</dc:date>
    </item>
  </channel>
</rss>

