<?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 Expression builder in TMAP in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Expression-builder-in-TMAP/m-p/2344533#M112175</link>
    <description>&lt;P&gt;Hi! I need some examples of using the expression builder in TMAPs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; (either True or false  or 0 or 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want is to be Active/Inactive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for every True(1) it should change it to Active&lt;/P&gt;&lt;P&gt;else False(0) should be Inactive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried this but it doesn't work for the second expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row1.active.equals(&lt;/P&gt;&lt;P&gt;"1"&lt;/P&gt;)?row1.active:&lt;P&gt;"Active"&lt;/P&gt;&amp;nbsp;&lt;P&gt;row1.active.equals(&lt;/P&gt;&lt;P&gt;"0"&lt;/P&gt;)?row1.active:&lt;P&gt;"Inactive"&lt;/P&gt;&amp;nbsp;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;StringHandling.EREPLACE(row1.active,&lt;/P&gt;&lt;P&gt;"1"&lt;/P&gt;,&lt;P&gt;"Active"&lt;/P&gt;);&amp;nbsp;&lt;P&gt;StringHandling.EREPLACE(row1.active,&lt;/P&gt;&lt;P&gt;"0"&lt;/P&gt;,&lt;P&gt;"Inactive"&lt;/P&gt;) ;&amp;nbsp;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what are all the ways to handle this situation?&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 22:09:51 GMT</pubDate>
    <dc:creator>JayZ1</dc:creator>
    <dc:date>2024-11-15T22:09:51Z</dc:date>
    <item>
      <title>Expression builder in TMAP</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Expression-builder-in-TMAP/m-p/2344533#M112175</link>
      <description>&lt;P&gt;Hi! I need some examples of using the expression builder in TMAPs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;input:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; (either True or false  or 0 or 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want is to be Active/Inactive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for every True(1) it should change it to Active&lt;/P&gt;&lt;P&gt;else False(0) should be Inactive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried this but it doesn't work for the second expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row1.active.equals(&lt;/P&gt;&lt;P&gt;"1"&lt;/P&gt;)?row1.active:&lt;P&gt;"Active"&lt;/P&gt;&amp;nbsp;&lt;P&gt;row1.active.equals(&lt;/P&gt;&lt;P&gt;"0"&lt;/P&gt;)?row1.active:&lt;P&gt;"Inactive"&lt;/P&gt;&amp;nbsp;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;StringHandling.EREPLACE(row1.active,&lt;/P&gt;&lt;P&gt;"1"&lt;/P&gt;,&lt;P&gt;"Active"&lt;/P&gt;);&amp;nbsp;&lt;P&gt;StringHandling.EREPLACE(row1.active,&lt;/P&gt;&lt;P&gt;"0"&lt;/P&gt;,&lt;P&gt;"Inactive"&lt;/P&gt;) ;&amp;nbsp;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what are all the ways to handle this situation?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:09:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Expression-builder-in-TMAP/m-p/2344533#M112175</guid>
      <dc:creator>JayZ1</dc:creator>
      <dc:date>2024-11-15T22:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Expression builder in TMAP</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Expression-builder-in-TMAP/m-p/2344534#M112176</link>
      <description>&lt;P&gt;OK. First of all you need to know the type of your "row1.active" data.  If it is Boolean, then you will need something like this....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;row1.active ? "Active" : "Inactive"&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is essentially saying, if row1.active is true then output "Active" otherwise output "Inactive". Because you are dealing with a boolean, you don't need to do anything but the above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If row1.active is a String, you will need to do something like this....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;row1.active.equals("1") ? "Active" : "Inactive"&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This can also be used for "True"  as well. You must make sure that the String values are exactly matched. So look out for how your values arrive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If row1.active is an int, you will need to do something like this....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;row1.active==1 ? "Active" : "Inactive"&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above are examples of in-line IF conditions. You can find more about these on many Java sites.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 16:18:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Expression-builder-in-TMAP/m-p/2344534#M112176</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-27T16:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Expression builder in TMAP</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Expression-builder-in-TMAP/m-p/2344535#M112177</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for reaching out!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please view this tMap expression syntax page where it has 9 examples: https://help.talend.com/r/en-US/7.3/tmap/tmap-expression-syntax&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also we have this Writing code using the Expression Builder example: https://help.talend.com/r/en-US/7.3/studio-user-guide/writing-code-using-expression-builder&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 16:19:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Expression-builder-in-TMAP/m-p/2344535#M112177</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-27T16:19:58Z</dc:date>
    </item>
  </channel>
</rss>

