<?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: How do you apply selection criteria in a Macro ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-you-apply-selection-criteria-in-a-Macro/m-p/436429#M1162457</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;ActiveDocument.Fields("Month").Select("Sep")&lt;/STRONG&gt; will select value 'Sep' in field Month.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ActiveDocument.Fields("Month").Clear &lt;/STRONG&gt;will clear the selection in field Month.&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Nov 2012 12:20:30 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2012-11-15T12:20:30Z</dc:date>
    <item>
      <title>How do you apply selection criteria in a Macro ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-apply-selection-criteria-in-a-Macro/m-p/436428#M1162456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am currently exporting a whole table CH02 using a macro.I need to set the selection criteria in a macro so that I can export only one particular name from the CH02 table. The code I have currently is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial; font-size: x-small;"&gt;sub ExtractData&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; Const ForReading = 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; Const ForWriting = 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR style="color: #000000; font-family: arial; font-size: x-small;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; vExFolder = ActiveDocument.Variables("&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: arial; font-size: x-small;"&gt;vFolderName").GetContent.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: arial; font-size: x-small;"&gt;String &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR style="color: #000000; font-family: arial; font-size: x-small;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; vFullFileName = vExFolder &amp;amp; "Census Data" &amp;amp; ".xls"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR style="color: #000000; font-family: arial; font-size: x-small;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; set sObject = ActiveDocument.GetSheetObject(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: arial; font-size: x-small;"&gt;"CH02")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR style="color: #000000; font-family: arial; font-size: x-small;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial; font-size: x-small;"&gt;&amp;nbsp;&amp;nbsp; sObject.Export vFullFileName, ""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR style="color: #000000; font-family: arial; font-size: x-small;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: arial; font-size: x-small;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The selection criteria has to be done within the macro rather than using the Set Variable Action asI would also like to clear that field afterwards so that I could export the details of another name to a different destination within the same macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Neil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 12:15:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-apply-selection-criteria-in-a-Macro/m-p/436428#M1162456</guid>
      <dc:creator>ngulliver</dc:creator>
      <dc:date>2012-11-15T12:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do you apply selection criteria in a Macro ?</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-you-apply-selection-criteria-in-a-Macro/m-p/436429#M1162457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;ActiveDocument.Fields("Month").Select("Sep")&lt;/STRONG&gt; will select value 'Sep' in field Month.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ActiveDocument.Fields("Month").Clear &lt;/STRONG&gt;will clear the selection in field Month.&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 12:20:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-you-apply-selection-criteria-in-a-Macro/m-p/436429#M1162457</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-11-15T12:20:30Z</dc:date>
    </item>
  </channel>
</rss>

