<?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 How to do an IN operation using tMap expression in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-do-an-IN-operation-using-tMap-expression/m-p/2239036#M26960</link>
    <description>&lt;P&gt;I want to do an IN condition in tMap expression i.e. check if the value of a column falls in a list of values.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;e.g. my input row contains a column STATE and i want to allow data belonging to only certain states, let's say CA, NY and NC, to flow downstream as ouput from tMap.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I know i can do something like this in tMap expression filter&lt;/P&gt; 
&lt;P&gt;row1.STATE =="CA" ||&amp;nbsp;row1.STATE =="NY" ||&amp;nbsp;row1.STATE =="NC" .&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I actually do not want to hardcode my list in the expression, but,&amp;nbsp; instead pass them as a context variable. Also, my list of values is not constant; it can go up or down.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So, i was wondering if there is something like&lt;/P&gt; 
&lt;P&gt;row1.STATE in (context.desired_states) that i can do where i can set the value of context variable desired_states as "NY","CA",'WA" . This gives flexibility to change the list by just updating the context variable value instead of chaging the code everytime i want to add or remove a value from the list.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 02:30:38 GMT</pubDate>
    <dc:creator>TY3</dc:creator>
    <dc:date>2024-11-16T02:30:38Z</dc:date>
    <item>
      <title>How to do an IN operation using tMap expression</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-do-an-IN-operation-using-tMap-expression/m-p/2239036#M26960</link>
      <description>&lt;P&gt;I want to do an IN condition in tMap expression i.e. check if the value of a column falls in a list of values.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;e.g. my input row contains a column STATE and i want to allow data belonging to only certain states, let's say CA, NY and NC, to flow downstream as ouput from tMap.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I know i can do something like this in tMap expression filter&lt;/P&gt; 
&lt;P&gt;row1.STATE =="CA" ||&amp;nbsp;row1.STATE =="NY" ||&amp;nbsp;row1.STATE =="NC" .&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I actually do not want to hardcode my list in the expression, but,&amp;nbsp; instead pass them as a context variable. Also, my list of values is not constant; it can go up or down.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So, i was wondering if there is something like&lt;/P&gt; 
&lt;P&gt;row1.STATE in (context.desired_states) that i can do where i can set the value of context variable desired_states as "NY","CA",'WA" . This gives flexibility to change the list by just updating the context variable value instead of chaging the code everytime i want to add or remove a value from the list.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:30:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-do-an-IN-operation-using-tMap-expression/m-p/2239036#M26960</guid>
      <dc:creator>TY3</dc:creator>
      <dc:date>2024-11-16T02:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to do an IN operation using tMap expression</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-do-an-IN-operation-using-tMap-expression/m-p/2239037#M26961</link>
      <description>As soon as you have a context variable with valid states such as "NY","CA",'WA" you can use the following expression:
&lt;BR /&gt;context.desired_states.contains("\"" + row1.STATE + "\"")</description>
      <pubDate>Fri, 08 May 2020 07:02:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-do-an-IN-operation-using-tMap-expression/m-p/2239037#M26961</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2020-05-08T07:02:16Z</dc:date>
    </item>
  </channel>
</rss>

