<?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: StringIndexOutOfBoundsException error on tMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/StringIndexOutOfBoundsException-error-on-tMap/m-p/2298406#M70877</link>
    <description>&lt;P&gt;Thanks a lot, Sir&lt;/P&gt;</description>
    <pubDate>Thu, 08 Oct 2020 08:46:53 GMT</pubDate>
    <dc:creator>hilmandenis</dc:creator>
    <dc:date>2020-10-08T08:46:53Z</dc:date>
    <item>
      <title>StringIndexOutOfBoundsException error on tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/StringIndexOutOfBoundsException-error-on-tMap/m-p/2298404#M70875</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a tMap and use a substring formula on 1 of the lookup column. The formula is like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row4.Merchandising_Code.substring(1,3)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run, I got an error says StringIndexOutOfBoundException: String Index Out Of Range: 3. When I look into my column values, there's some of the value that has 3 characters and there's also a blank value. After searching in this forum, I changed my query into this one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row4.Merchandising_Code.substring(1,Math.min(3, row4.Merchandising_Code.length()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I still got an error and now its String Index Out Of Range: -1. I think it because of the blank value. What should I change in the formula to catch blank values?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 05:13:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/StringIndexOutOfBoundsException-error-on-tMap/m-p/2298404#M70875</guid>
      <dc:creator>hilmandenis</dc:creator>
      <dc:date>2020-10-08T05:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: StringIndexOutOfBoundsException error on tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/StringIndexOutOfBoundsException-error-on-tMap/m-p/2298405#M70876</link>
      <description>&lt;P&gt;@Hilman Utomo​&amp;nbsp;, can you try to use the below on.so you will not get IndexOutOfBoundsException.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;row4.Merchandising_Code.length()&amp;gt;3?row4.Merchandising_Code.substring(1,3)&amp;nbsp;:row4.Merchandising_Code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 06:20:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/StringIndexOutOfBoundsException-error-on-tMap/m-p/2298405#M70876</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2020-10-08T06:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: StringIndexOutOfBoundsException error on tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/StringIndexOutOfBoundsException-error-on-tMap/m-p/2298406#M70877</link>
      <description>&lt;P&gt;Thanks a lot, Sir&lt;/P&gt;</description>
      <pubDate>Thu, 08 Oct 2020 08:46:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/StringIndexOutOfBoundsException-error-on-tMap/m-p/2298406#M70877</guid>
      <dc:creator>hilmandenis</dc:creator>
      <dc:date>2020-10-08T08:46:53Z</dc:date>
    </item>
  </channel>
</rss>

