<?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: Filter: string / integer in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Filter-string-integer/m-p/2331549#M100523</link>
    <description>new attached screenshot</description>
    <pubDate>Wed, 10 Jun 2009 07:22:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-06-10T07:22:12Z</dc:date>
    <item>
      <title>Filter: string / integer</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filter-string-integer/m-p/2331548#M100522</link>
      <description>Hello, 
&lt;BR /&gt;I want to test the values of a field (ACBAC) in a tmap component: 
&lt;BR /&gt;row1.PFUNCO==4?StringHandling.LEFT(StringHandling.TRIM(row1.PFPN),8)+"/"+StringHandling.TRIM(row1.PFUNCO) 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9p6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134116iFBD5D7F21624A744/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9p6.png" alt="0683p000009M9p6.png" /&gt;&lt;/span&gt;tringHandling.TRIM(row1.PFPN)+"/"+StringHandling.TRIM(row1.PFUNCO) 
&lt;BR /&gt;currently it does not work! 
&lt;BR /&gt;It is strange because when I check the data type, ACBAC is an integer and when I test as an integer I get the following error: 
&lt;BR /&gt;Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
&lt;BR /&gt; Incompatible operand types String and int 
&lt;BR /&gt;When I test it as a string I don't have the error: 
&lt;BR /&gt;Starting job ArticlesUCv2 at 08:12 10/06/2009. 
&lt;BR /&gt; connecting to socket on port 3463 
&lt;BR /&gt; connected 
&lt;BR /&gt; disconnected 
&lt;BR /&gt;Job ArticlesUCv2 ended at 08:12 10/06/2009. 
&lt;BR /&gt;but it does always the "else" part of the condition. 
&lt;BR /&gt;example of the output data: 
&lt;BR /&gt;15366M0500/881 PPE MAZOUT AS47A 4 
&lt;BR /&gt;15366M0545/881 PPE MAZOUT AS47A +CABLE 4 
&lt;BR /&gt;15366P0500/K10 PPE MAZOUT AS47A 4 
&lt;BR /&gt;15366P0500/111 PPE MAZOUT AS47A 4 
&lt;BR /&gt;15366P0500/121 PPE MAZOUT AS47A 4 
&lt;BR /&gt; 
&lt;BR /&gt;as you see I have ACBAC=4 and it does not extract the left part of the firts field 
&lt;BR /&gt;Any ideas how to debug it? 
&lt;BR /&gt;Thanks 
&lt;BR /&gt;Didier</description>
      <pubDate>Sat, 16 Nov 2024 13:55:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filter-string-integer/m-p/2331548#M100522</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Filter: string / integer</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filter-string-integer/m-p/2331549#M100523</link>
      <description>new attached screenshot</description>
      <pubDate>Wed, 10 Jun 2009 07:22:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filter-string-integer/m-p/2331549#M100523</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-10T07:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Filter: string / integer</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filter-string-integer/m-p/2331550#M100524</link>
      <description>screenshot</description>
      <pubDate>Wed, 10 Jun 2009 07:23:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filter-string-integer/m-p/2331550#M100524</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-10T07:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Filter: string / integer</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filter-string-integer/m-p/2331551#M100525</link>
      <description>Hello 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;, ACBAC is an integer and when I test as an integer I get the following error:&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;ACBAC is an integer, but you set a string to it, so it will throws this exception. 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;as you see I have ACBAC=4 and it does not extract the left part of the firts field&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;From your result, I see this is one of records of PFUNCO: 
&lt;BR /&gt;881 PPE MAZOUT AS47A 4 
&lt;BR /&gt;Only the last char is 4, why don't you say 'I have ACBAC=4', you need get the last char and set it as condition. 
&lt;BR /&gt;Aslo, if the data type of ACBAC is string, you should define the expression as: 
&lt;BR /&gt;row1.PFUNCO.equals("xxx")?StringHandling.LEFT(StringHandling.TRIM(row1.PFPN),8)+"/"+StringHandling.TRIM(row1.PFUNCO) 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9p6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134116iFBD5D7F21624A744/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9p6.png" alt="0683p000009M9p6.png" /&gt;&lt;/span&gt;tringHandling.TRIM(row1.PFPN)+"/"+StringHandling.TRIM(row1.PFUNCO)</description>
      <pubDate>Wed, 10 Jun 2009 08:08:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filter-string-integer/m-p/2331551#M100525</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-10T08:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Filter: string / integer</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Filter-string-integer/m-p/2331552#M100526</link>
      <description>Hi Shong,
&lt;BR /&gt;Thanks for your recommandations
&lt;BR /&gt;I have found my misstake
&lt;BR /&gt;Didier</description>
      <pubDate>Wed, 10 Jun 2009 09:25:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Filter-string-integer/m-p/2331552#M100526</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-10T09:25:22Z</dc:date>
    </item>
  </channel>
</rss>

