<?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: String Method syntax in tMap Expression for Two seperate columns have to be populated for a seperate column to have a True or False Value in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2264440#M44271</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000006eKOgAAM"&gt;@nthampi&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm getting "IN" value for all values in my output column. With trying both of your String Methods&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I even tested it with a tFixedFlowInput and tLogRow and still got the same Output. So if the Organization Input column is populated then the First Name field will be blank and not NULL. This may change the syntax around. It's the same the other way around if First Name is populated then the Organization Input Column will be Blank and not NULL.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;See SS below&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-inline" image-alt="tfixedflow.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3Vj.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147278iBE13E59E64A3081B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3Vj.png" alt="0683p000009M3Vj.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tMap.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3Vo.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129966i77ABADF86191E614/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3Vo.png" alt="0683p000009M3Vo.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="output.PNG" style="width: 381px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3TB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136891i08A4359297C954AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3TB.png" alt="0683p000009M3TB.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Mar 2019 15:20:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-03-18T15:20:43Z</dc:date>
    <item>
      <title>String Method syntax in tMap Expression for Two seperate columns have to be populated for a seperate column to have a True or False Value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2264437#M44268</link>
      <description>&lt;P&gt;I have two input columns one is Organization and the other is Name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a separate output column with the field Type. If Organization is populated then the Name field is not going to be populated and the other way around. So I need String Method that will populate a column with either "OR" if Organization Input Field is populated or "IN" if Name field is populated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#FF0000"&gt;(IS NOT NULL)&lt;/FONT&gt;.equalsIgnoreCase(row1.Name) &amp;amp;&amp;amp; &lt;FONT color="#FF0000"&gt;(IS NOT NULL)&lt;/FONT&gt;.equalsIgnoreCase(row1.Organziation) ? "OR" : "IN"&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Not sure if there is a IS NOT NULL function in JAVA. I would need to handle NULLS in this syntax as well&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;Andrew&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 19:33:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2264437#M44268</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-15T19:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: String Method syntax in tMap Expression for Two seperate columns have to be populated for a seperate column to have a True or False Value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2264438#M44269</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;equals compare strings values&lt;/P&gt;&lt;P&gt;like name = "IS NOT NULL"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in case where you need check NULL it could be like:&lt;/P&gt;&lt;PRE&gt;row1.Name!=null &amp;amp;&amp;amp; row1.Organziation!=null ? "OR" : "IN"&lt;/PRE&gt;&lt;P&gt;or&lt;/P&gt;&lt;PRE&gt;row1.Name==null || row1.Organziation==null ? "IN" : "OR"&lt;/PRE&gt;</description>
      <pubDate>Sat, 16 Mar 2019 09:37:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2264438#M44269</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2019-03-16T09:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: String Method syntax in tMap Expression for Two seperate columns have to be populated for a seperate column to have a True or False Value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2264439#M44270</link>
      <description>&lt;P&gt;Hi Andrew,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; A slight Modification I could think is as below.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp;If both input values are null, output wll be null in this case.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;Relational.ISNULL(row1.Organziation) &amp;amp;&amp;amp; Relational.ISNULL(row1.Name)
                        ? null
                        :(!Relational.ISNULL(row1.Organziation) &amp;amp;&amp;amp; Relational.ISNULL(row1.Name)
                              ?"OR":"IN")&lt;/PRE&gt; 
&lt;P&gt;If you don't want to check above condition, you can take second part of the logic assuming only one of them will be populated at a time.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;!Relational.ISNULL(row1.Organziation) &amp;amp;&amp;amp; Relational.ISNULL(row1.Name) ?"OR":"IN"&lt;/PRE&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;</description>
      <pubDate>Mon, 18 Mar 2019 03:29:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2264439#M44270</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-18T03:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: String Method syntax in tMap Expression for Two seperate columns have to be populated for a seperate column to have a True or False Value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2264440#M44271</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000006eKOgAAM"&gt;@nthampi&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm getting "IN" value for all values in my output column. With trying both of your String Methods&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I even tested it with a tFixedFlowInput and tLogRow and still got the same Output. So if the Organization Input column is populated then the First Name field will be blank and not NULL. This may change the syntax around. It's the same the other way around if First Name is populated then the Organization Input Column will be Blank and not NULL.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;See SS below&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-inline" image-alt="tfixedflow.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3Vj.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147278iBE13E59E64A3081B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3Vj.png" alt="0683p000009M3Vj.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tMap.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3Vo.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129966i77ABADF86191E614/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3Vo.png" alt="0683p000009M3Vo.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="output.PNG" style="width: 381px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3TB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136891i08A4359297C954AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3TB.png" alt="0683p000009M3TB.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2019 15:20:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2264440#M44271</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-18T15:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: String Method syntax in tMap Expression for Two seperate columns have to be populated for a seperate column to have a True or False Value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2264441#M44272</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLGFAA4"&gt;@sm&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Empty string is different from null in Java. So why don't you check some of the old Talend posts which has handled this scenario.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;For example, the below one. You need to do an OR clause for empty string at same level as NULL.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCktuCAC" target="_blank"&gt;https://community.talend.com/t5/Design-and-Development/resolved-How-to-check-values-if-they-are-quot-null-quot-and/td-p/76520&lt;/A&gt;&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;</description>
      <pubDate>Mon, 18 Mar 2019 16:05:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2264441#M44272</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-18T16:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: String Method syntax in tMap Expression for Two seperate columns have to be populated for a seperate column to have a True or False Value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2264442#M44273</link>
      <description>&lt;P&gt;&lt;A href="https://community.talend.com/t5/user/viewprofilepage/user-id/18197"&gt;@sm&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Hi Andrew,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I hope you were able to resolve the issue from the above details. Could you please mark the topic as resolved since you have all the necessary details for your original query of the post? It will help other Talend members during their reference.&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;</description>
      <pubDate>Tue, 19 Mar 2019 04:35:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2264442#M44273</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-19T04:35:37Z</dc:date>
    </item>
  </channel>
</rss>

