<?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 condition in script in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/condition-in-script/m-p/1219453#M6307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to do the condition :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have four fields:&lt;/P&gt;&lt;P&gt;car &lt;/P&gt;&lt;P&gt;date &lt;/P&gt;&lt;P&gt;parc&lt;/P&gt;&lt;P&gt;country&lt;/P&gt;&lt;P&gt;if i have one car in 2 differents parc in the same date i need to put these cars in flags&lt;/P&gt;&lt;P&gt;how to do it thanks&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Mar 2017 09:05:15 GMT</pubDate>
    <dc:creator>zied_ahmed1</dc:creator>
    <dc:date>2017-03-16T09:05:15Z</dc:date>
    <item>
      <title>condition in script</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/condition-in-script/m-p/1219453#M6307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to do the condition :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have four fields:&lt;/P&gt;&lt;P&gt;car &lt;/P&gt;&lt;P&gt;date &lt;/P&gt;&lt;P&gt;parc&lt;/P&gt;&lt;P&gt;country&lt;/P&gt;&lt;P&gt;if i have one car in 2 differents parc in the same date i need to put these cars in flags&lt;/P&gt;&lt;P&gt;how to do it thanks&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Mar 2017 09:05:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/condition-in-script/m-p/1219453#M6307</guid>
      <dc:creator>zied_ahmed1</dc:creator>
      <dc:date>2017-03-16T09:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: condition in script</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/condition-in-script/m-p/1219454#M6308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Map_Count:&lt;/P&gt;&lt;P&gt;Mapping LOAD &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;car&lt;/SPAN&gt;&amp;amp;'-'&amp;amp;date as Key,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(parc) as Count&lt;/P&gt;&lt;P&gt;FROM File&lt;/P&gt;&lt;P&gt;Group By &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;car, &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;date;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Main_Table:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Count&amp;gt;1,1,0) as Flag;&lt;/P&gt;&lt;P&gt;LOAD car,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parc,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Applymap('&lt;SPAN style="font-size: 13.3333px;"&gt;ap_Count',&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;car&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;amp;'-'&amp;amp;date&lt;/SPAN&gt;&lt;/SPAN&gt;) as Count,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; country&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM File;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Pls let us know if your requirement is different.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Mar 2017 10:58:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/condition-in-script/m-p/1219454#M6308</guid>
      <dc:creator>arockiyaselvana</dc:creator>
      <dc:date>2017-03-16T10:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: condition in script</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/condition-in-script/m-p/1219455#M6309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zied, &lt;/P&gt;&lt;P&gt;You can try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD Car, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Parc, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Country&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;Your data source&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count1:&lt;/P&gt;&lt;P&gt;LOAD Car,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Count(DISTINCT Parc)&amp;gt;1,1,0) as Flag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident Temp&amp;nbsp; group by Date,Car;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your expression, you can write if sum(Flag)&amp;gt;0, 1,0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also, if you share the QVW with us, It would give a better clarity.&lt;/P&gt;&lt;P&gt;PFB: screenshots for better clarity&lt;/P&gt;&lt;P&gt;&lt;IMG alt="data.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/156498_data.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="output.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/156497_output.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Mar 2017 11:11:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/condition-in-script/m-p/1219455#M6309</guid>
      <dc:creator>chhavi376</dc:creator>
      <dc:date>2017-03-16T11:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: condition in script</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/condition-in-script/m-p/1219456#M6310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can be like this if I understood the task correctly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD*Inline&lt;/P&gt;&lt;P&gt;[date, car, parc, country&lt;/P&gt;&lt;P&gt;01.01.2017, car1, parc1, country1&lt;/P&gt;&lt;P&gt;02.01.2017, car2, parc2, country2&lt;/P&gt;&lt;P&gt;03.01.2017, car3, parc3, country3&lt;/P&gt;&lt;P&gt;03.01.2017, car3, parc2, country3&lt;/P&gt;&lt;P&gt;04.01.2017, car1, parc1, country1&lt;/P&gt;&lt;P&gt;04.01.2017, car1, parc6, country1&lt;/P&gt;&lt;P&gt;04.01.2017, car1, parc2, country1];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;date,&lt;/P&gt;&lt;P&gt;car,&lt;/P&gt;&lt;P&gt;If(Count(parc)&amp;gt;1, 1, 0) as Flag //&lt;/P&gt;&lt;P&gt;Resident Table1&lt;/P&gt;&lt;P&gt;Group By date,car;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="156499" alt="5.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/156499_5.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Mar 2017 11:38:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/condition-in-script/m-p/1219456#M6310</guid>
      <dc:creator>ahaahaaha</dc:creator>
      <dc:date>2017-03-16T11:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: condition in script</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/condition-in-script/m-p/1219457#M6311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for everybody i find another solution to resolve it &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Mar 2017 14:07:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/condition-in-script/m-p/1219457#M6311</guid>
      <dc:creator>zied_ahmed1</dc:creator>
      <dc:date>2017-03-16T14:07:54Z</dc:date>
    </item>
  </channel>
</rss>

