<?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 selectMatch() multiple fields in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/selectMatch-multiple-fields/m-p/1211367#M6213</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a mashup which allows the user to filter the data by dates using a bunch of custom selection buttons&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; YTD, QTD, MTD etc &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in the load script I have the following flags defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(DayNumberOfYear(DATE) &amp;lt;= DayNumberOfYear(Today()), 1, 0 ) as IsInYTD&lt;/P&gt;&lt;P&gt;If(DayNumberOfQuarter(CREATED_DATE) &amp;lt;= DayNumberOfQuarter(Today()), 1, 0) as IsInQTD,&lt;/P&gt;&lt;P&gt;(Year(DATE)-Year(Today())) as YearSerial&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see, these flags do not indicate YTD &amp;amp; QTD for the current year but for all the years. I need to keep it this way to help with some set analysis&amp;nbsp; So to get YTD &amp;amp; QTD for the current year, I have to include YearSerial =0 in the selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering if there is an option to apply selections on multiple fields using the Field API;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some other solutions I could think of is to invoke selectMatch() for the two fields or introduce current year YTD &amp;amp; QTD flags&amp;nbsp; &lt;/P&gt;&lt;P&gt;if(InYearToDate(Date, Today(), 0), 1, 0) AS [IsInCurrentYTD],&lt;/P&gt;&lt;P&gt;if(InQuarterToDate(Date, Today(), 0), 1, 0) AS [IsInCurrentQTD]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a better solution to achieve the above date filtering behavior in the mashup?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Oct 2016 01:22:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-10-24T01:22:30Z</dc:date>
    <item>
      <title>selectMatch() multiple fields</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/selectMatch-multiple-fields/m-p/1211367#M6213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a mashup which allows the user to filter the data by dates using a bunch of custom selection buttons&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; YTD, QTD, MTD etc &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in the load script I have the following flags defined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(DayNumberOfYear(DATE) &amp;lt;= DayNumberOfYear(Today()), 1, 0 ) as IsInYTD&lt;/P&gt;&lt;P&gt;If(DayNumberOfQuarter(CREATED_DATE) &amp;lt;= DayNumberOfQuarter(Today()), 1, 0) as IsInQTD,&lt;/P&gt;&lt;P&gt;(Year(DATE)-Year(Today())) as YearSerial&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see, these flags do not indicate YTD &amp;amp; QTD for the current year but for all the years. I need to keep it this way to help with some set analysis&amp;nbsp; So to get YTD &amp;amp; QTD for the current year, I have to include YearSerial =0 in the selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering if there is an option to apply selections on multiple fields using the Field API;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some other solutions I could think of is to invoke selectMatch() for the two fields or introduce current year YTD &amp;amp; QTD flags&amp;nbsp; &lt;/P&gt;&lt;P&gt;if(InYearToDate(Date, Today(), 0), 1, 0) AS [IsInCurrentYTD],&lt;/P&gt;&lt;P&gt;if(InQuarterToDate(Date, Today(), 0), 1, 0) AS [IsInCurrentQTD]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a better solution to achieve the above date filtering behavior in the mashup?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 01:22:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/selectMatch-multiple-fields/m-p/1211367#M6213</guid>
      <dc:creator />
      <dc:date>2016-10-24T01:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: selectMatch() multiple fields</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/selectMatch-multiple-fields/m-p/1211368#M6214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;selectmatch or selectvalue functions in API would help in Mashup filtering.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 06:38:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/selectMatch-multiple-fields/m-p/1211368#M6214</guid>
      <dc:creator>lakshmikandh</dc:creator>
      <dc:date>2016-10-24T06:38:53Z</dc:date>
    </item>
  </channel>
</rss>

