<?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: How to write if then else in tjavarow? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-write-if-then-else-in-tjavarow/m-p/2304550#M76313</link>
    <description>&lt;P&gt;Resolved it by adding \ front of the escape character&lt;/P&gt;</description>
    <pubDate>Mon, 13 Aug 2018 22:20:10 GMT</pubDate>
    <dc:creator>rp2018</dc:creator>
    <dc:date>2018-08-13T22:20:10Z</dc:date>
    <item>
      <title>How to write if then else in tjavarow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-write-if-then-else-in-tjavarow/m-p/2304546#M76309</link>
      <description>&lt;P&gt;I'm trying to write a case statement in tjavarow using if then else.&amp;nbsp; &amp;nbsp;This is what I've written and it's not working.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output_row.Value = if (input_row.Value = "MP\/MM") {&amp;nbsp; &amp;nbsp;&lt;BR /&gt;output_row.Value = "MP / MM";&lt;BR /&gt;} else if (input_row.Value = "T&amp;nbsp;\u200 MM") {&lt;BR /&gt;output_row.Value = "T - M";&lt;BR /&gt;} else if (input_row.Value = "T \u200 ND") {&lt;BR /&gt;output_row.Value = "T - ND";&lt;BR /&gt;} else if (input_row.Value = "T LF") {&lt;BR /&gt;output_row.Value = "LF";&lt;BR /&gt;} else {&lt;BR /&gt;output_row.Value = input_row.Value;&amp;nbsp;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 18:30:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-write-if-then-else-in-tjavarow/m-p/2304546#M76309</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2018-08-13T18:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to write if then else in tjavarow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-write-if-then-else-in-tjavarow/m-p/2304547#M76310</link>
      <description>You must follow Java rules. 
&lt;BR /&gt;1st, remove "output_row.Value =" from the beginning 
&lt;BR /&gt;2nd, don't use == for strings comparison, use String.equals method. For example, you should write 
&lt;BR /&gt;if ("MP\/MM".equals(input_row.Value))</description>
      <pubDate>Mon, 13 Aug 2018 21:02:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-write-if-then-else-in-tjavarow/m-p/2304547#M76310</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-08-13T21:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to write if then else in tjavarow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-write-if-then-else-in-tjavarow/m-p/2304548#M76311</link>
      <description>&lt;P&gt;After making the change per below suggestion.&amp;nbsp; Now, I'm getting following error message.&lt;/P&gt;&lt;P&gt;Detail&amp;nbsp;Message: Invalid escape sequence (valid ones are&amp;nbsp; \b&amp;nbsp; \t&amp;nbsp; \n&amp;nbsp; \f&amp;nbsp; \r&amp;nbsp; \"&amp;nbsp; \'&amp;nbsp; \\ )&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 22:07:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-write-if-then-else-in-tjavarow/m-p/2304548#M76311</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2018-08-13T22:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to write if then else in tjavarow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-write-if-then-else-in-tjavarow/m-p/2304549#M76312</link>
      <description>&lt;P&gt;I suspect that is caused by this&amp;nbsp;&lt;SPAN&gt;"MP\/MM". Change it to&amp;nbsp;&lt;/SPAN&gt;"MP\\/MM" and that will work. "\" is known as an escape character in Java. Certain characters have alternative meanings/uses in Strings. For example, a " character is used to enclose a String, if used inside the String without an escape character, it breaks the String. The "\" character is the escape character, so to use it literally you need to escape it.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 22:19:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-write-if-then-else-in-tjavarow/m-p/2304549#M76312</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-13T22:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to write if then else in tjavarow?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-write-if-then-else-in-tjavarow/m-p/2304550#M76313</link>
      <description>&lt;P&gt;Resolved it by adding \ front of the escape character&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 22:20:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-write-if-then-else-in-tjavarow/m-p/2304550#M76313</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2018-08-13T22:20:10Z</dc:date>
    </item>
  </channel>
</rss>

