<?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: tmap variable field not allowing simple expression in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tmap-variable-field-not-allowing-simple-expression/m-p/2340547#M108569</link>
    <description>What exactly do you want your variable to hold? If you just put row1.ActionCode == "UP" in it, it will always return a Boolean value and for other reasons it will&amp;nbsp;most likely always be "false". If you have configured your variable as a string, the mentioned error will occur. By the way: the expression will always return false as - simply speaking - Java does not compare the values but whether it is the same object. As row1.ActionCode is never the same object as the (new) string "UP", it will always return false. If you want to compare values, you would have to use the following expression: "UP".equals(row1.ActionCode).</description>
    <pubDate>Tue, 13 Sep 2016 08:27:36 GMT</pubDate>
    <dc:creator>JR1</dc:creator>
    <dc:date>2016-09-13T08:27:36Z</dc:date>
    <item>
      <title>tmap variable field not allowing simple expression</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-variable-field-not-allowing-simple-expression/m-p/2340545#M108567</link>
      <description>&lt;P&gt;I have a field called row1.ActionCode.&lt;BR /&gt;I try to add a variable: row1.ActionCode == "UP"&lt;BR /&gt;It gives me compile error. &amp;nbsp;"cannot convert from boolean to string". &amp;nbsp;ActionCode is a string - the code completion helper told me so.&amp;nbsp;&lt;BR /&gt;When I typed in row1. it gave me an option to pick ActionCode so I know it's there.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 23:02:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-variable-field-not-allowing-simple-expression/m-p/2340545#M108567</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-12T23:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: tmap variable field not allowing simple expression</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-variable-field-not-allowing-simple-expression/m-p/2340546#M108568</link>
      <description>Hi&amp;nbsp; 
&lt;BR /&gt;Where do you write this expression? Can you please upload a screenshot of tMap? 
&lt;BR /&gt; 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Tue, 13 Sep 2016 04:00:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-variable-field-not-allowing-simple-expression/m-p/2340546#M108568</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-09-13T04:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: tmap variable field not allowing simple expression</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-variable-field-not-allowing-simple-expression/m-p/2340547#M108569</link>
      <description>What exactly do you want your variable to hold? If you just put row1.ActionCode == "UP" in it, it will always return a Boolean value and for other reasons it will&amp;nbsp;most likely always be "false". If you have configured your variable as a string, the mentioned error will occur. By the way: the expression will always return false as - simply speaking - Java does not compare the values but whether it is the same object. As row1.ActionCode is never the same object as the (new) string "UP", it will always return false. If you want to compare values, you would have to use the following expression: "UP".equals(row1.ActionCode).</description>
      <pubDate>Tue, 13 Sep 2016 08:27:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-variable-field-not-allowing-simple-expression/m-p/2340547#M108569</guid>
      <dc:creator>JR1</dc:creator>
      <dc:date>2016-09-13T08:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: tmap variable field not allowing simple expression</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tmap-variable-field-not-allowing-simple-expression/m-p/2340548#M108570</link>
      <description>As others have pointed you, you're using a test as an output. &amp;nbsp;If you want a specific output when ActionCode is "UP", you'll probably want something like:&lt;BR /&gt;"UP".equals(row1.ActionCode) ? "True" : "False"&lt;BR /&gt;(replace "True" and "False" with whatever you want to appear for those particular cases)</description>
      <pubDate>Tue, 13 Sep 2016 16:57:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tmap-variable-field-not-allowing-simple-expression/m-p/2340548#M108570</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2016-09-13T16:57:06Z</dc:date>
    </item>
  </channel>
</rss>

