<?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? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/macro/m-p/808872#M1022473</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 have a req like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i selected project -sales&amp;nbsp; then store it in&amp;nbsp; C drive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i select any other project then store it in&amp;nbsp; E drive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have created variable for&amp;nbsp;&amp;nbsp; c path location and e pathlocation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;c path location variable name is&amp;nbsp;&amp;nbsp;&amp;nbsp; vnewdev&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e path location variable is&amp;nbsp;&amp;nbsp; volddev&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&amp;nbsp; getfieldselections(project)&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp; variable name is&amp;nbsp; vproject&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here my macro is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set vpro=activedocument.variables("vproject")&lt;/P&gt;&lt;P&gt;if&amp;nbsp; vpro = "sales"&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;set dev=activedocument.variables("vnewdev")&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;set dev=activedocument.variables("volddev")&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i wrote like this but&amp;nbsp; still it is showing syntax error &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why ?&amp;nbsp; what is the wrong here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Mar 2015 15:22:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-03-27T15:22:14Z</dc:date>
    <item>
      <title>macro?</title>
      <link>https://community.qlik.com/t5/QlikView/macro/m-p/808872#M1022473</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 have a req like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i selected project -sales&amp;nbsp; then store it in&amp;nbsp; C drive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i select any other project then store it in&amp;nbsp; E drive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have created variable for&amp;nbsp;&amp;nbsp; c path location and e pathlocation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;c path location variable name is&amp;nbsp;&amp;nbsp;&amp;nbsp; vnewdev&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e path location variable is&amp;nbsp;&amp;nbsp; volddev&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&amp;nbsp; getfieldselections(project)&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp; variable name is&amp;nbsp; vproject&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here my macro is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set vpro=activedocument.variables("vproject")&lt;/P&gt;&lt;P&gt;if&amp;nbsp; vpro = "sales"&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;set dev=activedocument.variables("vnewdev")&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;set dev=activedocument.variables("volddev")&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i wrote like this but&amp;nbsp; still it is showing syntax error &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why ?&amp;nbsp; what is the wrong here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 15:22:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro/m-p/808872#M1022473</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-27T15:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: macro?</title>
      <link>https://community.qlik.com/t5/QlikView/macro/m-p/808873#M1022474</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;you just set the variable to vpro.&lt;/P&gt;&lt;P&gt;You further need to check the Content of the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore try this:&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 _jivemacro_uid_14274706384015767" jivemacro_uid="_14274706384015767"&gt;
&lt;P&gt;sub Test&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set vpro = ActiveDocument.Variables("vProject")&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if&amp;nbsp; vpro.GetContent.String = "sales" then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox("Location C")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; else&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox("Location E")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; end if&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;end sub&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 15:37:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro/m-p/808873#M1022474</guid>
      <dc:creator>patroser</dc:creator>
      <dc:date>2015-03-27T15:37:49Z</dc:date>
    </item>
  </channel>
</rss>

