<?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: Ternaire condition in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Ternaire-condition/m-p/2317129#M87608</link>
    <description>Hi, &lt;BR /&gt;I think the Ternaire condition in tMap cannot achieve that.&lt;BR /&gt;But you create a routine to do it &lt;A href="https://help.talend.com/search/all?query=Managing+routines&amp;amp;content-lang=en" target="_blank" rel="nofollow noopener noreferrer"&gt;Managing routines&lt;/A&gt;&lt;BR /&gt;for example:&lt;BR /&gt;&lt;PRE&gt;condition? MyRoutine.methodIfTrue():MyRoutine.methodIfFalse()&lt;/PRE&gt;&lt;BR /&gt;and you can define a variable in the routine that is accessable from the same job or other job&lt;BR /&gt; &lt;A href="https://help.talend.com/pages/viewpage.action?pageId=5671107" target="_blank" rel="nofollow noopener noreferrer"&gt;Can I define a variable that is accessible from multiple Jobs?&lt;/A&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
    <pubDate>Thu, 11 Jul 2013 09:01:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-07-11T09:01:37Z</dc:date>
    <item>
      <title>Ternaire condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Ternaire-condition/m-p/2317124#M87603</link>
      <description>Hello,&lt;BR /&gt;Is it possible to have, in a tMap, a ternaire condition as :&lt;BR /&gt;toto=1?Var.cptY+1 and "YES":Var.cptN+1&lt;BR /&gt;            -----------------------&lt;BR /&gt;ie two actions il a ternaire condition.&lt;BR /&gt;Thank-you for answers&lt;BR /&gt;Quartz</description>
      <pubDate>Thu, 11 Jul 2013 07:31:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Ternaire-condition/m-p/2317124#M87603</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-07-11T07:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Ternaire condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Ternaire-condition/m-p/2317125#M87604</link>
      <description>Hi, &lt;BR /&gt;In the tmap, the formula must return a value that will be assigned to the output column of your schema. Then, you can't use if/then/else statements in it.&lt;BR /&gt;Instead, use conditional operator "?" like this :&lt;BR /&gt;(condition) ? then_value : else_value&lt;BR /&gt;That is the ternaire condition&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Thu, 11 Jul 2013 07:49:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Ternaire-condition/m-p/2317125#M87604</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-11T07:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Ternaire condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Ternaire-condition/m-p/2317126#M87605</link>
      <description>Hello,&lt;BR /&gt;Yes, but&lt;BR /&gt;(condition) ? then_value : else_value&lt;BR /&gt;in the then_value, (or in the else_value or the both), is it possible to have two actions, one who assign a value in the output column, and another as cpt+1 to display it after ?&lt;BR /&gt;Best regards,&lt;BR /&gt;Quartz</description>
      <pubDate>Thu, 11 Jul 2013 08:05:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Ternaire-condition/m-p/2317126#M87605</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-07-11T08:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Ternaire condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Ternaire-condition/m-p/2317127#M87606</link>
      <description>Hi, &lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;in the then_value, (or in the else_value or the both), is it possible to have two actions, one who assign a value in the output column, and another as cpt+1 to display it after ?&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;Could you please elaborate your case with an example with input and expected output values? &lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Thu, 11 Jul 2013 08:18:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Ternaire-condition/m-p/2317127#M87606</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-11T08:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Ternaire condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Ternaire-condition/m-p/2317128#M87607</link>
      <description>Sabrina, 
&lt;BR /&gt;In a tMap, I have this expression to assign a value in output column : 
&lt;BR /&gt;!Relational.ISNULL(File_Ei.NAME)?File_Ei.Name:"NoName" 
&lt;BR /&gt;and (in more) I want count how many input null and no null I have. 
&lt;BR /&gt;Can I do : 
&lt;BR /&gt;!Relational.ISNULL(File_Ei.NAME)?File_Ei.Name Var.cptnoNull+1:"NoName" Var.cptNull+1 
&lt;BR /&gt;for displaying the two counters after, in an another steep. 
&lt;BR /&gt;More generally, is it possible to have more than one action in then_value or/and else_value in a ternaire condition ? 
&lt;BR /&gt;Thank you for answer ... 
&lt;BR /&gt;Quartz</description>
      <pubDate>Thu, 11 Jul 2013 08:41:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Ternaire-condition/m-p/2317128#M87607</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-07-11T08:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Ternaire condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Ternaire-condition/m-p/2317129#M87608</link>
      <description>Hi, &lt;BR /&gt;I think the Ternaire condition in tMap cannot achieve that.&lt;BR /&gt;But you create a routine to do it &lt;A href="https://help.talend.com/search/all?query=Managing+routines&amp;amp;content-lang=en" target="_blank" rel="nofollow noopener noreferrer"&gt;Managing routines&lt;/A&gt;&lt;BR /&gt;for example:&lt;BR /&gt;&lt;PRE&gt;condition? MyRoutine.methodIfTrue():MyRoutine.methodIfFalse()&lt;/PRE&gt;&lt;BR /&gt;and you can define a variable in the routine that is accessable from the same job or other job&lt;BR /&gt; &lt;A href="https://help.talend.com/pages/viewpage.action?pageId=5671107" target="_blank" rel="nofollow noopener noreferrer"&gt;Can I define a variable that is accessible from multiple Jobs?&lt;/A&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Thu, 11 Jul 2013 09:01:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Ternaire-condition/m-p/2317129#M87608</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-11T09:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Ternaire condition</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Ternaire-condition/m-p/2317130#M87609</link>
      <description>Thank you, Sabrina&lt;BR /&gt;Qartz92</description>
      <pubDate>Thu, 11 Jul 2013 09:15:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Ternaire-condition/m-p/2317130#M87609</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2013-07-11T09:15:11Z</dc:date>
    </item>
  </channel>
</rss>

