Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I attached an example which is a modification of an example provided by Sunny T answering to Partial Reload not running SET statements.
While the partial reload works nicely when using CRTL-Shift-R or the pull-down menue it doesn't execute with the macro
sub InitiatePartialReload
ActiveDocument.PartialReload
end sub
I assume that the partial reload is not executed as there is no
'Partial reload has been executed' in the status window, while there is one when I execute partial reload via CRTL-Shift-R.
The method PartialReload for the class Document is documented in API Guide 11.
Where is my mistake?
Any thoughts, ideas are - as always- very much appreciated.
Andreas Köhler
The partial load will be executed - there is not much load-content and therefore the reload is (sometimes) finished before the reload-window could pop-up but nevertheless it will be executed - you could see it if you enabled the script-log and looked then into it.
- Marcus
The partial load will be executed - there is not much load-content and therefore the reload is (sometimes) finished before the reload-window could pop-up but nevertheless it will be executed - you could see it if you enabled the script-log and looked then into it.
- Marcus
If I create & look at the document log:
4/20/2016 4:09:56 PM: 0020 if not IsPartialReload() then
4/20/2016 4:09:56 PM: 0028 trace 'Partial reload has been executed'
4/20/2016 4:09:56 PM: 0028 'Partial reload has been executed'
4/20/2016 4:09:56 PM: 0029 sleep 2000
4/20/2016 4:09:58 PM: 0030 Exit SCRIPT
4/20/2016 4:09:58 PM: Execution finished.
Everything seems fine?
Markus,
thanks for your reply.
If it is executed, why does the Trace does not appear? I use the same routine when executing directly or via macro. The outcome should be the same, right?
I even increased the sleep to 20000 but there is no trace-message.
Andreas
Stefan,
did you use the button to execute the reload? Did you see the 'Partial reload has been executed' after executing the reload via the button.
Besides (coughing): where do I find the log-file?
Andreas
Within the log-file is the trace-statement:
Maybe you could see it within the reload-window if you put another sleep-statement above the trace-statement.
- Marcus
Andreas, enable the log in document properties,general tab. Then you find it next to the qvw.
Why you can't see it in the Dialog window? Ask Qlik, not me.
I must say I could the reload-window see if I perform the macro-reload. Could it be that your reload-window is on another monitor?
- Marcus
Well,
this is all quite strange.
While once a while I saw the trace line in the status window, it was not reproducable. It seems as if the window is not updated properly messaging 'Keine Rückmeldung' in the title bar of the window, even with long sleeps and making sure that it was the active window. Seldomly the trace appeared, mostly not.
Seems as if there is no trace message when the window is closed too soon because there is no or small sleep value, or when the window gets not updated (because of a long sleep value?).
a) I downloaded the old file that I updated earlier. I actived the log and ran it. The trace did not show up while I was staring at the status window, but it was logged:
2016-04-20 16:47:13 0020 if not IsPartialReload() then
2016-04-20 16:47:13 0021
2016-04-20 16:47:13 0028 trace 'Partial reload has been executed'
2016-04-20 16:47:13 0028 'Partial reload has been executed'
2016-04-20 16:47:13 0029
2016-04-20 16:47:13 0029 sleep 2000
2016-04-20 16:47:15 0030 Exit SCRIPT
b) I changed the sleep to 20000: Log file yes, window no.
c) I added sleep 20000 before trace is executed: Log file yes, window no;
d) While changing sleep timing back and forth I could at least seldomly see the trace message albeit not reproducable.
I agree that this is confusing, but I think you should keep to the log for this scenario, not sure how the ouput window works w.r.t. macro execution and refresh cycles.