<?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: tmap and string contains in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tmap-and-string-contains/m-p/2325311#M94923</link>
    <description>Hi, 
&lt;BR /&gt; 
&lt;BR /&gt;Below one for your 1 question answer: use in 'Type' field expression 
&lt;BR /&gt;(row1.order_number.contains("-X")||row.order_number.contains("-05-"))?"Engineering":"Components" 
&lt;BR /&gt; 
&lt;BR /&gt;Below one for second 2 question answer: use in 'Order_short' field expression 
&lt;BR /&gt;row1.order_number.contains("X")?(StringHandling.RIGHT(row1.order_number,7)): 
&lt;BR /&gt;(StringHandling.RIGHT(row1.order_number,10)) 
&lt;BR /&gt; 
&lt;BR /&gt; if order_number field contains data like 
&lt;BR /&gt; X-54266-05-10 or Q-70563-01-15 .............. 
&lt;BR /&gt;output like: 
&lt;BR /&gt;' Type' 'Order_short' 
&lt;BR /&gt;Engineering X-54266 
&lt;BR /&gt;Components Q-70563-01 
&lt;BR /&gt;In case 
&lt;BR /&gt;if order_number field contains data like(doesn't contains 'X' or 'Y') 
&lt;BR /&gt;54266-05-10 or 70563-01-15 .......... 
&lt;BR /&gt;output like: 
&lt;BR /&gt;' Type' 'Order_short' 
&lt;BR /&gt;Components 54266-05-1 
&lt;BR /&gt;Components 70563-01-1 
&lt;BR /&gt; 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;kumar.talend</description>
    <pubDate>Mon, 15 Jul 2013 17:43:01 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2013-07-15T17:43:01Z</dc:date>
    <item>
      <title>tmap and string contains</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-and-string-contains/m-p/2325309#M94921</link>
      <description>Hi,
&lt;BR /&gt;I have a text string containing our order numbers. There is some logic in our text strings which I would like to use for mapping purposes and also to reduce them somewhat into groups.
&lt;BR /&gt;An order number could be like X-54266-05-10 or Q-70563-01-15. I would then like to make two new columns by using for instance tmap
&lt;BR /&gt;1) A column called "Type" which is derived when the order number contains "X-" and "-05" then the type is "Engineering" and if it contains "Q-" and "-01" it is "Components" etc.
&lt;BR /&gt;2) A column called "Order short" which is defined by when the order is starting with "X" the length should be 7, so it in this example returns X-54266 and if the order starts with "Q" the length should be 10, so it returns Q-70563-01.
&lt;BR /&gt;I have tried all sorts of things, but I haven't succeeded so I really hope you can help me.
&lt;BR /&gt;Thanks.
&lt;BR /&gt;MNP</description>
      <pubDate>Mon, 15 Jul 2013 11:38:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-and-string-contains/m-p/2325309#M94921</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-07-15T11:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: tmap and string contains</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-and-string-contains/m-p/2325310#M94922</link>
      <description>row1.ColumnName.equals("") should solve your problem. By the way if your mater list is BIG to compare with, I'll suggest to include Lookup table or file.</description>
      <pubDate>Mon, 15 Jul 2013 12:02:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-and-string-contains/m-p/2325310#M94922</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-15T12:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: tmap and string contains</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-and-string-contains/m-p/2325311#M94923</link>
      <description>Hi, 
&lt;BR /&gt; 
&lt;BR /&gt;Below one for your 1 question answer: use in 'Type' field expression 
&lt;BR /&gt;(row1.order_number.contains("-X")||row.order_number.contains("-05-"))?"Engineering":"Components" 
&lt;BR /&gt; 
&lt;BR /&gt;Below one for second 2 question answer: use in 'Order_short' field expression 
&lt;BR /&gt;row1.order_number.contains("X")?(StringHandling.RIGHT(row1.order_number,7)): 
&lt;BR /&gt;(StringHandling.RIGHT(row1.order_number,10)) 
&lt;BR /&gt; 
&lt;BR /&gt; if order_number field contains data like 
&lt;BR /&gt; X-54266-05-10 or Q-70563-01-15 .............. 
&lt;BR /&gt;output like: 
&lt;BR /&gt;' Type' 'Order_short' 
&lt;BR /&gt;Engineering X-54266 
&lt;BR /&gt;Components Q-70563-01 
&lt;BR /&gt;In case 
&lt;BR /&gt;if order_number field contains data like(doesn't contains 'X' or 'Y') 
&lt;BR /&gt;54266-05-10 or 70563-01-15 .......... 
&lt;BR /&gt;output like: 
&lt;BR /&gt;' Type' 'Order_short' 
&lt;BR /&gt;Components 54266-05-1 
&lt;BR /&gt;Components 70563-01-1 
&lt;BR /&gt; 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;kumar.talend</description>
      <pubDate>Mon, 15 Jul 2013 17:43:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-and-string-contains/m-p/2325311#M94923</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-07-15T17:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: tmap and string contains</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-and-string-contains/m-p/2325312#M94924</link>
      <description>Thanks a lot for your replies. I have tried to do it like suggested by Kumar, and that works perfectly.</description>
      <pubDate>Tue, 16 Jul 2013 14:53:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-and-string-contains/m-p/2325312#M94924</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-07-16T14:53:24Z</dc:date>
    </item>
  </channel>
</rss>

