<?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: leading zero using Len() in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/leading-zero-using-Len/m-p/1726492#M55377</link>
    <description>&lt;P&gt;okay i think i have got it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25001"&gt;@Vegar&lt;/a&gt;&amp;nbsp;your solution is absolutely correct. i get correct length for the zip code that (like descibed above) is actually "2" and not "0002". So what i find curious is that qlik shows me "0002" as zip code although in source file i have "2"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Raw data looks like this:&lt;/P&gt;&lt;P&gt;order_number;ticket;name;surname;E-Mail;country;state;address;zip_code&lt;/P&gt;&lt;P&gt;"2019-08-20 08:35:36";"mobile";"Jon";"Doe";"jd@yahoo.com";"IE";"Dublin";"Jon Doe Way";"2"&lt;/P&gt;&lt;P&gt;"2019-11-09 12:04:26";"mobile";"Artur";"Conan";"ac@gmail.com";"UK";"London";"buckingham palace";"0002"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so whats wrong is that my qlik table in analysis mode shows a totally wrong zip code ("0002" in both cases) and therefore length function used in analysis mode is wrong too...&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jul 2020 12:38:31 GMT</pubDate>
    <dc:creator>wlpike</dc:creator>
    <dc:date>2020-07-09T12:38:31Z</dc:date>
    <item>
      <title>leading zero using Len()</title>
      <link>https://community.qlik.com/t5/App-Development/leading-zero-using-Len/m-p/1724294#M55124</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have an issue when importing data using ZIP codes from all over the world.&lt;/P&gt;&lt;P&gt;in the import script is want to identify the length of the zip codes using len().&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's working for almost every ZIP, but not for those that have leading zeroes. As it seems Len() is not recognizing a number (or a converted string) that begins with a zero.&lt;/P&gt;&lt;P&gt;the code i use is very easy:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Len(PLZ) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i tried that too:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Len(Text(PLZ))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g. when checking ZIP codes "01007" i get "4" in return (in both cases)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But what startled me is that when using the same code in the analysis area i get the correct length (5).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So why does it not work in the script area?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;br&lt;/P&gt;&lt;P&gt;chris&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2020 05:25:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/leading-zero-using-Len/m-p/1724294#M55124</guid>
      <dc:creator>wlpike</dc:creator>
      <dc:date>2020-07-02T05:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: leading zero using Len()</title>
      <link>https://community.qlik.com/t5/App-Development/leading-zero-using-Len/m-p/1724305#M55125</link>
      <description>&lt;P&gt;What you are telling us sounds like a big in my ears, Len() is a string function and I world expect it to return 5 in both your cases.&lt;/P&gt;&lt;P&gt;Im on vacation without access to try this myself, but if someone else are able to reproduce your error on the newest release of Qlik Sense then I suggest that you get in touch with Qlik Support in order to get it verified /registered as a bug.&lt;/P&gt;&lt;P&gt;A workaround could be something like this : &lt;EM&gt;&lt;STRONG&gt;Len('x' &amp;amp; text(PLZ) )&amp;nbsp; - 1 as Length&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2020 06:26:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/leading-zero-using-Len/m-p/1724305#M55125</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-07-02T06:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: leading zero using Len()</title>
      <link>https://community.qlik.com/t5/App-Development/leading-zero-using-Len/m-p/1724693#M55177</link>
      <description>&lt;P&gt;Nice thought&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25001"&gt;@Vegar&lt;/a&gt;&amp;nbsp;. It's working.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 03:00:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/leading-zero-using-Len/m-p/1724693#M55177</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-07-03T03:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: leading zero using Len()</title>
      <link>https://community.qlik.com/t5/App-Development/leading-zero-using-Len/m-p/1726445#M55373</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25001"&gt;@Vegar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for this solution. On the first view its working, but it seems there is again a difference between using the code in load script or in analysis area.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now for most of the zip codes i get the correct lenght, but for some of them not.&lt;/P&gt;&lt;P&gt;What puzzles me is that i get a different length for the same zip code. E.g.&amp;nbsp; '0002'&lt;/P&gt;&lt;P&gt;sometimes i get "1" sometimes&amp;nbsp; i get "4"&lt;/P&gt;&lt;P&gt;When i use your code in a chart table i alway get length "4".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do you know why this could happen?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 11:29:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/leading-zero-using-Len/m-p/1726445#M55373</guid>
      <dc:creator>wlpike</dc:creator>
      <dc:date>2020-07-09T11:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: leading zero using Len()</title>
      <link>https://community.qlik.com/t5/App-Development/leading-zero-using-Len/m-p/1726460#M55374</link>
      <description>&lt;P&gt;Can you share sample data to reproduce the issue&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 11:52:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/leading-zero-using-Len/m-p/1726460#M55374</guid>
      <dc:creator>arulsettu</dc:creator>
      <dc:date>2020-07-09T11:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: leading zero using Len()</title>
      <link>https://community.qlik.com/t5/App-Development/leading-zero-using-Len/m-p/1726492#M55377</link>
      <description>&lt;P&gt;okay i think i have got it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25001"&gt;@Vegar&lt;/a&gt;&amp;nbsp;your solution is absolutely correct. i get correct length for the zip code that (like descibed above) is actually "2" and not "0002". So what i find curious is that qlik shows me "0002" as zip code although in source file i have "2"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Raw data looks like this:&lt;/P&gt;&lt;P&gt;order_number;ticket;name;surname;E-Mail;country;state;address;zip_code&lt;/P&gt;&lt;P&gt;"2019-08-20 08:35:36";"mobile";"Jon";"Doe";"jd@yahoo.com";"IE";"Dublin";"Jon Doe Way";"2"&lt;/P&gt;&lt;P&gt;"2019-11-09 12:04:26";"mobile";"Artur";"Conan";"ac@gmail.com";"UK";"London";"buckingham palace";"0002"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so whats wrong is that my qlik table in analysis mode shows a totally wrong zip code ("0002" in both cases) and therefore length function used in analysis mode is wrong too...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 12:38:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/leading-zero-using-Len/m-p/1726492#M55377</guid>
      <dc:creator>wlpike</dc:creator>
      <dc:date>2020-07-09T12:38:31Z</dc:date>
    </item>
  </channel>
</rss>

