<?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 macro to select value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/macro-to-select-value/m-p/292746#M108634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which Qlikview version are you using?&lt;/P&gt;&lt;P&gt;With version 10 , you can use the actions instead of a macro to do it.&lt;/P&gt;&lt;P&gt;It works better and faster than a macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Sep 2011 01:50:49 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-09-28T01:50:49Z</dc:date>
    <item>
      <title>macro to select value</title>
      <link>https://community.qlik.com/t5/QlikView/macro-to-select-value/m-p/292745#M108633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I load my data I create max year, month &amp;amp; day fields and the qvw has a calendar where the user can select date ranges.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a button that puts a selection on the year, month and day objects to select the data for the previous day, as that's the most popular selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The button works great on my local PC but on the server stops working after data is reloaded - it selects the max year &amp;amp; month but can't do the day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the server if the QlikView process is stopped and restarted the button works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code for the macro is simple:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;BR /&gt;set thisyr = activedocument.Variables("vRepYear")&lt;BR /&gt;set thismth = activedocument.Variables("vRepMonth")&lt;BR /&gt;set thisday = activedocument.Variables("vRepDay")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ActiveDocument.Fields("Report Year").Select thisyr.GetContent.String&lt;BR /&gt;ActiveDocument.Fields("Report Month").Select thismth.GetContent.String&lt;BR /&gt;ActiveDocument.Fields("Report Day").Select thisday.GetContent.String&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've used variables, and assign the MaxYear, MaxMonth &amp;amp; MaxDay values to them, then use the variable values in the macro to make the selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a better way of doing this that might get round the problem where the macro doesn't work on the server?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 09:24:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro-to-select-value/m-p/292745#M108633</guid>
      <dc:creator />
      <dc:date>2011-09-27T09:24:05Z</dc:date>
    </item>
    <item>
      <title>macro to select value</title>
      <link>https://community.qlik.com/t5/QlikView/macro-to-select-value/m-p/292746#M108634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which Qlikview version are you using?&lt;/P&gt;&lt;P&gt;With version 10 , you can use the actions instead of a macro to do it.&lt;/P&gt;&lt;P&gt;It works better and faster than a macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philippe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 01:50:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro-to-select-value/m-p/292746#M108634</guid>
      <dc:creator />
      <dc:date>2011-09-28T01:50:49Z</dc:date>
    </item>
  </channel>
</rss>

