<?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: Check for value in an array in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tMAP-Check-for-value-in-an-array/m-p/2360492#M125063</link>
    <description>&lt;P&gt;I think a conditional operator is ideal for your scenario.&lt;/P&gt; 
&lt;P&gt;You should be able to include something like this in your tmap expression assuming your column datatype is string,&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;row1.plans.toLowerCase().contains("stay at home")?"X":""&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="plans.PNG" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrAk.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155144i3E0452A0C8AF1EEC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrAk.png" alt="0683p000009LrAk.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Oct 2017 11:15:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-10-04T11:15:37Z</dc:date>
    <item>
      <title>tMAP: Check for value in an array</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMAP-Check-for-value-in-an-array/m-p/2360491#M125062</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My datasoruce is a questionnaire and we using a rest API to get the data (json). Now I have a problem with Checkbox questions. For example:&lt;/P&gt; 
&lt;P&gt;The data source contains a questions with 5 answers. Each answer has it's own checkbox.&amp;nbsp;If someone choose 3 of them, I get an value array with 3 of 5:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;"What are your plans for today?.": [&lt;BR /&gt;"Stay at home",&lt;BR /&gt;"Working ",&lt;BR /&gt;"Eat, sleep, repeat"&lt;BR /&gt;],&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So in tMap the field of the input table&amp;nbsp;is the question "&amp;nbsp;&lt;SPAN&gt;What are your plans for today?" and the values are&amp;nbsp;"Stay at home","Working&amp;nbsp;","Eat, sleep, repeat". But the Output table should have a field for each answer possiblity :&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Field one: Stayathome&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Field two: Working&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;now when I have the case that someone choosed checkbox "Stay at home", I want a "X" in my Output field Stayathome. I've tried to solve that issue with a if expression. But it doesn't work. So Talend has the check, if the array inlcudes "Stay at home" (i.e.). If true "X", else "&amp;nbsp; ".&amp;nbsp; Does anyone have a solution approach?&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;thanks,&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Christian&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 11:35:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMAP-Check-for-value-in-an-array/m-p/2360491#M125062</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-28T11:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: tMAP: Check for value in an array</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMAP-Check-for-value-in-an-array/m-p/2360492#M125063</link>
      <description>&lt;P&gt;I think a conditional operator is ideal for your scenario.&lt;/P&gt; 
&lt;P&gt;You should be able to include something like this in your tmap expression assuming your column datatype is string,&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;row1.plans.toLowerCase().contains("stay at home")?"X":""&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="plans.PNG" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LrAk.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155144i3E0452A0C8AF1EEC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LrAk.png" alt="0683p000009LrAk.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 11:15:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMAP-Check-for-value-in-an-array/m-p/2360492#M125063</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-04T11:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: tMAP: Check for value in an array</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMAP-Check-for-value-in-an-array/m-p/2360493#M125064</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've already got it. But you're right.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Christian&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 11:55:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMAP-Check-for-value-in-an-array/m-p/2360493#M125064</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-04T11:55:07Z</dc:date>
    </item>
  </channel>
</rss>

