<?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 Conditional Run macro action? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961941#M970653</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can we create action which Runs macro by using if statement and condition in it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EX. I am using below statement while creating actions If(vNo_of_rows&amp;lt;5000,'ExportMacro')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want my macro to run only when value of variable vNo_of_rows less than 5000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem: It is still running macro when condition is False i.e. value is greater than 5000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Sep 2015 11:40:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-09-16T11:40:44Z</dc:date>
    <item>
      <title>Conditional Run macro action?</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961941#M970653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can we create action which Runs macro by using if statement and condition in it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EX. I am using below statement while creating actions If(vNo_of_rows&amp;lt;5000,'ExportMacro')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want my macro to run only when value of variable vNo_of_rows less than 5000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem: It is still running macro when condition is False i.e. value is greater than 5000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 11:40:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961941#M970653</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-16T11:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Run macro action?</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961942#M970654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Possibly the execution of your expression is not happening properly. Did you put '=' sign ? or may be $ expansion is required. Try like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=&lt;/STRONG&gt; If(vNo_of_rows&amp;lt;5000,'ExportMacro')&lt;/P&gt;&lt;P&gt;Or,&lt;/P&gt;&lt;P&gt;= If(&lt;STRONG&gt;$&lt;/STRONG&gt;(vNo_of_rows)&amp;lt;5000,'ExportMacro')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 11:46:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961942#M970654</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-09-16T11:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Run macro action?</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961943#M970655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe it's easier to include the condition within the macro itself instead in the trigger. You could query your variables within the macro like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v = ActiveDocument.Variables("vNo_of_rows").GetContent.String&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if v &amp;lt; 5000 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; export ...&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox "to many rows, please select ..."&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 11:55:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961943#M970655</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-09-16T11:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Run macro action?</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961944#M970656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tresesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this but issue not resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 12:24:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961944#M970656</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-16T12:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Run macro action?</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961945#M970657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you checked your variable output? Could you post your problem qvw with sample reduced data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 12:27:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961945#M970657</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-09-16T12:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Run macro action?</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961946#M970658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcus, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code change will always run macro only when value is &amp;lt;5000. I have a sheet from which I want to run same macro even when it is greater than 5000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, If it is &amp;lt;5000 I want to run Export to Excel. If it is greater than 5000 then I am showing warning msg (as Qlikview text object and not VBA msgbox) with continue button. If Continue is pressed then same macro will run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 12:31:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961946#M970658</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-16T12:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Run macro action?</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961947#M970659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tresesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I am monitoring variable which is counting the no. of rows. But somehow it is running macro even when variable has 5000+ number. I have also prioritize Set variable action first and below it I have run Macro on condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 12:39:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961947#M970659</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-16T12:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Run macro action?</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961948#M970660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem could lie here in setting the variable value and excuting the macro in a same trigger. Try to remove the set variable action from the trigger and use a definition for the variable to get it's value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 12:55:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961948#M970660</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-09-16T12:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Run macro action?</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961949#M970661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try by removing the else part from the marcus solution...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 13:15:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961949#M970661</guid>
      <dc:creator>PradeepReddy</dc:creator>
      <dc:date>2015-09-16T13:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Run macro action?</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961950#M970662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The actions which are executed by one trigger won't be executed sequentielly - therefore is the suggestion from &lt;A href="https://community.qlik.com/qlik-users/26418"&gt;tresesco&lt;/A&gt; to separate these actions by from eachother depending actions recommended.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But your further requirements (from which sheet triggered and to react on the user-message) could be included into the macro. The calling sheet could be per getactivesheetid() assigned to another variable and a msgbox had a return-value for each button which will be pressed and which could be queried in another if-loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 13:15:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Run-macro-action/m-p/961950#M970662</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-09-16T13:15:36Z</dc:date>
    </item>
  </channel>
</rss>

