<?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: replace last character to first on condition in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/replace-last-character-to-first-on-condition/m-p/2340958#M108944</link>
    <description>Hi Avinash,&lt;BR /&gt;Thanks for your Reply.&lt;BR /&gt;But i Am getting attached error while applying your code.&lt;BR /&gt;Regards,&lt;BR /&gt;Dhruv&amp;nbsp;</description>
    <pubDate>Tue, 13 Sep 2016 07:37:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-09-13T07:37:26Z</dc:date>
    <item>
      <title>replace last character to first on condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replace-last-character-to-first-on-condition/m-p/2340956#M108942</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I am getting data as&amp;nbsp;42788.00- and&amp;nbsp;231249.00- in csv but it is actually -42788.00 and -231249.00.&lt;BR /&gt;So how to remove - from last and add uit to first wherever its negative value.&lt;BR /&gt;Regards,&lt;BR /&gt;Dhruv&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 06:02:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replace-last-character-to-first-on-condition/m-p/2340956#M108942</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-13T06:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: replace last character to first on condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replace-last-character-to-first-on-condition/m-p/2340957#M108943</link>
      <description>Hi Dhruv,&lt;BR /&gt;Try this logic using tMap component....&lt;BR /&gt;public class Test {&lt;BR /&gt;	public static void main(String[] args) {&lt;BR /&gt;		String str="42788.00";&lt;BR /&gt;		if(str.endsWith("-"))&lt;BR /&gt;		{&lt;BR /&gt;			System.out.println("true");&lt;BR /&gt;			String Str1=str.replace("-", " ");&lt;BR /&gt;			System.out.println(Str1);&lt;BR /&gt;		}&lt;BR /&gt;		else&lt;BR /&gt;		{&lt;BR /&gt;			String Str2="-".concat(str);&lt;BR /&gt;			System.out.println(Str2);&lt;BR /&gt;		}		&lt;BR /&gt;	}&lt;BR /&gt;}</description>
      <pubDate>Tue, 13 Sep 2016 06:38:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replace-last-character-to-first-on-condition/m-p/2340957#M108943</guid>
      <dc:creator>avinashbasetty</dc:creator>
      <dc:date>2016-09-13T06:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: replace last character to first on condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replace-last-character-to-first-on-condition/m-p/2340958#M108944</link>
      <description>Hi Avinash,&lt;BR /&gt;Thanks for your Reply.&lt;BR /&gt;But i Am getting attached error while applying your code.&lt;BR /&gt;Regards,&lt;BR /&gt;Dhruv&amp;nbsp;</description>
      <pubDate>Tue, 13 Sep 2016 07:37:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replace-last-character-to-first-on-condition/m-p/2340958#M108944</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-13T07:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: replace last character to first on condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replace-last-character-to-first-on-condition/m-p/2340959#M108945</link>
      <description>Hi,
&lt;BR /&gt;I have tried below code and i think this should work.
&lt;BR /&gt;(StringHandling.RIGHT(row1.Column52,1)="-" ? "-"+StringHandling.EREPLACE(row1.Column52,"-",""): row1.Column52)
&lt;BR /&gt;but there is one error
&lt;BR /&gt;"the left hand side assignment must be a variable."
&lt;BR /&gt;I am not able to understand this error.
&lt;BR /&gt;Please help me with this.
&lt;BR /&gt;Regards,
&lt;BR /&gt;Dhruv</description>
      <pubDate>Tue, 13 Sep 2016 07:46:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replace-last-character-to-first-on-condition/m-p/2340959#M108945</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-13T07:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: replace last character to first on condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/replace-last-character-to-first-on-condition/m-p/2340960#M108946</link>
      <description>You're using a single '=' for comparison instead of a '=='. 
&lt;BR /&gt; 
&lt;BR /&gt;However, you're comparing strings, so you should be using .equals instead of == for comparison. 
&lt;BR /&gt; 
&lt;BR /&gt;e.g. "-".equals(StringHandling.RIGHT(row1.Column52,1)) ? "-"+StringHandling.EREPLACE(row1.Column52,"-","") : row1.Column52</description>
      <pubDate>Tue, 13 Sep 2016 17:06:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/replace-last-character-to-first-on-condition/m-p/2340960#M108946</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2016-09-13T17:06:08Z</dc:date>
    </item>
  </channel>
</rss>

