<?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: Loop until len(trim()) = x in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loop-until-len-trim-x/m-p/29562#M4905</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this : num(x,'0000000000')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Feb 2018 16:43:20 GMT</pubDate>
    <dc:creator>jaumecf23</dc:creator>
    <dc:date>2018-02-28T16:43:20Z</dc:date>
    <item>
      <title>Loop until len(trim()) = x</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-until-len-trim-x/m-p/29561#M4904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a number in following format: 99265, 13, 123468&lt;/P&gt;&lt;P&gt;I want to load it as a 10 digit string with zero in front. --&amp;gt; 0000099265, &lt;SPAN style="font-size: 13.3333px;"&gt;0000000013, &lt;SPAN style="font-size: 13.3333px;"&gt;0000123468&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;My first try would be something like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;if(len(trim(x))=1; '00000000' &amp;amp; x ;&lt;SPAN style="font-size: 13.3333px;"&gt;if(len(trim(x))=2; '0000000' &amp;amp; x ;.....&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is there a way to do this smoother than this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Timo &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 15:48:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-until-len-trim-x/m-p/29561#M4904</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-28T15:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Loop until len(trim()) = x</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-until-len-trim-x/m-p/29562#M4905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this : num(x,'0000000000')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 16:43:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-until-len-trim-x/m-p/29562#M4905</guid>
      <dc:creator>jaumecf23</dc:creator>
      <dc:date>2018-02-28T16:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Loop until len(trim()) = x</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-until-len-trim-x/m-p/29563#M4906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help! Works perfectly!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 18:06:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-until-len-trim-x/m-p/29563#M4906</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-28T18:06:04Z</dc:date>
    </item>
  </channel>
</rss>

