<?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 EDX with delay in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/EDX-with-delay/m-p/375175#M577417</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simpler is better!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Mar 2012 09:36:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-03-29T09:36:49Z</dc:date>
    <item>
      <title>EDX with delay</title>
      <link>https://community.qlik.com/t5/QlikView/EDX-with-delay/m-p/375171#M577413</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;I have several EDX solutions up and running.&lt;/P&gt;&lt;P&gt;Works like a charm. &lt;/P&gt;&lt;P&gt;When I hit the button it uses about 10 seconds to do the reload.&lt;/P&gt;&lt;P&gt;During this period I want the relevant tables and graphs to be hidden, and only to appear when the new result is being loaded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a variable called vShow, it is default set to 0.&lt;/P&gt;&lt;P&gt;When the user hits the button it is set to 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My tables have a conditional layout that says vShow = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obivously the button will set the vShow to 1 as soon as I hit it. Thus showing the tables and graphs premature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea on how to create a delay or make it show when the result from the load is done?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 08:02:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/EDX-with-delay/m-p/375171#M577413</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-29T08:02:29Z</dc:date>
    </item>
    <item>
      <title>EDX with delay</title>
      <link>https://community.qlik.com/t5/QlikView/EDX-with-delay/m-p/375172#M577414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have done a similar thing with you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a text object which will show 'Reloading....' during reload process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The text object is shown conditionally when variable, vShown = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the button, which trigger the EDX, add a action to change the vShown = 0.&lt;/P&gt;&lt;P&gt;In the loading script, add &lt;/P&gt;&lt;P&gt;let vShown = 1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at the last line of the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 08:11:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/EDX-with-delay/m-p/375172#M577414</guid>
      <dc:creator />
      <dc:date>2012-03-29T08:11:47Z</dc:date>
    </item>
    <item>
      <title>EDX with delay</title>
      <link>https://community.qlik.com/t5/QlikView/EDX-with-delay/m-p/375173#M577415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assumed that would be one solution, but I have not been able to figure out where in the script I should place the line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Macro for EDX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub TriggerEDX()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim objHttp&lt;/P&gt;&lt;P&gt;Dim strUrl&lt;/P&gt;&lt;P&gt;Dim strData&lt;/P&gt;&lt;P&gt;Dim strKeyRequest&lt;/P&gt;&lt;P&gt;Dim strKeyAwnser&lt;/P&gt;&lt;P&gt;'Dim varSQL&lt;/P&gt;&lt;P&gt;Dim stringSQL&lt;/P&gt;&lt;P&gt;Dim vShow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET varSQL = ActiveDocument.Variables("vSQL")'.GetContent.STRING&lt;/P&gt;&lt;P&gt;'stringSQL = varSQL.GetContent.String&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'MSGBOX(varSQL)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Task Name from QEMC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim strTaskName&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strTaskName = "EDX"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim strTaskPassword&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strTaskPassword = inputbox("Please enter task password")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Create a HTTP instance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objHttp = CreateObject("Microsoft.XMLHTTP")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strUrl = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost:4720/qtxs.asmx"&gt;http://localhost:4720/qtxs.asmx&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Get key for HTTP call&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strKeyRequest ="&amp;lt;Global method=""GetTimeLimitedRequestKey"" /&amp;gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Do HTTP call to server&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; objHttp.open "POST",strUrl,false&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; objHttp.setRequestHeader "Content-Type","text/xml"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; objHttp.setRequestHeader "Content-Length", Len(strKeyRequest)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; objHttp.Send strKeyRequest&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Parse the awnser&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Store reply from HTTP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim strKey&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strKey = ParseKeyAwnser(objHttp.ResponseText)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Get the string to send in the request that triggers the task&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim strEDXRequest &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Store the result&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strEDXRequest = GetEDXRequestString(strKey,strTaskName,strTaskPassword,varSQL.GetContent.String)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Do the actual request to trigger the task&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; objHttp.open "POST",strUrl,false&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; objHttp.setRequestHeader "Content-Type","text/xml"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; objHttp.setRequestHeader "Content-Length", Len(strKeyRequest)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; objHttp.Send strEDXRequest&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Get the awnser, the awnser can contain different things but for now I only care to see if we find success&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dim strAwnser&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strAwnser = objHttp.ResponseText&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'The awnser if success looks like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '&amp;lt;RequestEDX&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '&amp;nbsp; &amp;lt;RequestEDXResult&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TaskStartResult&amp;gt;Success&amp;lt;/TaskStartResult&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Log /&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '&amp;nbsp; &amp;lt;/RequestEDXResult&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '&amp;lt;/RequestEDX&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Instr(strAwnser,"&amp;lt;TaskStartResult&amp;gt;Success&amp;lt;/TaskStartResult&amp;gt;") &amp;gt; 0) then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox("Loading data! This may take a few seconds!")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox(strAwnser)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function ParseKeyAwnser(strKeyAwnser)&lt;/P&gt;&lt;P&gt;'The Awnser should look something like this&lt;/P&gt;&lt;P&gt;'&amp;lt;GetTimeLimitedRequestKey&amp;gt;&lt;/P&gt;&lt;P&gt;'&amp;nbsp; &amp;lt;GetTimeLimitedRequestKeyResult&amp;gt;&amp;lt;/GetTimeLimitedRequestKeyResult&amp;gt;&lt;/P&gt;&lt;P&gt;'&amp;lt;/GetTimeLimitedRequestKey&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim intStartPos&lt;/P&gt;&lt;P&gt;Dim IntKeyLen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Get the starting and the end position of the key&lt;/P&gt;&lt;P&gt;intStartPos = InStr(strKeyAwnser,"&amp;lt;GetTimeLimitedRequestKeyResult&amp;gt;")+Len("&amp;lt;GetTimeLimitedRequestKeyResult&amp;gt;")&lt;/P&gt;&lt;P&gt;intKeyLen = InStrRev(strKeyAwnser,"&amp;lt;/GetTimeLimitedRequestKeyResult&amp;gt;") - intStartPos&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Get and return the key&lt;/P&gt;&lt;P&gt;ParseKeyAwnser = Mid(strKeyAwnser,intStartPos,intKeyLen)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function GetEDXRequestString(strRequestKey,strTaskName,strTaskPassword,stringSQL)&lt;/P&gt;&lt;P&gt;'The request to send look like this&lt;/P&gt;&lt;P&gt;'&amp;lt;Global method="RequestEDX" key="RJtp/"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; '&amp;lt;i_TaskIDOrTaskName&amp;gt;MyTaskName&amp;lt;/i_TaskIDOrTaskName&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; '&amp;lt;i_Password&amp;gt;MyTaskPassword&amp;lt;/i_Password&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; '&amp;lt;i_VariableName /&amp;gt;&amp;lt;i_VariableName /&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; '&amp;lt;i_VariableValueList /&amp;gt;&amp;lt;i_VariableValueList /&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; '&amp;lt;/Global&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Make the string and insert the key&lt;/P&gt;&lt;P&gt;GetEDXRequestString = "&amp;lt;Global method=""RequestEDX"" key=""" &amp;amp; strRequestKey &amp;amp;&amp;nbsp; """&amp;gt;&amp;lt;i_TaskIDOrTaskName&amp;gt;" &amp;amp; strTaskName &amp;amp; "&amp;lt;/i_TaskIDOrTaskName&amp;gt;&amp;lt;i_Password&amp;gt;" &amp;amp; strTaskPassword &amp;amp; "&amp;lt;/i_Password&amp;gt;&amp;lt;i_VariableName &amp;gt;vSQL&amp;lt;/i_VariableName &amp;gt;&amp;lt;i_VariableValueList &amp;gt;&amp;lt;string&amp;gt;" &amp;amp; stringSQL &amp;amp; "&amp;lt;/string&amp;gt;&amp;lt;/i_VariableValueList &amp;gt;&amp;lt;/Global&amp;gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 09:00:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/EDX-with-delay/m-p/375173#M577415</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-29T09:00:17Z</dc:date>
    </item>
    <item>
      <title>EDX with delay</title>
      <link>https://community.qlik.com/t5/QlikView/EDX-with-delay/m-p/375174#M577416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean you should place the re-initial code in the loading script, not Macro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 09:17:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/EDX-with-delay/m-p/375174#M577416</guid>
      <dc:creator />
      <dc:date>2012-03-29T09:17:51Z</dc:date>
    </item>
    <item>
      <title>EDX with delay</title>
      <link>https://community.qlik.com/t5/QlikView/EDX-with-delay/m-p/375175#M577417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simpler is better!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 09:36:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/EDX-with-delay/m-p/375175#M577417</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-29T09:36:49Z</dc:date>
    </item>
  </channel>
</rss>

