<?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 multiple if conditions in tmap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238982#M26918</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I&amp;nbsp; have a requirement to transform the data from source to target. below is the requirement.&lt;/P&gt;
&lt;P&gt;In T_USER_DIM the column will have 3 possible values: value null when st_user.external_employee=1. value ‘y' when st_user.external_employee=0 and the st_user.external_id is found in st_us_persons. value 'n’ when st_user.external_employee=0 and the st_user.external_id is not found in st_us_persons.&lt;/P&gt;
&lt;P&gt;i have written expression like this in tmap, but it is not working.&lt;/P&gt;
&lt;P&gt;(ST_USER.external_employee=="1")?"Null" : ( ( ST_USER.external_employee == "0")?"Y":"N"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 03:40:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T03:40:33Z</dc:date>
    <item>
      <title>multiple if conditions in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238982#M26918</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I&amp;nbsp; have a requirement to transform the data from source to target. below is the requirement.&lt;/P&gt;
&lt;P&gt;In T_USER_DIM the column will have 3 possible values: value null when st_user.external_employee=1. value ‘y' when st_user.external_employee=0 and the st_user.external_id is found in st_us_persons. value 'n’ when st_user.external_employee=0 and the st_user.external_id is not found in st_us_persons.&lt;/P&gt;
&lt;P&gt;i have written expression like this in tmap, but it is not working.&lt;/P&gt;
&lt;P&gt;(ST_USER.external_employee=="1")?"Null" : ( ( ST_USER.external_employee == "0")?"Y":"N"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:40:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238982#M26918</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T03:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: multiple if conditions in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238983#M26919</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To check if st_user.external_id exists in st_us_person you will need to join on that table. You can then check if the external_id is null or not.&lt;/P&gt;&lt;P&gt;If the data type of the column st_user.external_employee is an integer, there is no need to surround 1 or 0 with quotes in the conditional statements. If it is a String, you have to use st_user.external_employee.equals("1") instead.&lt;/P&gt;&lt;P&gt;Try this and see if it works:&lt;/P&gt;&lt;PRE&gt;st_user.external_employee == 1 ? null:
st_user.external_employee == 0 &amp;amp;&amp;amp; st_us_persons.external_id != null ? "Y":
st_user.external_employee == 0 &amp;amp;&amp;amp; st_us_persons.external_id == null ? "N" : "X"&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Jan 2020 09:37:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238983#M26919</guid>
      <dc:creator>PLITDT</dc:creator>
      <dc:date>2020-01-06T09:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: multiple if conditions in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238984#M26920</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LQhOAAW"&gt;@plID&lt;/A&gt;,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you for your response,i have a join between these 2 tables and the data type&amp;nbsp;&lt;SPAN&gt;of the column st_user.external_employee&amp;nbsp;&lt;/SPAN&gt; is Varchar. i have one more question, do we need to enclose the statements in braces or simply adding the condition in the expression editor will work.&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screenshot2.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9Gj.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141657iE61EC23E665A11AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9Gj.jpg" alt="0683p000009M9Gj.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 13:36:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238984#M26920</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-06T13:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: multiple if conditions in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238985#M26921</link>
      <description>&lt;P&gt;Both works. Make sure that you are using correct braces in multiple if conditions.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 20:31:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238985#M26921</guid>
      <dc:creator>karthikj18</dc:creator>
      <dc:date>2020-01-06T20:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: multiple if conditions in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238986#M26922</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLkMAAW"&gt;@karthikj18&lt;/A&gt;&amp;nbsp;,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;expression is throwing error, below is the screenshot.&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="screenshot3.jpg" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9HS.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133542i97CF0B8359D2D9CC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9HS.jpg" alt="0683p000009M9HS.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 08:44:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238986#M26922</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-07T08:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: multiple if conditions in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238987#M26923</link>
      <description>&lt;P&gt;my source column is string datatype and my target is character, how to fix this&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 09:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238987#M26923</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-07T09:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: multiple if conditions in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238988#M26924</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;To check whether one String is equal to another you cannot use the operator "==". Instead you should use st_user.external_employee.equals("1"). To convert a String into a char you can use the mystring.charAt(0) method. Make sure to check if the variable is null or not first as you cannot call this method on a null value.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Taken together, try to create a variable in the tMap to do the multiple conditions and then convert to char in the expression field of the output mapping (see below).&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mult_conditions.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9HE.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/158117iF033509572D4FD07/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9HE.png" alt="0683p000009M9HE.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 10:08:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238988#M26924</guid>
      <dc:creator>PLITDT</dc:creator>
      <dc:date>2020-01-08T10:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: multiple if conditions in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238989#M26925</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LQhOAAW"&gt;@plID&lt;/A&gt;&amp;nbsp;,&lt;/P&gt; 
&lt;P&gt;Thank you for your response, i have made changes you mentioned, but still i'm getting this error&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screenshot4.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9J4.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155859iFDA6FABC3DAAC6A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9J4.jpg" alt="0683p000009M9J4.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screenshot5.jpg" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9J9.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142735i5B365A13CB8F546F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9J9.jpg" alt="0683p000009M9J9.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;anges like you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 09:50:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238989#M26925</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-09T09:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: multiple if conditions in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238990#M26926</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LOkUAAW"&gt;@keshav1991&lt;/A&gt;&amp;nbsp;, can you check the check box for key for us_person filed in output section of tMap?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 10:03:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238990#M26926</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2020-01-09T10:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: multiple if conditions in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238991#M26927</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt;&amp;nbsp;,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have done that as well but no luck.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screenshot6.JPG" style="width: 987px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9JE.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138514i35765D26A9295D32/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9JE.jpg" alt="0683p000009M9JE.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 10:20:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238991#M26927</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-09T10:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: multiple if conditions in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238992#M26928</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LOkUAAW"&gt;@keshav1991&lt;/A&gt;&amp;nbsp;, can you unchecked the key check box&amp;nbsp; in tmap of input field of external_id .&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 10:22:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238992#M26928</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2020-01-09T10:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: multiple if conditions in tmap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238993#M26929</link>
      <description>&lt;P&gt;no it is checked only...&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screenshot7.JPG" style="width: 807px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9JJ.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156016i4D9F74ACDA4CB65C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9JJ.jpg" alt="0683p000009M9JJ.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2020 10:34:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/multiple-if-conditions-in-tmap/m-p/2238993#M26929</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-09T10:34:33Z</dc:date>
    </item>
  </channel>
</rss>

