<?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 Concatenating With IF THEN ELSE Syntax in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Concatenating-With-IF-THEN-ELSE-Syntax/m-p/2198796#M1981</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am dealing with an Input file with a Separate Column for Area Code and Phone Number I combined them together by concatenating them&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;row2.AREA_CODE + row2.PHONE&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now Instead of having blank values for records without area codes and phone numbers the input file has both "000" for Area Code and "0000000" for Phone Number.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If I wanted to build a String Method in my tMap Output Expression for the Field Phone Number How Would I leave the Field Blank if both Area Code and Phone Number had "000" or "0000000"? I obviously want to pass through the values that actual contain number values for these two fields.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please Advise&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Andrew&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Feb 2019 16:23:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-02-26T16:23:55Z</dc:date>
    <item>
      <title>Concatenating With IF THEN ELSE Syntax</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Concatenating-With-IF-THEN-ELSE-Syntax/m-p/2198796#M1981</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am dealing with an Input file with a Separate Column for Area Code and Phone Number I combined them together by concatenating them&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;row2.AREA_CODE + row2.PHONE&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now Instead of having blank values for records without area codes and phone numbers the input file has both "000" for Area Code and "0000000" for Phone Number.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If I wanted to build a String Method in my tMap Output Expression for the Field Phone Number How Would I leave the Field Blank if both Area Code and Phone Number had "000" or "0000000"? I obviously want to pass through the values that actual contain number values for these two fields.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please Advise&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Andrew&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2019 16:23:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Concatenating-With-IF-THEN-ELSE-Syntax/m-p/2198796#M1981</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-26T16:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating With IF THEN ELSE Syntax</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Concatenating-With-IF-THEN-ELSE-Syntax/m-p/2198797#M1982</link>
      <description>&lt;P&gt;Try something link this&lt;/P&gt;&lt;P&gt;(row2.AREA_CODE == null || Integer.parseInt(row2.AREA_CODE) == 0 ? "" : row2.AREA_CODE +&lt;BR /&gt;row2.PHONE == null || Integer.parseInt(row2.PHONE) == 0 ? "" : row2.PHONE;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2019 16:39:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Concatenating-With-IF-THEN-ELSE-Syntax/m-p/2198797#M1982</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-02-26T16:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating With IF THEN ELSE Syntax</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Concatenating-With-IF-THEN-ELSE-Syntax/m-p/2198798#M1983</link>
      <description>&lt;P&gt;You need to be a bit more specific with this. Can you clarify....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1) Will the output be null or an empty String if the requirements are not met?&lt;/P&gt; 
&lt;P&gt;2) Do BOTH&amp;nbsp; AREA_CODE and PHONE have to have values for them to be combined? For example, which of the following are acceptable...&lt;/P&gt; 
&lt;P&gt;000+123456768 = 00012345678&lt;/P&gt; 
&lt;P&gt;123+00000000 =&amp;nbsp;12300000000&lt;/P&gt; 
&lt;P&gt;000+00000000 =&amp;nbsp;null&lt;/P&gt; 
&lt;P&gt;000+00000000 = ""&lt;/P&gt; 
&lt;P&gt;123+00000000 =&amp;nbsp;null&lt;/P&gt; 
&lt;P&gt;123+00000000 = ""&lt;/P&gt; 
&lt;P&gt;000+1234567890 =&amp;nbsp;null&lt;/P&gt; 
&lt;P&gt;000+1234567890 = ""&lt;/P&gt; 
&lt;P&gt;123+12345678 =&amp;nbsp;12312345678&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2019 16:46:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Concatenating-With-IF-THEN-ELSE-Syntax/m-p/2198798#M1983</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-26T16:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating With IF THEN ELSE Syntax</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Concatenating-With-IF-THEN-ELSE-Syntax/m-p/2198799#M1984</link>
      <description>&lt;P&gt;Hi Rhall,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1) An empty String is what I am looking for the final Output Field which will be Phone Number&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2)The Area Code + Phone Number Field have to be combined&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;For Instance&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;123+4567890 Would turn into 1234567890&lt;/P&gt; 
&lt;P&gt;If the Area Code value is "000" then the Phone Number Field will be "0000000" as well. So I'm trying to remove the 0's from the output and only have empty strings&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;123+1234567 =&amp;nbsp;1231234567&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;000+00000000 = ""&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;You won't see any of the other values/combinations you listed in the input file&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2019 17:46:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Concatenating-With-IF-THEN-ELSE-Syntax/m-p/2198799#M1984</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-26T17:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating With IF THEN ELSE Syntax</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Concatenating-With-IF-THEN-ELSE-Syntax/m-p/2198800#M1985</link>
      <description>&lt;P&gt;Hello Kumar,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Your current String Method is not outputting the Area Code just the&amp;nbsp; 7 Digit Phone Number. I do notice the 0's in the area code and phone number are not appearing. Your close but not quite there.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2019 18:04:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Concatenating-With-IF-THEN-ELSE-Syntax/m-p/2198800#M1985</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-26T18:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating With IF THEN ELSE Syntax</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Concatenating-With-IF-THEN-ELSE-Syntax/m-p/2198801#M1986</link>
      <description>&lt;P&gt;If that's the case (and you are sure there will be no nulls coming in) the solution will be this....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;row2.AREA_CODE.equals("000") || row2.PHONE.equals("0000000") ? "" : row2.AREA_CODE + row2.PHONE&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Feb 2019 22:26:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Concatenating-With-IF-THEN-ELSE-Syntax/m-p/2198801#M1986</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-26T22:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating With IF THEN ELSE Syntax</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Concatenating-With-IF-THEN-ELSE-Syntax/m-p/2198802#M1987</link>
      <description>&lt;P&gt;Hi Andrew,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LP7CAAW"&gt;@uganesh&lt;/A&gt;&amp;nbsp;has already shown you the method to replace the values based on null expressions. One another item I would like to introduce is a component to Standardize phone numbers (tStandardizePhoneNumbers).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This component had helped me in one of my previous UK projects to standardize the phone number to common format and flag any invalid of impossible phone numbers. It can be used for other countries also.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M2ou.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145513iF0257B4704C19804/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M2ou.png" alt="0683p000009M2ou.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The help document link to the component is as shown below.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://help.talend.com/reader/hCrOzogIwKfuR3mPf~LydA/8_Q4WAzPdmlNfO5mdguPVg" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/hCrOzogIwKfuR3mPf~LydA/8_Q4WAzPdmlNfO5mdguPVg&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Could you please pass the values through this component and see whether it is helping in data quality checks of your incoming data? You need to merge the data as specified in previous posts. Once the incoming data is ready, the suggestion will be to pass the data through this component to make sure that it is getting enriched further.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2019 03:36:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Concatenating-With-IF-THEN-ELSE-Syntax/m-p/2198802#M1987</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-27T03:36:08Z</dc:date>
    </item>
  </channel>
</rss>

