<?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 values have to have two distinct values 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/2268740#M47208</link>
    <description>&lt;P&gt;&lt;SPAN&gt;"Do Not Mail".equalsIgnoreCase(row1.mailpref1) || &amp;nbsp;"Do Not Mail".equalsIgnoreCase(rmailpref2) || "Do Not Mail".equalsIgnoreCase(mailpref3)? "True" : "False"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;note : True" and true are not same. 1st one is string another is boolean.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Mar 2019 19:55:03 GMT</pubDate>
    <dc:creator>akumar2301</dc:creator>
    <dc:date>2019-03-11T19:55:03Z</dc:date>
    <item>
      <title>String Method syntax in tMap Expression for Two seperate columns values have to have two distinct values 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/2268736#M47204</link>
      <description>&lt;P&gt;I am wondering how I can nest a if then else statement based off of two separate values in the two different columns So a different column would have a True or False Value.&lt;/P&gt; 
&lt;P&gt;This is a typical If then else string method in java&lt;/P&gt; 
&lt;P&gt;column1.equals("Home Phone")? "True":"False"&lt;/P&gt; 
&lt;P&gt;If I wanted to add another column with a distinct value would the syntax be&lt;/P&gt; 
&lt;P&gt;column2.equals("Fax") &amp;amp;&amp;amp;&amp;nbsp;column1.equals("Home Phone")? "True":"False"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm in early development of a job and can't run the job yet, so just making sure the syntax is right from the start.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Let me know,&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>Fri, 15 Feb 2019 15:38:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2268736#M47204</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-15T15:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: String Method syntax in tMap Expression for Two seperate columns values have to have two distinct values 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/2268737#M47205</link>
      <description>You are near to the solution but take care of null values. The following syntax is better:
&lt;BR /&gt;"fax".equalsIgnoreCase(row1.column2)
&lt;BR /&gt;If row1.column2 is null the expression evaluates to false but doesn't generates a null pointer exception.</description>
      <pubDate>Fri, 15 Feb 2019 16:06:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2268737#M47205</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-02-15T16:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: String Method syntax in tMap Expression for Two seperate columns values have to have two distinct values 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/2268738#M47206</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLGFAA4"&gt;@sm&lt;/A&gt;&amp;nbsp;In response to your question by PM, the complete syntax should looks like this:&lt;/P&gt; 
&lt;PRE&gt;"fax".equalsIgnoreCase(row1.column2) &amp;amp;&amp;amp; "home phone".equalsIgnoreCase(row1.column1) ? true : false&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Feb 2019 22:44:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2268738#M47206</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-02-26T22:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: String Method syntax in tMap Expression for Two seperate columns values have to have two distinct values 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/2268739#M47207</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This String Expression that's similar to yours only returns False Values currently.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;"Do Not Mail".equalsIgnoreCase(row1.mailpref1)&amp;amp;&amp;amp; "Do Not Mail".equalsIgnoreCase(rmailpref2)&amp;amp;&amp;amp; "Do Not Mail".equalsIgnoreCase(mailpref3)? "True" : "False"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If any of these rows contain the "Do Not Mail" value set the value as True else "False"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So not all three values in three seperate columns contains "Do Not Mail" value just one column has to contain "Do Not Mail" value&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Maybe you were under the impression that I wanted every column in the string method to have the value "Do Not Mail" not just one.&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; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 19:49:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2268739#M47207</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-11T19:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: String Method syntax in tMap Expression for Two seperate columns values have to have two distinct values 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/2268740#M47208</link>
      <description>&lt;P&gt;&lt;SPAN&gt;"Do Not Mail".equalsIgnoreCase(row1.mailpref1) || &amp;nbsp;"Do Not Mail".equalsIgnoreCase(rmailpref2) || "Do Not Mail".equalsIgnoreCase(mailpref3)? "True" : "False"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;note : True" and true are not same. 1st one is string another is boolean.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 19:55:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2268740#M47208</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-03-11T19:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: String Method syntax in tMap Expression for Two seperate columns values have to have two distinct values 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/2268741#M47209</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LP7CAAW"&gt;@uganesh&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If I had some dirty data in the column like addresses how would I add the additional logic to change every value that is not "Yes" to "No"&lt;/P&gt; 
&lt;P&gt;This is for a different column in the same input data I have a do not contact column.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;row1.donotcontact.equals("Yes")? "True": "False"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This returns other data besides "True and "False" including blanks&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 20:30:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2268741#M47209</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-11T20:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: String Method syntax in tMap Expression for Two seperate columns values have to have two distinct values 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/2268742#M47210</link>
      <description>&lt;P&gt;I meant to change the value to "FALSE" not "No" to clarify&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 20:34:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2268742#M47210</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-11T20:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: String Method syntax in tMap Expression for Two seperate columns values have to have two distinct values 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/2268743#M47211</link>
      <description>Your expression looks correct.
&lt;BR /&gt;Donotcontain equals to yes , then true else false.
&lt;BR /&gt;
&lt;BR /&gt;To avoid null issue try like this
&lt;BR /&gt;“Yes”.equals(row1.donotcontact)? "True": "False"
&lt;BR /&gt;
&lt;BR /&gt;This should not ideally give othervalue than True and False.
&lt;BR /&gt;
&lt;BR /&gt;Can you give some example when you getting blanks or other values ?
&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Mar 2019 20:42:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/String-Method-syntax-in-tMap-Expression-for-Two-seperate-columns/m-p/2268743#M47211</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-03-11T20:42:57Z</dc:date>
    </item>
  </channel>
</rss>

