<?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 Error in a macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684962#M248259</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a strange behavior in a Macro that you need to do is update the fields in a table.&lt;/P&gt;&lt;P&gt;This is the macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sub OutLote&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; for k = 1 to ActiveDocument.Evaluate("=getSelectedCount(Order_Id)")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OutValue = ActiveDocument.Evaluate("=subfield(getFieldSelections(Order_Id, ';', 25), ';' ,"&amp;amp;k&amp;amp;")")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.DynamicUpdateCommand("UPDATE SEL SET Lote=Null() WHERE Order_Id="&amp;amp;OutValue&amp;amp;"")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; next&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;end sub&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The strange behavior is that sometimes leaves the computer "hung" and do not know why it is. The same is silly but not see it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its aim is to update a table (SEL) with basic data are: &lt;/P&gt;&lt;P&gt;Order_Id, Lot and Date &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, you must make is to put the Lot = Null in the records selected through Order-Id. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In some cases, when multiple values ​​are selected Order_Id eg 10 values ​​(limit of 25), running, does it perfectly for 5 different, if we run without doing anything more, is doing well other 2 or 3 and so on down. &lt;/P&gt;&lt;P&gt;At the end is where you leave your computer "hanging"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you&amp;nbsp; check it?&lt;/P&gt;&lt;P&gt;TX&lt;/P&gt;&lt;P&gt;Enrique&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Sep 2014 13:49:36 GMT</pubDate>
    <dc:creator>ecolomer</dc:creator>
    <dc:date>2014-09-01T13:49:36Z</dc:date>
    <item>
      <title>Error in a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684962#M248259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a strange behavior in a Macro that you need to do is update the fields in a table.&lt;/P&gt;&lt;P&gt;This is the macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sub OutLote&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; for k = 1 to ActiveDocument.Evaluate("=getSelectedCount(Order_Id)")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OutValue = ActiveDocument.Evaluate("=subfield(getFieldSelections(Order_Id, ';', 25), ';' ,"&amp;amp;k&amp;amp;")")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.DynamicUpdateCommand("UPDATE SEL SET Lote=Null() WHERE Order_Id="&amp;amp;OutValue&amp;amp;"")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; next&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;end sub&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The strange behavior is that sometimes leaves the computer "hung" and do not know why it is. The same is silly but not see it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its aim is to update a table (SEL) with basic data are: &lt;/P&gt;&lt;P&gt;Order_Id, Lot and Date &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, you must make is to put the Lot = Null in the records selected through Order-Id. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In some cases, when multiple values ​​are selected Order_Id eg 10 values ​​(limit of 25), running, does it perfectly for 5 different, if we run without doing anything more, is doing well other 2 or 3 and so on down. &lt;/P&gt;&lt;P&gt;At the end is where you leave your computer "hanging"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you&amp;nbsp; check it?&lt;/P&gt;&lt;P&gt;TX&lt;/P&gt;&lt;P&gt;Enrique&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 13:49:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684962#M248259</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2014-09-01T13:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error in a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684963#M248260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you tired with "Sleep" command to give it a&amp;nbsp; time to "commit" your update to your table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 14:23:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684963#M248260</guid>
      <dc:creator>phaneendra_kunc</dc:creator>
      <dc:date>2014-09-01T14:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error in a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684964#M248261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know what you explain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 14:29:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684964#M248261</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2014-09-01T14:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error in a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684965#M248262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check the Database Logs?-Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 14:38:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684965#M248262</guid>
      <dc:creator />
      <dc:date>2014-09-01T14:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Error in a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684966#M248263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry..I meant your app might be hanging because script is not giving enough time to respond..&lt;/P&gt;&lt;P&gt;there is a command to introduce time lag between your operations.. which is "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;GetApplication.WaitForIdle"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try below..&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;sub OutLote&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; for k = 1 to ActiveDocument.Evaluate("=getSelectedCount(Order_Id)")&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OutValue = ActiveDocument.Evaluate("=subfield(getFieldSelections(Order_Id, ';', 25), ';' ,"&amp;amp;k&amp;amp;")")&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-style: inherit;"&gt;ActiveDocument&lt;STRONG style="color: #3d3d3d; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-style: inherit;"&gt;.&lt;/STRONG&gt;GetApplication.WaitForIdle&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ActiveDocument.DynamicUpdateCommand("UPDATE SEL SET Lote=Null() WHERE Order_Id="&amp;amp;OutValue&amp;amp;"")&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="color: #3d3d3d; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-style: inherit;"&gt;ActiveDocument.&lt;/STRONG&gt;GetApplication.WaitForIdle&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp; next&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;end sub&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 14:39:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684966#M248263</guid>
      <dc:creator>phaneendra_kunc</dc:creator>
      <dc:date>2014-09-01T14:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Error in a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684967#M248264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The table is only in memory, at the end export to excel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 14:39:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684967#M248264</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2014-09-01T14:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error in a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684968#M248265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="P99.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/65678_P99.png" style="width: 620px; height: 349px;" /&gt;&lt;/P&gt;&lt;P&gt;I have not noticed any changes&lt;/P&gt;&lt;P&gt;System are execute Macro and don't finish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 14:46:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684968#M248265</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2014-09-01T14:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error in a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684969#M248266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can put a message box and debug. Also if you go in debug mode line by line and it works, you would need a wait for idle then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Rajesh Vaswani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 14:48:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684969#M248266</guid>
      <dc:creator>rajeshvaswani77</dc:creator>
      <dc:date>2014-09-01T14:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Error in a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684970#M248267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Attached are QV an excel &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 14:54:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684970#M248267</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2014-09-01T14:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Error in a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684971#M248268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In such cases I would log the activities from the macro in a txt-file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;set LogFile = fso.OpenTextFile("D:\XourPath\Log\MacroLog.txt", 8, true) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;LogFile.Writeline str &lt;BR /&gt; &lt;BR /&gt;&lt;/SPAN&gt;whereat str = k &amp;amp; timestamp &amp;amp; Update-Statement ... &amp;amp; chr(10)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 14:58:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684971#M248268</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-09-01T14:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error in a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684972#M248269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any idea??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 17:48:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684972#M248269</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2014-09-01T17:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error in a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684973#M248270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can put msgbox, but I don't know activwe debug mode&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 19:17:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684973#M248270</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2014-09-01T19:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Error in a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684974#M248271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;New version ... QV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now works ...!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 20:56:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-a-macro/m-p/684974#M248271</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2014-09-01T20:56:28Z</dc:date>
    </item>
  </channel>
</rss>

